redherring917
Posts: 26
Joined: Tue Sep 10, 2024 8:32 pm

Plotting stacked chart data for an unknown (dynamic) number of data points

Hi there. Full disclosure... I've also tried addressing this in a support ticket but thought I'd throw it out here in the forum to perhaps a "wider" audience.

The following demo - which has been pieced together to address our specific needs of using connectors and defining all of our components as custom components that extend the ComponentRegistry - plotting stacked chart data for an unknown (dynamic) number of data points WORKS but... it also displays a "Something went wrong" message. So, clearly it doesn't "work" properly even though it does appear to correctly plot and display the chart.

https://jsfiddle.net/BlackLabel/gmcb8n4z/

We seem SO CLOSE to a solution here as again, it appears to work yet also displays this error message. Are we missing something simple to appease the component and get this error message to disappear???

Thanks!
User avatar
dawid.d
Site Moderator
Posts: 1197
Joined: Thu Oct 06, 2022 11:31 am

Re: Plotting stacked chart data for an unknown (dynamic) number of data points

Hello,

Thanks for the question!

Remember that the way you want to achieve it means that you are actually loading data to the chart from the outside, not from the connector. Although you are defining this connector at the same time. It doesn't work for you, because the data in `beforeParse` should be returned in tabular form, i.e. a two-dimensional array, as in the demo: https://jsfiddle.net/BlackLabel/5da0f1t8/

This is not an ideal approach, it would be best for this case if the Highcharts Components API supported the ability to define multiple series from one column. That's why I submitted this feature request: https://github.com/highcharts/highcharts/issues/21748 As a PoC, I have prepared a workaround that can be applied to your example: https://jsfiddle.net/BlackLabel/5xf9bmts/

We would appreciate any feedback on this proposal, and if we consider the idea well thought out enough, we will start implementing it into the library.

Hope it helps!

Best regards,
Dawid Draguła
Highcharts Developer
redherring917
Posts: 26
Joined: Tue Sep 10, 2024 8:32 pm

Re: Plotting stacked chart data for an unknown (dynamic) number of data points

Thanks a lot for your reply Dawid and for your work on this. I'm going to have to sit with this for a bit before I would be able to offer any meaningful feedback - late on Friday afternoon after a long week probably isn't the best time to try to absorb this :)

Thanks again. Much appreciated.

Return to “Highcharts Dashboards”