Filtering in d3.js
✓ Published0🌍 Public
Dd3noob
Last edited Nov 30, 2019
Created on Jun 22, 2014
This example shows a time-series line chart of stock closing prices, with a scatterplot overlay. A filter selects only data points with a closing value below 400, rendering those specific circles in red. The chart is rendered as an SVG using d3.js, employing the d3.time.scale and d3.scale.linear for axes, and the .filter() method on the circle’s enter selection to conditionally style points. The data comes from a CSV file with date and close columns.
AI-generated descriptionThis is a follow on from the simple scatterplot used as an example in the book D3 Tips and Tricks.
It is aimed at demonstrating the use of the .filter statement in d3.js and should be taken in context with the text of the book which can be downloaded for free from Leanpub.
mit Licensed