Dojo chart failed to render

I've been doing a lot of dojo lately.  I ran into an issue recently where I was creating a chart programatically and using a div tag as my target node.  The chart was not working.  The issue was because I had assigned a class to my div tag and the CSS behind the class was causing the chart to not show up.  I think dojo really wants to assign its own styling.  Here's the div that caused the problem:

<!--This is bad to use with dojo charting.-->
<div id="badChart" class="div-area"></div>

The solution is to nest this div tag inside another one.  Apply styling to the outer div tag to your heart's content.

Comments

Popular Posts