Home › forums › Using CanvasJS › Chart in div hidden
This topic contains 4 replies, has 4 voices, and was last updated by Sunil Urs 3 years, 3 months ago.
I have a problem when I load canvasjs in div which is hidden.
The default width no take 100% of my hidden tab, is only take the right width when the tab is open.
Another method can be resize manually the chart on window resize event, but I don’t know if it is possible to do that ?
(Sorry for my english)
As discussed over chat, I’ll consider implementing this feature in the next version. Will update you on the same once it is implemented.
Is there any update on when the next version with this fix will be released?
Thanks for your work!
you can specify the height and width of the graph in the code, that way when the graph renders in a hidden div it will have the proper height and width. You can only specify in pixels though and not percent.
height: 550, //in pixels
Since v1.4 you can also call render method once it becomes visible and chart updates its size according to its container element.
You must be logged in to reply to this topic.
ASP.NET MVC Charts
ContactSales EnquiriesSupport ForumTwitter Support Handle