django-nvd3
django-nvd3 copied to clipboard
data container and performance
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.
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.
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).
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.
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
https://github.com/areski/python-nvd3/commit/0c782e9f53293d7640241ef5258bad0a3347f203
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.