django-nvd3 icon indicating copy to clipboard operation
django-nvd3 copied to clipboard

data container and performance

Open zebulon2 opened this issue 11 years ago • 6 comments

Hi, I am testing lineChart and was wondering how to pass a lot of data time courses without impairing too much the performance. I have seen that the data is passed as a list in the header of the rendered HTML page. I would like to have a dozen xy curves displayed, and this leads to some strain on the client side. Any advice on compressing/increasing performance (except reducing the resolution)? Thanks in advance.

zebulon2 avatar Nov 25 '13 17:11 zebulon2

Actually I even investigated this, it will be interesting to share what you found. Maybe looking at what the folks from nvd3 recommend would be a good start.

areski avatar Dec 05 '13 01:12 areski

Alright, will share. Interestingly, Google charts does not have the same performance issue. But there are less functionalities (like toggling the time course curves from the legend).

zebulon2 avatar Dec 05 '13 11:12 zebulon2

The Ramer-Douglas-Peucker algorithm works pretty well to simplify lines. However, I understand that a line chart with several line series must have the same 'x' axis values, am I correct? Or is there a way to display line charts with different 'x' series? If not, then I need to apply the rdp algorithm to each series, take all the reduced 'x' together and reconstruct the series.

zebulon2 avatar May 25 '14 07:05 zebulon2

Thanks for the pointer, that sounds a very interesting algorithm. It's possible to use different x axis for each line, I just pushed an example how to do that

areski avatar May 31 '14 10:05 areski

https://github.com/areski/python-nvd3/commit/0c782e9f53293d7640241ef5258bad0a3347f203

areski avatar May 31 '14 10:05 areski

Hi, many thanks, did not know it was possible, this simplifies the problem a lot. However, there seems to be a problem with nvd3 performance for multiple series. Flot, for instance, has absolutely no problem to display 6 overlays of 8 series of 1000 points on any major browser, with point coordinates display when hovering above the series courses. 1 serie with nvd3 makes FF and Chrome struggle, and IE crashes. I understand that nvd3 is having a major rewrite (version 2) so this may be corrected. But I need to report the issue upstream.

zebulon2 avatar Jun 13 '14 22:06 zebulon2