Sign in to follow this  
Sno

MSLine2D not rendering

Recommended Posts

Hi everybody,

 

I try to render a multi series line chart in my page, using 3 php files :

- index.php, wich contains a form to pick up some elements (processes executed in the month, and a period -last hour, last day..),

- processCharts.php, which treat the informations from the form and call the function "renderchartAvgSum(()"

- chartCreation.php, in which i defined the function "renderchartAvgSum()" and which uses "renderChartJS()" from FusionChart. let's see this :

 

chartCreation.php

<?php
require_once("/FusionChartPath/FusionCharts_Gen.php");

/* function renderchartAvgSum() :
 * $chartType : the Chart we  want to build. MSLine, Line etc...
 * $pID : lists of process Ids to find in the database
 * $step : step of xAxis in the cahrt
 * $diffDate : difference in days between $endDate -today- and begin date of process
 * $endDate : ending date of process . generally = SYSDATE
 * $queryValue : what we need (avg by wich time?)
 * $graphW, $graphH : dimensions of chart.
*/
renderchartAvgSum($chartType,$pID,$step, $diffDate, $endDate, $chartName, $queryValue, $graphW, $graphH){
if(!empty($processList)){

}
?>
blabalaaa

post-54350-0-78116000-1377682383_thumb.png

Edited by Sno

Share this post


Link to post
Share on other sites

Sorry, it seems i can't re-edit my topic. Here it is the all one good wrotten.

 

Hi everybody,

 

I try to render a multi series line chart in my page, using 3 php files :

- index.php, wich contains a form to pick up some elements (processes executed in the month, and a period -last hour, last day..),

- processCharts.php, which treat the informations from the form and call the function "renderchartAvgSum(()"

- chartCreation.php, in which i defined the function "renderchartAvgSum()" and which uses "renderChartJS()" from FusionChart. let's see this :

 

chartCreation.php create the function renderchartAvgSum(), by going to the database to get informations and store it into an xml string ($strXML). then, it calls renderChartJS() from FusionCHart_Gen.php.

Here is the xml generated :

<chart caption = 'MyCHartTitle' lineThickness='1' showValues='0' formatNumberScale='1' anchorRadius='2' divLineAlpha='20' divLineColor='CC3300' divLineIsDashed='1' showAlternateHGridColor='1' alternateHGridAlpha='5' alternateHGridColor='CC3300' labelStep='3' numvdivlines='5' chartRightMargin='35' bgColor='FFFFFF,CC3300' bgAngle='270' bgAlpha='10,10'>
<categories>
<category label='20/08/2013 20:08:13'></category>
<category label='20/07/2013 20:08:13'></category>
<category label='20/06/2013 20:08:13'></category>
</categories>
<dataset seriesname='MyProcess01'>
<set value='32'></set>
<set value='42'></set>
<set value='52'></set>
</dataset>
<dataset seriesname='MyProcess02'>
<set value='12'></set>
<set value='22'></set>
<set value='62'></set>
</dataset>
</chart>

To call the renderChartJS() function, i first require FusionChart_Gen.php, and then i do that :
 

$FC= new FusionCharts("MSline2D", $graphW, $graphH);
$FC->setRenderer('javascript');
echo $FC->renderChartJS("http://fusion.hrsys.fr/js/charts/FusionCharts/Charts/".$chartType.".swf", "", $strXML, "", $graphW, $graphH);

Did i do something wrong?
Because no chart are displayed in my browser, only "Chart" text from <div id="chart">. No error occured...

Could you help me please? 

 

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
Sign in to follow this