You must be logged in to post your query.
Home › Forums › StockChart Support › Setting option for every chart in multi-chart view
From https://canvasjs.com/react-stockcharts/stockchart-date-time-axis-react/ this graph,
I want to enable/disable grid/reference line on charts in single and multi view.
However, I want to provide setting option to user to do the above, similar to below screenshot.
file://C:/Users/Sandeep/Desktop/multichart%20setting.PNG
Is it available with single/multiple data with React?
@sandeep-sharma2,
The image shared above seems to be broken. Can you kindly upload the image to imgur and share it with us so that we can understand your scenario better and help you out?
—- Manoj Mohan Team CanvasJS
Thanks @manoj-mohan, please find below image
Image 1 Image 2
You can hide and unhide the axis gridlines by setting axis gridThickness to 0 and positive value respectively as shown in the below code snippet.
toggleGridLines() { for(var i = 0; i < this.charts.length; i++) { for(var j = 0; j < this.charts[i].axisY.length; j++) { this.charts[i].axisY[j].set("gridThickness", (this.charts[i].axisY[j].gridThickness ^ 1)) } } }
Also, check out this StackBlitz example for hide/unhide axis gridlines on click of a button.
You must be logged in to reply to this topic. Login/Register