I have some old legacy FusionCharts that use the FusionCharts.php class that I am trying to convert to Javascript. My existing charts were rendered using the renderChartHTML function which appears to have been deprecated. I have converted this to the renderChart function and added the "FC_SetRenderer( "javascript" );" code. Now my charts do not render, and instead just output 'Chart' text.
Here is my PHP code:
include "FusionCharts.php";
FC_SetRenderer( "javascript" );
$strXML = "<chart caption='Time to Create Brief,{br} minutes' palette='3' animation='1' formatNumberScale='0' pieSliceDepth='30' showLegend='1' showLabels='0'>"; $strXML .= "<set label='0-4m' value='".$LessThan4."' link='javascript:TimetoSub04();'/>"; $strXML .= "<set label='5-15m' value='".$LessThan15."' link='javascript:TimetoSub515();;'/>"; $strXML .= "<set label='16-30m' value='".$LessThan30."' link='javascript:TimetoSub1630();'/>"; $strXML .= "<set label='>30m' value='".$GreaterThan30."' link='javascript:TimetoSub30up();'/>"; $strXML .= "</chart>";
echo renderChart("/Fusion/Charts/Charts/Pie2D.swf", "", $strXML, "TimeChart", 200, 200, false, true);
I am not sure if it matters, but this page renders 8 different Pie charts, all with a unique ID.
I have also tried using the jQuery code to convert it to Javascript and that also did not work. I am really scratching my head on this one but I feel liek it has to be something simple. Help!