Hello,
I am trying to load chart on a hidden div and then showing the div on a click of a button.
But it doesnt load the chart if div hidden.
Here is the code:
<script>
window.onload = function(){
var pieChart = new dhtmlXChart({
view:"donut",
container:"chart",
value:"#sales#",
color:"#color#",
tooltip:"Value <b>#sales#</b>",
legend:{
width: 75,
align:"right",
valign:"middle",
template:"#month#"
},
gradient:1,
shadow:false
});
pieChart.parse(month_dataset,"json");
}
</script>
<div id="chart" style="display:none;width:400px;height:250px;border:1px solid #A4BED4;"></div>
<a onclick="document.getElementById('chart').style.display='block'"> show me</a>
Any way around or solution?
Thanks