multiple flash charts in one report

(3 posts) (2 voices)

Tags:

No tags yet.

  1. Tim, Member

    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>

  2. myDBR Team, Key Master

    The ID was generated using a timestamp from OS. Looks like your server does not update the timestamp. We've now changed the way the ID is generated ensuring unique ID's in all servers.

    Use of flash charts are not really recommended as their functionality quite limited. If you want to have good looking charts you might want to use SVG as the chart format.

    --
    myDBR Team

  3. Tim, Member

    Thank you so much for the super fast solution! It's working well now.

    I agree with you that chartdirector offers better functionality, but these shiny flash animations that fusioncharts does, are ideal to impress marketing departements and big bosses ;-)

    Maybe you should think about supporting html5/javascript animated charts in the future :-)


Reply

You must log in to post.