Home › forums › Chart Support › Chart in div hidden
Hi,
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 ?
Thanks.
(Sorry for my english)
Anty,
As discussed over chat, I’ll consider implementing this feature in the next version. Will update you on the same once it is implemented.
— Sunil
Hi Sunil,
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 width: 600, zoomEnabled: true, colorSet: "colorSet", title:{ fontSize: 30, text: "Activity", },
Since v1.4 you can also call render method once it becomes visible and chart updates its size according to its container element.
— Sunil Urs
You must be logged in to reply to this topic.