You must be logged in to post your query.
Home › Forums › Chart Support › Dynamically Updating Grid Color…?
I have tried:
chart.options.axisX.gridColor = “#006400”;
but, does not seem to work. Anyone know the correct syntax..?
To dynamically update the gridColor please set the gridThickness and gridColor by updating chart options then call the render() as shown in the code snippet below –
chart.options.axisX.gridThickness = 2;
chart.options.axisX.gridColor = "#006400";
To update any axis elements dynamically you can also use the set().
Please take a look at this JSFiddle for a working example on updating the gridColor.
If you are still facing issue, kindly create a JSFiddle with your use-case and share it with us so that we can look into the code & the chart-options, understand the scenario better and help you out.
You must be logged in to reply to this topic. Login/Register