Create Web Charts with D3

Book Description

Create Web Charts with D3 shows how to convert your data into eye-catching, innovative, animated, and highly interactive browser-based charts. This book is suitable for developers of all experience levels and needs: if you want power and control and need to create data visualization beyond traditional charts, then D3 is the JavaScript library for you.

By the end of the book, you will have a good knowledge of all the elements needed to manage data from every possible source, from high-end scientific instruments to Arduino boards, from PHP SQL databases queries to simple HTML tables, and from Matlab calculations to reports in Excel.

This book contains content previously published in Beginning JavaScript Charts.

  • Create all kinds of charts using the latest technologies available on browsers
  • Full of step-by-step examples, Create Web Charts with D3 introduces you gradually to all aspects of chart development, from the data source to the choice of which solution to apply.
  • This book provides a number of tools that can be the starting point for any project requiring graphical representations of data, whether using commercial libraries or your own

    Table of Contents

    1. Cover
    2. Title
    3. Copyright
    4. Dedication
    5. Contents at a Glance
    6. Contents
    7. About the Author
    8. About the Technical Reviewers
    9. Acknowledgments
    10. Introduction
    11. Chapter 1: Charting Technology Overview
      1. Elements in a Chart
      2. Most Common Charts
      3. How to Realize Charts on the Web
      4. HTML5
      5. Charting with SVG and CANVAS
        1. Canvas vs SVG
      6. The DOM
      7. Developing in JavaScript
        1. Running and Debugging JavaScript
        2. Data Types in JavaScript
      8. Firebug and DevTools
      9. JSON
      10. Summary
    12. Chapter 2: Working with D3
      1. Introducing D3
      2. Starting with a Blank HTML Page
      3. Using Selections and Operators
        1. Selections and Selectors
        2. Operators
      4. Creating New Elements
        1. The html() Method
        2. The append() Method
        3. The insert() Method
      5. Inserting Data into Elements
      6. Applying Dynamic Properties
      7. Adding SVG Elements
        1. Creating an SVG Element
        2. Transformations
        3. Transitions
      8. Summary
    13. Chapter 3: Line Charts with D3
      1. Developing a Line Chart with D3
        1. Starting with the First Bricks
        2. Scales, Domains, and Ranges
        3. Inside the Code
        4. Using Data with (x,y) Values
        5. Controlling the Axes’ Range
        6. Adding the Axis Arrows
        7. Adding a Title and Axis Labels
      2. Drawing a Line Chart from Data in a CSV File
        1. Reading and Parsing Data
        2. Implementing Axes and the Grid
        3. Drawing Data with the csv() Function
        4. Adding Marks to the Line
        5. Line Charts with Filled Areas
      3. Multiseries Line Charts
        1. Working with Multiple Series of Data
        2. Legend
        3. Interpolating Lines
      4. Difference Line Chart
      5. Summary
    14. Chapter 4: Bar Charts with D3
      1. Drawing a Bar Chart
      2. Drawing a Stacked Bar Chart
      3. A Normalized Stacked Bar Chart
      4. Drawing a Grouped Bar Chart
      5. Horizontal Bar Chart with Negative Values
      6. Summary
    15. Chapter 5: Pie Charts with D3
      1. The Basic Pie Charts
        1. Drawing a Basic Pie Chart
        2. Some Variations on Pie Charts
      2. Donut Charts
      3. Polar Area Diagrams
      4. Summary
    16. Chapter 6: Candlestick Charts with D3
      1. Creating an OHLC Chart
      2. Date Format
      3. Box Representation in Candlestick Charts
      4. Summary
    17. Chapter 7: Scatterplot and Bubble Charts with D3
      1. Scatterplot
      2. Markers and Symbols
        1. Using Symbols as Markers
        2. Using Customized Markers
      3. Adding More Functionalities
        1. Trendlines
        2. Clusters
      4. Highlighting Data Points
      5. Bubble Chart
      6. Summary
    18. Chapter 8: Radar Charts with D3
      1. Radar Chart
        1. Building Auto Scaling Axes
        2. Adding Data to the Radar Chart
      2. Improving Your Radar Chart
      3. Summary
    19. Chapter 9: Handling Live Data with D3
      1. Real-Time Charts
      2. Using PHP to Extract Data from a MySQL Table
        1. Starting with a TSV File
        2. Moving On to the Real Case
      3. Summary
    20. Chapter 10: Adding Controls to Charts
      1. Adding Controls
      2. Using Radio Buttons
        1. Adding Radio Button Controls
      3. Using Sliders
      4. Using Check Boxes
      5. Summary
    21. Chapter 11: Embedding D3 Charts in jQuery Widgets
      1. jQuery UI: Widgets
        1. Accordion
        2. Tab
      2. D3 Charts on Tabs
      3. D3 Charts on Accordions
      4. Resizable and Draggable Charts
        1. A Resizable Line Chart
        2. Three Draggable Line Charts
      5. Summary
    22. Chapter 12: JSON and Layouts—Handling Structured Data
      1. The JSON Format
        1. The D3 Layouts
        2. Starting with a Simple Tree
        3. Analysis of the Tree Layout
        4. Circular Tree Representation
        5. The Partition Layout
        6. Endless Possibilities with JSON and Layouts
      2. Summary
      3. Conclusion
    23. Appendix A: Guidelines for the Examples in the Book
      1. Installing a Web Server
      2. Installing Aptana Studio IDE
      3. Setting the Aptana Studio Workspace
      4. Creating a Project
      5. Completing the Workspace
      6. Filling the src Directory with the Libraries
      7. Running the Examples
      8. Summary
    24. Index

    Product Information

    • Title: Create Web Charts with D3
    • Author(s):
    • Release date: December 2014
    • Publisher(s): Apress
    • ISBN: 9781484208656