sbambina

Members
  • Content count

    1
  • Joined

  • Last visited

Everything posted by sbambina

  1. hi i want to create a multiserie chart but this code is not true in sigle serie the code is good but i want a multiserie thanks for your help ?php //In this example, we show how to connect FusionCharts to a database. //For the sake of ease, we've used an MySQL databases containing two //tables. // Connect to the DB $link = connectToDB(); //We also keep a flag to specify whether we've to animate the chart or not. //If the user is viewing the detailed chart and comes back to this page, he shouldn't //see the animation again. //$animateChart = $_GET['animate']; //Set default value of 1 // if ($animateChart=="") // $animateChart = "1"; //$strXML will be used to store the entire XML document generated //Generate the chart element $strXML = "<chart caption='Intervention' subCaption='Par Mois' xAxisName='' showBorder='1' formatNumberScale='0' showValues='1' numberSuffix='' animation=' " . $animateChart . "'>"; // Fetch all factory records $strQuery = "select * from delai_inter " ; $result = mysql_query($strQuery) or die(mysql_error()); //Iterate through each factory if ($result) { while($ors = mysql_fetch_array($result)) { //Here, we convert date into a more readable form for set label. //$strXML .= "<set label='" . datePart("d",$ors['DatePro']) . "/" . datePart("m",$ors['DatePro']) . "' value='" . $ors['Quantity'] . "'/>"; $strXML .= "<set label='". $ors['mois'] . "' value='" . $ors['4h'] ."'/>"; $strXML .= "<set label='". $ors['mois'] . "' value='" . $ors['8h'] . "'/>"; $strXML .= "<set label='". $ors['mois'] . "' value='" . $ors['+8h'] . "'/>"; //$strXML .= "<set label='". $ors['mois'] "'/>"; // $strXML .= "<set value='". $ors['8h'] "'/>"; // $strXML .= "<set value='". $ors['+8h'] "'/>";- // $strXML .= "<set label= '" value='" . $ors['Quantity'] . "'/>"; } } mysql_close($link); //Finally, close <chart> element $strXML .= "</chart>"; //Create the chart - Pie 3D Chart with data from strXML echo renderChart("../../FusionCharts/mscolumn3D.swf", "", $strXML, "NewChart", 650, 300, false,false); ?> <BR><BR> </CENTER> </BODY> </HTML>