Simplifying a line before rendering on chart in d3

我们两清 提交于 2019-12-11 03:47:27

问题


I am trying to plot data collected live from bee hives. We plan to collect data every 5 minutes, so in a year there will be on the order of 100,000 data points. I want to set up a chart to plot the data, and have new data enter the chart everytime the database changes (using Meteor).

I have a simple mockup at datacomb.meteor.com These charts were made using dc.js, a d3 wrapper.

Is there a way to use the topojson.simplify (http://bost.ocks.org/mike/simplify/) functionality to pre-process the lines and reduce the number of points rendered? Has a more general simplification method been integrated into d3?


回答1:


Have you looked at Simplify.js? It does exactly this.



来源:https://stackoverflow.com/questions/16924767/simplifying-a-line-before-rendering-on-chart-in-d3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!