JqChart - How to display two graphs on the same page?
Question
How to display two graphs on the same page?
I tried to put a column chart next to a line graph, and using the variables with different names within functions, the two graphs are in conflict. Displays no error in firebug, but the graphics are 'crazy'.
Solution
You need to have different id-s. You can add 2 div containters with different names and make them charts with $('#selector'):
...
$('#jqChart1').jqChart({...});
$('#jqChart2').jqChart({...});
...
<div id="jqChart1" style="width: 400px; height: 250px;">
</div>
<div id="jqChart2" style="width: 400px; height: 250px;">
</div>
...
You can check this sample as well: http://www.jqchart.com/samples/FinancialCharts/StockChartWithVolume
It has 2 charts on the page.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow