Home › forums › Using CanvasJS › CanvasJS Responsive Issue
Tagged: resize, responsive, width
I have created a “spline” chart and implemented it in a demo page of ours.
Everything works great and chart is fully responsive when window size is resized.
But we also have a vertical left navigation sidebar, with a toggle button (visible when window width >810px).
When i click on the button and have the sidebar expanded (or collapsed back later), chart is not “recognising” the new width of its container at all. It will recognise new width only if entire browser window is manually resized.
I have created a JsFiddle demo to reproduce issue with CanvasJS script in line 141
Any help would be appreciated.
It seems to be working fine at our end. The side navigation menu comes up over all other body elements on clicking the menu icon because of which it is not resizing the content of the body element itself, as a result, the chart is not getting resized.
As i wrote above, when window width >810px sidebar pushes content and main DIV is getting resized.
In order to understand and debug your code better can you kindly create and share a JSFiddle with bare minimal lines of code(removing unnecessary code).
This one step can assure speedy response.
You must be logged in to reply to this topic.