One that came close to my exact same problem never had a reply and the linked thread is gone:
viewtopic.php?f=14&t=39751
Environment: React latest
Highcharts: Latest
Currently I'm using Highcharts directly and not with the Highcharts React Wrapper.
I'm creating the chart like this:
Code: Select all
...
// where in the options, I set renderTo with an unique id
ref.current.chart = Highcharts.chart(container, options);
...
// then i just tell Highcharts to render to that container
return (<StyledChartContainer id={props.id} tabIndex={0} ref={onRefUpdated} />);
In the code, I access the chart object returned by Highcharts directly and tried to show/hide the series.
Code: Select all
const chart = ref.current.chart;
chart.series[0].setVisible(true);
// chart.series[0].setVisible(true, true);
Code: Select all
> window['example-donut-chart'].current.chart.series[0].setVisible(true)