bobotime Report post Posted May 18, 2011 Hello guys, I wanted to create this widget with PHP, because it does not work with this code? I do like to display readings with php and MySQL? thank you very much <?php $query= "SELECT COUNT(CODE_A) AS TOT_A, COUNT(CODE_ AS TOT_B FROM CUSTOMER"; $result=mysql_query($query) or die("Query fallita".mysql_error()." ".$query); $ors = mysql_fetch_array($result); $perc_= $ors_2['TOT_B'] / $ors['TOT_A'] * 100; $perc = number_format($perc_, 0, '.', ''); $strXML = "<Chart bgColor='FFFFFF' bgAlpha='0' showBorder='0' upperLimit='100' lowerLimit='0' gaugeRoundRadius='5' chartBottomMargin='10' ticksBelowGauge='0' showGaugeLabels='0' valueAbovePointer='0' pointerOnTop='1' pointerRadius='9'>"; $strXML .= "<colorRange>"; $strXML .= "<color minValue='0' maxValue='100' name='GOOD' />"; $strXML .= "<color minValue='35' maxValue='70' name='WEAK' />"; $strXML .= "<color minValue='70' maxValue='100' name='BAD' />"; $strXML .= "</colorRange>"; $strXML .= "<value>" . $perc . "</value>"; $strXML .= "<styles>"; $strXML .= "<definition>"; $strXML .= "<style name='ValueFont' type='Font' bgColor='333333' size='10' color='FFFFFF'/>"; $strXML .= "</definition>"; $strXML .= "<application>"; $strXML .= "<apply toObject='VALUE' styles='valueFont'/>"; $strXML .= "</application>"; $strXML .= "</styles>"; $strXML .= "</chart>"; echo renderChart("swf/HLinearGauge.swf", "", $strXML, "PERC_CUST", 250, 50, false, false, true); ?> Share this post Link to post Share on other sites
FusionCharts Support Report post Posted May 18, 2011 Hi, Please note that to provide value to the HLinearGauge you need to use <pointer> element. e.g., <pointers> <pointer value='92' /> </pointers> Please check: http://www.fusioncharts.com/widgets/docs/Contents/Linear_Create.html http://www.fusioncharts.com/widgets/docs/Contents/Linear_XML.html Share this post Link to post Share on other sites
bobotime Report post Posted May 20, 2011 Please note that to provide value to the HLinearGauge you need to use <pointer> element. I do not understand why the graph HLinearGauge.swf the example of XML code in the official documentation is this? <Chart bgColor='FFFFFF' bgAlpha='0' showBorder='0' upperLimit='100' lowerLimit='-50' gaugeRoundRadius='5' chartBottomMargin='10' ticksBelowGauge='0' showGaugeLabels='0' valueAbovePointer='0' pointerOnTop='1' pointerRadius='9'> <colorRange> <color minValue='0' maxValue='100' name='GOOD' /> <color minValue='35' maxValue='70' name='WEAK' /> <color minValue='70' maxValue='100' name='BAD' /> </colorRange> <value>-11</value> <styles> <definition> <style name='ValueFont' type='Font' bgColor='333333' size='10' color='FFFFFF'/> </definition> <application> <apply toObject='VALUE' styles='valueFont'/> </application> </styles> </Chart> anyway I do not work either with the pointer . Share this post Link to post Share on other sites
Guest Angshu Report post Posted May 21, 2011 Hi, We have kept this for backward compatibility. However, it would be helpful if you can please show us your issue through screenshot. Awaiting for your response. Share this post Link to post Share on other sites