I'm new to JS. I'm trying to display a pie graph, with a line graph underneath it. I have the pie graph working and the line graph working.
When my HTML looks like this, it shows the pie chart.
<body>
<div id="canvas-holder" style="width:50%">
<canvas id="chart-area" width="300" height="300" />
</div>
<!--<div style="width:75%;">
<canvas id="linegraphcanvas"></canvas>
</div>-->
<script src="piestuff.js"></script>
<!--<script src="linestuff.js"></script>-->
</body>
When I uncomment the parts above, only the line graph will show.
Why could this be? I have a feeling it's something small to do with how html/js works and not my code (as it's running fine with the other commented out)
Thanks
Aucun commentaire:
Enregistrer un commentaire