I am trying to plot ~400K graphs in Highcharts from a CSV file which has the following structure:
x1, x2, y
0.03, 0.034, 1
0.2, 0.23, -1
0.3, 0.31, 0.4
0.32, 0.37, 0.7
[...]
Each line contains a function going from (x1, y) to (x2, y).
My first approach was to transform this CSV data to the series format of Highcharts and hardcode it in the JS snippet. This does work, as it can be seen on my Fiddle:
https://jsfiddle.net/4kt7f8w3/
The problem is that this is completely inefficient. Therefore, when the number of functions plotted is over 10K, the web browser crashes.
I have also seen that there is a way to read CSVs on Highcharts, but as it can be seen on the example, the read csv function on Highcharts expects a different format.
Also, I have seen that there are examples on Highcharts with huge loads using boost module. Therefore, I believe that it is possible to plot these ~400K functions from a csv file within a graph using Highcharts, but I have not found a way to do this. Any guesses?
PS: the csv comes from a Python module that I can modify as I wish in order to read the given data from there.
Mapping series data.seriesMapping should help for first questions.
An array containing dictionaries for each series. A dictionary exists of Point property names as the key and the CSV column index as the value.
API References: https://api.highcharts.com/highcharts/data.seriesMapping
Questions:
So you want to render over 400k series with single points, right? Why don't you want to use the boost module?