This example demonstrates the rendering of 10,000 datapoints with pan / zoom via d3-zoom. As you manipulate the chart it is being re-rendered by invoking selection.call
on the top level component. Rendering the data to Canvas is approximately x10 faster than SVG in this case.
The visual d3fc components support rendering to both Canvas and SVG. In this case the cartesianCanvasChart
and seriesCanvasPoint
are used to render the chart. You can swap then for SVG simply by changing the to cartesianSvgChart
and seriesSvgPoint
.
https://unpkg.com/babel-polyfill@6.26.0/dist/polyfill.js
https://unpkg.com/custom-event-polyfill@0.3.0/custom-event-polyfill.js
https://cdnjs.cloudflare.com/ajax/libs/document-register-element/1.8.0/document-register-element.js
https://unpkg.com/babel-standalone@6/babel.min.js
https://unpkg.com/d3@5.5.0
https://unpkg.com/d3fc@14.0.41