|
How to put 3 separate bar charts on same page - in ColdFusion |
Posted by Michael on Feb-25-2013 00:34 |
|
Hi Peter,
I am trying to place 3 separate bar charts on the same page - in ColdFusion.
Do yo have an example of the code for multiple charts on one page?
I don't understand your javascript code well enough to figure out how to do this, so an example would be a big help.
thx
Michael |
Re: How to put 3 separate bar charts on same page - in ColdFusion |
Posted by Peter Kwan on Feb-26-2013 00:20 |
|
Hi Michael,
Several of the sample code included in ChartDirector contains multiple charts in the same page. For example, the "Bar Gap" sample code (you may look up "Bar Gap" in the ChartDirector documentation index) contains 6 bar charts in the same web page. No Javascript is needed.
The structure of the code in "Bar Gap" is like"
chart0 = createChart(0);
chart1 = createChart(1);
chart2 = createChart(2);
....
<img src="getchart.cfm?#chart0.imageURL#" usemap="##map0" border="0" />
<map name="map0">#chart0.imageMap#</map>
<img src="getchart.cfm?#chart1.imageURL#" usemap="##map1" border="0" />
<map name="map1">#chart1.imageMap#</map>
<img src="getchart.cfm?#chart2.imageURL#" usemap="##map2" border="0" />
<map name="map2">#chart2.imageMap#</map>
....
In the "Bar Gap" example, all 6 bar charts are similar, but you can always draw completely different charts.
chart0 = createTemperatureChart();
chart1 = createRevenueChart();
chart2 = createHeadCountChart();
Hope this can help.
Regards
Peter Kwan |
|