I have a report containing two different flash charts.
Most of the time the two charts get the same ID (javascript variable name and div ID attribute), which overwrites the first chart with the second. In the result only the second chart gets rendered.
Only once in a while (after some reloads) both charts get different IDs and then all is working.
Is this some kind of bug, or am i missing something here?
Report code
select 'dbr.title', 'my title here';
select 'dbr.subtitle', 'subtitle';
select 'dbr.chart.options', 'flashchart'; select 'dbr.chart.options', 'animation',1;
select 'dbr.chart', 'Line', 'chart1'; select 'dbr.hidecolumn', 'sorter';
select actual chart data here; select 'dbr.subtitle', 'subtitle2';
select 'dbr.chart', 'MSColumn3D', 'chart2'; select actual chart data here;
Resulting HTML with actual data removed:
<!-- START Script Block for Chart C0759875001384276032 -->
<div class="table" id="C0759875001384276032Div">
Chart.
</div>
<script type="text/javascript">
//<![CDATA[
//Instantiate the Chart
var chart_C0759875001384276032 = new FusionCharts(...);
chart_C0759875001384276032.setTransparent("false");
//Provide entire XML data using dataXML method chart_C0759875001384276032.setDataXML(...) //Finally, render the chart. chart_C0759875001384276032.render("C0759875001384276032Div"); //]]> </script> <!-- END Script Block for Chart C0759875001384276032 --> <!-- START Script Block for Chart C0759875001384276032 --> <div class="table" id="C0759875001384276032Div"> Chart. </div> <script type="text/javascript"> //<![CDATA[ //Instantiate the Chart var chart_C0759875001384276032 = new FusionCharts(...); chart_C0759875001384276032.setTransparent("false");
//Provide entire XML data using dataXML method chart_C0759875001384276032.setDataXML(...) //Finally, render the chart. chart_C0759875001384276032.render("C0759875001384276032Div"); //]]> </script> <!-- END Script Block for Chart C0759875001384276032 --></div>