chuang
Posts: 5
Joined: Tue Feb 20, 2024 1:58 am

Updating connector data doesn't make chart rerender

hello, i have a function that updates the connector data for the highcharts components. however, once i update that data, the charts do not reflect those changes. is there a way to manually trigger the highcharts to reload/rerender? i also have a custom component which is a table that i do not want to update/rerender. this table is the one that is triggering the connector data update for the highcharts components. otherwise it will lose it's state. so specifically, i want to target just the highhcharts components and not the table to rerender.

thanks!
kamil
Posts: 124
Joined: Mon Mar 04, 2024 8:26 pm

Re: Updating connector data doesn't make chart rerender

Hi there,
Thank you for reaching out ot us!

Have you considered using Chart.update function? https://api.highcharts.com/class-refere ... art#update
Also, you can use Chart.redraw if you just want to redraw the chart without updating it.

Best regards!
Kamil Kulig
Highcharts Developer
User avatar
dawid.d
Site Moderator
Posts: 990
Joined: Thu Oct 06, 2022 11:31 am

Re: Updating connector data doesn't make chart rerender

Hi,

just to complement Kamil's answer:

Changing data in the DataTable should lead to an automatic update of the component that uses the given connector. Recently we noticed an issue where this update does not work automatically for custom layout - we are working on fixing this bug:
https://github.com/highcharts/highcharts/issues/21310

If the above issue does not describe your case, please share your use case in the form of, for example, a simplified demo in jsfiddle, I will try to identify this problem to find the best solution.

Best regards!
Dawid Draguła
Highcharts Developer
chuang
Posts: 5
Joined: Tue Feb 20, 2024 1:58 am

Re: Updating connector data doesn't make chart rerender

Hello all, thanks for all the replies. I found that using board.dataPool.setConnectorOptions to refresh the baord's data and then using board.mountedComponents.update() to refresh the component state helped to update the dashboard states like I wanted to. I will try to keep updated on the bug that was linked.

I did try using chart.update/redraw by itself, but it had no effect. Thanks for the suggestions.

Return to “Highcharts Dashboards”