Eilons

Members
  • Content count

    6
  • Joined

  • Last visited

About Eilons

  • Rank
    Forum Newbie
  1. Linked Charts With Php

    Hi, first of all thank you for your answer! I attached some screenshots and a view source image. I think that there is a problem in the connection between the two pages because it's not Generating an xml file at all.
  2. Linked Charts With Php

    Hi! Thank you for your quick answer. you suggested me to handle the line with <chart></chart> but it was wirten in the tutorial that <chart></chart> used for initalization and by writting "DonationByYear" it's calling to the script function to generate the xml file. Am i missing something in this tutorial? http://docs.fusioncharts.com/charts/?PHP_DB.html
  3. Hey everyone! I have got a question about linked charts (combination charts) with database. I read the tutorial in this topic in [url="http://docs.fusioncharts.com/charts/?PHP_DB.html"]http://docs.fusioncharts.com/charts/?PHP_DB.html[/url] and i cant understand why it is not showing the two charts on the same page when I pressed. Here is my code: (I have alreday checked all my queary and it's working fine) <?php include("../../FusionCharts_Evaluation/Code/PHP/Includes/FusionCharts.php"); include("Functions.php"); include '../../func/form_function.php' ; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[url="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/url]"> <HTML> <head> <title>תרומות לפי התפלגות שנים </title> <link rel="stylesheet" type="text/css" href="../../STYLE/style_chart.css"/> <link rel="stylesheet" type="text/css" href="../../STYLE/style_button.css"/> <script LANGUAGE="Javascript" SRC="../../FusionCharts_Evaluation/Charts/FusionCharts.js"></SCRIPT> <script LANGUAGE="JavaScript"> function updateChart(factoryIndex){ var strURL = "ChartByYearData.php?year=" + factoryIndex; FusionCharts("DonationByYear").setXMLUrl(strURL); } </SCRIPT> </head> <body DIR="RTL" > <CENTER> <?PHP date_default_timezone_set('Asia/Tel_Aviv'); $year1=$_GET["year1"]; $year2=$_GET["year2"]; $strXML="<chart caption=' $year2 :לבין $year1 :סך תרומות בשקלים בין ' formatNumberScale='0' yAxisMaxValue='1' numberPrefix='שח' xAxisName='שנים' yAxisName='תרומות' centerYaxisName='0' baseFontSize='15'>"; $data=DonationAmountYear($year1,$year2); $labels=array(); for ($LowYear=$year1; $LowYear<=$year2; $LowYear++) { $labels[]= $LowYear; } for ($LowYear=$year1; $LowYear<=$year2; $LowYear++) { $links[]= $LowYear; } for($i=0; $i< sizeof($data); $i++) { $strXML .= "<set label='" . $labels[$i] . "' value='" . $data[$i] . "' link='javaScript:updateChart(" . $links[$i] . ")'/>"; } //Close <chart> element $strXML .= "</chart>"; echo renderChart("../../FusionCharts_Evaluation/Code/FusionCharts/Column3D.swf", "", $strXML, "DonationByRangeYear", 700, 500, false, true); echo renderChart("../../FusionCharts_Evaluation/Code/FusionCharts/Column3D.swf?ChartNoDataText=לחץ על שנה בגרף למעלה כדי להציג פירוט לפי חודשים.", "", "<chart></chart>", "DonationByYear", 600, 250, false, true); mysql_close($dbcnx); ?> </center> <div class="buttonwrapper"> <a class="ovalbutton" href="DisplayOptions.html" style="margin-left: 6px"><span>חזרה</span></a> </div> </body> </html> ***The javascript calling to this page: <?php include("../../FusionCharts_Evaluation/Code/PHP/Includes/FusionCharts.php"); include("Functions.php"); include '../../func/form_function.php' ; date_default_timezone_set('Asia/Tel_Aviv'); $year=$_GET['year']; $strXML="<chart palette='2' caption=' $year :בשנת בשקלים תרומות סך ' formatNumberScale='0' yAxisMaxValue='1' numberPrefix='שח' xAxisName='חודשים' yAxisName='תרומות' centerYaxisName='0' baseFontSize='15'>"; $data=DonationAmount($year); $labels[0]="Jan"; $labels[1]="Feb"; $labels[2]="Mar"; $labels[3]="Apr"; $labels[4]="May"; $labels[5]="Jun"; $labels[6]="Jul"; $labels[7]="Aug"; $labels[8]="Sep"; $labels[9]="Oct"; $labels[10]="Nov"; $labels[11]="Dec"; for($i=0; $i< sizeof($data); $i++) { $strXML .= "<set label='" . $labels[$i] . "' value='" . $data[$i] . "' />"; } //Close <chart> element $strXML .= "</chart>"; echo $strXML; mysql_close($dbcnx); ?> this is a picture of what i'm getting after pressing the link: THANKS!!!
  4. Scrollcolumn2D With My Sql

    Thank you very much it's working!! You were right, the problem was that the XML data has not been properly defined.
  5. Scrollcolumn2D With My Sql

    Hi! first of all thank you for your answer! Here is the generated XML code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR...ransitional.dtd"> <HTML> <head> <title> </title> <script LANGUAGE="Javascript" SRC="FusionCharts_Evaluation/Charts/FusionCharts.js"></SCRIPT> </head> <body>   <!-- START Code Block for Chart FactorySum --> < div id="FactorySumDiv">Chart</div> < script type="text/javascript" ><!-- // Instantiate the Chart if ( FusionCharts("FactorySum") && FusionCharts("FactorySum").dispose ) FusionCharts("FactorySum").dispose(); var chart_FactorySum = new FusionCharts( { "swfUrl" : "FusionCharts_Evaluation/Charts/ScrollColumn2D.swf", "width" : "600", "height" : "300", "renderAt" : "FactorySumDiv", "dataFormat" : "xml", "id" : "FactorySum", "dataSource" : "<chart caption='Business Results 2005 v 2006' xAxisName='Month' yAxisName='Revenue' showValues='0' numberPrefix='$' useRoundEdges='1' legendBorderAlpha='100' showBorder='0' bgColor='FFFFFF,FFFFFF' ><category label='Jan' value='2' /><category label='Feb' value='3' /><category label='Mar' value='0' /><category label='Apr' value='1' /><category label='May' value='0' /><category label='Jun' value='0' /><category label='Jul' value='0' /><category label='Aug' value='2' /><category label='Sep' value='2' /><category label='Oct' value='0' /><category label='Nov' value='0' /><category label='Dec' value='2' /></chart>" } ).render(); // --> </script> <!-- END Script Block for Chart FactorySum -->   </ body> </html> one more thing, where can I find an example of a proper XML for scrollcolumn2D?? Thanks!
  6. Hey everyone! I read alot of comments and posts about this subjects but I still can't to make it working. I'm trying to make ScrollColumn2D with Month as Xaxisname and revenue in Yaxisname. I'm doing an sql query and it's work but i cant pass the parameter with xml data to the chart. the code: <?php include("FusionCharts_Evaluation/Code/PHP/Includes/FusionCharts.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <HTML> <head> <title> </title> <script LANGUAGE="Javascript" SRC="FusionCharts_Evaluation/Charts/FusionCharts.js"></SCRIPT> </head> <body> <?PHP $host="localhost"; $user="root"; $password=""; $database="my_db"; // connect to database mysql_connect($host, $user, $password) or die ('Unable to connect to server.'); mysql_select_db($database) or die ('Unable to select database.'); date_default_timezone_set('Asia/Tel_Aviv'); /*$year=$_POST["year"];*/ $StartYear= date("2011-01-01"); $EndYear= date("2011-12-31"); $strXML="<chart caption='Business Results 2005 v 2006' xAxisName='Month' yAxisName='Revenue' showValues='0' numberPrefix='$' useRoundEdges='1' legendBorderAlpha='100' showBorder='0' bgColor='FFFFFF,FFFFFF' >"; $result = mysql_query ("select BEGIN_DATE from linkage where BEGIN_DATE >= '$StartYear' AND BEGIN_DATE <= '$EndYear' order by BEGIN_DATE"); if (mysql_num_rows($result)>1) /*due to the fact that mysql_data_seek rerutn error if there is no result returned*/ { $j=0; $data=array(); for($i=1; $i<=12; $i++) { while ($row=mysql_fetch_array($result)){ $RowToDate=strtotime($row['BEGIN_DATE']); $RowToMonth=date('n',$RowToDate); if ($RowToMonth == $i) $j=$j+1; } $data[]=intval($j); $j=0; mysql_data_seek($result, 0); /*in order to go more than once on result*/ } } else $data=array(0,0,0,0,0,0,0,0,0,0,0,0); $labels[0]="Jan"; $labels[1]="Feb"; $labels[2]="Mar"; $labels[3]="Apr"; $labels[4]="May"; $labels[5]="Jun"; $labels[6]="Jul"; $labels[7]="Aug"; $labels[8]="Sep"; $labels[9]="Oct"; $labels[10]="Nov"; $labels[11]="Dec"; for($i=0; $i< sizeof($data); $i++) { $strXML .= "<category label='" . $labels[$i] . "' value='" . $data[$i] . "' />"; } mysql_close(); $strXML .="</chart>"; echo renderChart("FusionCharts_Evaluation/Charts/ScrollColumn2D.swf", "", $strXML, "FactorySum", 600, 300, false, true); ?> </body> </html> please help!