Home forums Using CanvasJS Chart not displaying in specified container Reply To: Chart not displaying in specified container


Sunil Urs


There are couple of issues there. I’ve just fixed enough to get the basic chart rendered.

1. You were trying to create chart before the container element is created.
2. profileChart element is getting created only for the first time. If I switch value in drop down, there is no profileChart anywhere to be seen.
3. Height was not set for profileChart element or the chart. You should set height for either one of them atleast.
4. Not a good idea to create a totally new chart each time. Instead create chart ones and just hide/unhide tabs.

Here is a JSFiddle.

Hope you can take it forward from here.

Sunil Urs