ajayharish034
Posts: 3
Joined: Thu Sep 15, 2022 12:29 pm

Highcharts gantt - trying to plot a series with huge data

Hi Team,

I have a problem in plotting very huge data using highcharts Gantt. Trying to plot series data like below,

{"start":1661269906299369,"end":1661269906299370,"y":13,"color":"lightcyan"},{"start":1661269906299375,"end":1661269906300140,"y":13,"color":"lightpurple"},
{"start":1661269906300142,"end":1661269906300145,"y":13,"color":"cyan"},
{"start":1661269906340092,"end":1661269906340094,"y":13,"color":"lightcyan"},.....

data is in metric of microseconds. I have around approx. 40 series data together. Data size is approx. 200+MB and is fails to plot.
When I try to plot it browser goes out of memory. :?

Is there any solution for this kind of approach?

Note: I'm already using
boost: {
useGPUTranslations: true,
// Chart-level boost when there are more than 5 series in the chart
// seriesThreshold: 5
usePreAllocated: true
},
and
turboThreshold: 0,


Thanks,
Ajay. :)
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: Highcharts gantt - trying to plot a series with huge data

Hi there,

Welcome to our forum and thank you for contacting us with your question.

We already had a similar topic on our forum, regarding large Gantt datasets. Take a look at it here: viewtopic.php?f=9&t=44652

But, since your data is so large that it crashes the browser then this issue is not really related to Highcharts performance but to your data size. I would suggest optimizing it first.

As a side note, setting the turboThreshold to 0 disables it. Set it to 1 (or higher) to have it enabled (more about that in the article linked below).
API Reference: https://api.highcharts.com/gantt/plotOp ... oThreshold
General boost module tips: https://www.highcharts.com/docs/advance ... ost-module

Best regards!
Kamil Musiałowski
Highcharts Developer
ajayharish034
Posts: 3
Joined: Thu Sep 15, 2022 12:29 pm

Re: Highcharts gantt - trying to plot a series with huge data

Hi,

As you said I changed the turbo threshold value to some range based on the data but still, it shows me error https://assets.highcharts.com/errors/12/ and it has improved in speed also. where I understood to change the point configuration to numbers or arrays from objects(like how I provide now).

My question is that any chance of making the present point configuration to arrays from objects?
below I have provided the sample,

data: [{"start":1661269906299369,"end":1661269906299370,"y":13,"color":"lightcyan"},{"start":1661269906299375,"end":1661269906300140,"y":13,"color":"lightpurple"},
...,
{}]

to

data: [[1661269906299369, 1661269906299370, 13, lightcyan],
[1661269906299375, 1661269906300140, 13, lightpurple],
...,
[]]

with series.keys with ["start", "end", "y", "name"]. I'm really not sure this would work because I already saw it is not working when I tried https://jsfiddle.net/ajayharish034/n8w4cL3m/8/ please correct the solution if I'm wrong at somewhere.

is there any other way to optimize my data or some suggestions or approaches are welcome.

Thanks in advance,
Ajay. :)
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: Highcharts gantt - trying to plot a series with huge data

Hello there,

I'm sorry but I have misinformed you a little. The Boost module does not work with Highcharts Gantt, only the turboThreshold will positively affect the chart's performance. So there is no need to import the boost module to your code.

Down below I have attached a demo link, which shows you how to properly create an array with the data.
DEMO: https://jsfiddle.net/BlackLabel/mLa23v75/

Let me know if there is anything else that I can help you with,
Have a good day!
Kamil Musiałowski
Highcharts Developer
ajayharish034
Posts: 3
Joined: Thu Sep 15, 2022 12:29 pm

Re: Highcharts gantt - trying to plot a series with huge data

Hi,

Thanks for the reply :D . I need to know how I can provide multiple arrays in series to deal with https://assets.highcharts.com/errors/12/ error.
I tried something like this and it is causing some unknown error - https://jsfiddle.net/ajayharish034/7ermkfLh/6/.
Can you let me know how we can do this.


Thanks,
Ajay.
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: Highcharts gantt - trying to plot a series with huge data

Thank you for pointing this out. After a small investigation, I think that this is a bug in the Gantt chart. I have reported it in our GitHub repository, so at this moment I'd suggest following the GitHub issue linked below to get the latest information about possible workarounds, fixes, etc.

GitHub Issue: https://github.com/highcharts/highcharts/issues/17738

I'm sorry for the inconvenience,
Best regards!
Kamil Musiałowski
Highcharts Developer

Return to “Highcharts Gantt”