Skip to main content
100%

Simple Difference Chart v4

✓ Published0🌍 Public
Dd3noob
Last edited Nov 29, 2019
Created on Nov 29, 2019

This example shows the daily difference in downloads between two Leanpub books, “R Programming for Data Science” and “The Elements of Data Analytic Style,” over several weeks. The chart uses a filled area with two clips to highlight when one book’s sales exceed the other, with green and orange regions above and below a baseline. It is built with D3 v4, using `d3.area` with `d3.curveBasis`, `d3.scaleTime`, `d3.scaleLinear`, and SVG rendering. Data comes from a CSV file and is transformed with `d3.nest` and `d3.timeParse`.

AI-generated description

The graph above shows a simple example of a difference chart used as an example in the book D3 Tips and Tricks. It is based on the difference chart example produced by Mike Bostock.

The graph shows the difference in the number of daily downloads between R Programming for Data Science by Roger Peng and The Elements of Data Analytic Style by Jeff Leek

mit Licensed

Similar vizzes