tstellman

scrollcolumn2d with sql query

Recommended Posts

I have successfully created a column2d chart with the code below but when I change the chart type to scrollcolumn2d it doesn't render anything, it just states "no data to display."

 

if ($chartResult) {

$arrData = array(

"chart" => array(

"caption"=> "Sales Trends",

"subcaption"=> "FY 2012 - FY 2013",

"xaxisname"=> "Agency No.",

"yaxisname"=> "Pounds",

"showvalues"=> "1",

"placeValuesInside"=> "1",

"rotateValues"=> "1",

"valueFontColor"=> "#ffffff",

"baseFontColor"=> "#333333",

"baseFont"=> "Helvetica Neue,Arial",

"captionFontSize"=> "14",

"subcaptionFontSize"=> "14",

"subcaptionFontBold"=> "0",

"showborder"=> "0",

"paletteColors"=> "#EED17F,#97CBE7,#074868,#B0D67A,#2C560A,#DD9D82",

"bgcolor"=> "#FFFFFF",

"showalternatehgridcolor"=> "0",

"showplotborder"=> "0",

"labeldisplay"=> "WRAP",

"divlinecolor"=> "#CCCCCC",

"showcanvasborder"=> "0",

"linethickness"=> "3",

"plotfillalpha"=> "100",

"plotgradientcolor"=> "",

"numVisiblePlot"=> "12",

"divlineAlpha"=> "100",

"divlineColor"=> "#999999",

"divlineThickness"=> "1",

"divLineDashed"=> "1",

"divLineDashLen"=> "1",

"divLineGapLen"=> "1",

"scrollheight"=> "10",

"flatScrollBars"=> "1",

"scrollShowButtons"=> "0",

"scrollColor"=> "#cccccc",

"showHoverEffect"=> "1"

)

);

$arrData["data"] = array();

 

while($cRow = mysql_fetch_array($chartResult)) {

array_push($arrData["data"], array(

"label" => $cRow['ProgramNumber'],

"value" => $cRow['SUMTotalAmount'],

"link" => "programreport.php?t=Donor"

)

);

}

 

$jsonEncodedData = json_encode($arrData);

 

$columnChart = new FusionCharts("scrollcolumn2d", "TotalPoundsbyProgramChart" , 800, 300, "TotalPoundsbyProgram", "json", $jsonEncodedData);

 

$columnChart->render();

 

echo("<tr><td><div id='TotalPoundsbyProgram' align='center'><!-- Fusion Charts will render here--></div></td></tr>");

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now