safadig

Members
  • Content count

    39
  • Joined

  • Last visited

Everything posted by safadig

  1. Can this be applied to Angular charts? I tried this, but did not seem to have an effect: $strXML .= "<colorRange><color minValue='0' maxValue='200' code='96C900'/><color minValue='200' maxValue='400' code='618200'/><color minValue='400' maxValue='600' code='FFFB14'/><color minValue='600' maxValue='800' code='EBEB13'/><color minValue='800' maxValue='1000' code='C90000'/><color minValue='1000' maxValue='4000' code='FF0000'/></colorRange>"; $strXML .="<annotations><annotationGroup id='Grp2' showBelow='1'><annotation type='rectangle' x='$gaugeStartX' y='$gaugeStartY' toX='$gaugeEndX' toY='$gaugeEndY' fillColor='678000,FCEF27,E00000'/> </annotationGroup>"; $strXML .="</annotations>";
  2. how to add a link in caption

    FIXED!!! I had to add <colorrange> after my DB queries and not before Hope this can be of help for others that may face this problem... Thanks for the help Ghassan
  3. how to add a link in caption

    I can get my Bullet chart to render fine (including my database data value and target BUT WITHOUT the color range. As soon as I place the <colorRange> I get the invalid data error. I tried different versions of the I place after the <chart> $StrXML A) $strXML = "<chart paletteThemeColor='669933' palette='2' lowerLimit='0' upperLimit='100' caption='Dr_Safadi' showValue='0'>"; $strXML .= "<colorRange>"; $strXML .= "<color minValue='0' maxValue='20' />"; $strXML .= "<color minValue='20' maxValue='50' />"; $strXML .= "<color minValue='50' maxValue='100' />"; $StrXML .="</colorRange>"; $strXML = "<chart lowerLimit='0' upperLimit='100' caption='Dr_Safadi' showValue='1'>"; $strXML .= "<colorRange>"; $strXML .= "<color minValue='0' maxValue='20' code='3BFF46'/>"; $strXML .= "<color minValue='20' maxValue='50' code='FFF057'/>"; $strXML .= "<color minValue='50' maxValue='100' code='FF0000'/>"; $StrXML .="</colorRange>"; I tried code instead the word color. I tried with palette instead of individual color but still Thanks
  4. how to add a link in caption

    here is the source code from above. Data seem to pull OK. It seems the problem is with colorrange.. <html> <head> <title>Graph</title> <script type="text/javascript" src="Fusion/Widgets/FusionCharts.js"></script> <meta charset='utf-8'> </head> <body> <!-- START Code Block for Chart brick1--> <div id="brick1Div">Chart</div> <script type="text/javascript" ><!-- // Instantiate the Chart if ( FusionCharts("brick1") && FusionCharts("brick1").dispose ) FusionCharts("brick1").dispose(); var chart_brick1 = new FusionCharts( { "swfUrl" : "Fusion/Widgets/HBullet.swf", "width" : "60%", "height" : "20%", "renderAt" : "ragweedDiv", "renderer" : "javascript", "dataFormat" : "xml", "id" : "ragweed", "dataSource" : "<chart lowerLimit='0' upperLimit='100' caption='Dr. Safadi' showValue='1'><colorRange><color minValue='0' maxValue='20' color='3BFF46'/><color minValue='20' maxValue='50' color='FFF057'/><color minValue='50' maxValue='100' color='FF0000'/><set target='98'/></target><value><set value='34'/></value></chart>" } ).render(); // --></script> <!-- END Script Block for Chart brick1 --> </body> </html>
  5. how to add a link in caption

    Updated but still "Invalid data error".. <?php include("./includes/FusionCharts.php"); include("./includes/DBConn.php"); ?> <html> <head> <title>Graph</title> <script type="text/javascript" src="Fusion/Widgets/FusionCharts.js"></script> <meta charset='utf-8'> </head> <body> <?php // Connect to the Database $link = connectToDB(); //Generate the graph element $strXML = "<chart lowerLimit='0' upperLimit='100' caption='Dr. Safadi' showValue='1'>"; $strXML .= "<colorRange>"; $strXML .= "<color minValue='0' maxValue='20' color='3BFF46'/>"; $strXML .= "<color minValue='20' maxValue='50' color='FFF057'/>"; $strXML .= "<color minValue='50' maxValue='100' color='FF0000'/>"; $StrXML .="</colorRange><target>"; $strXML .="<set target='98'/>"; $strXML .="</target>"; $strQuery = "select brick1FROM Counts"; $result = mysql_query($strQuery) or die(mysql_error()); if ($result) { while ($row_strQuery = mysql_fetch_assoc($result)){ $strXML .="<value>"; $strXML .="<set value='" . $row_strQuery['brick1'] . "'/>"; } $strXML .="</value>"; } //Finally, close <graph>element $strXML .="</chart>"; //Create the chart with data from $strXML FC_SetRenderer("javascript"); echo renderChart("Fusion/Widgets/HBullet.swf", "", $strXML, "brick1", "60%", "20%",false,true,false); ?> </body> </html>
  6. how to add a link in caption

    Thanks That helped ..but now getting "invalid data" source shows database link working fine..My guess, I am missing something in the color $StrXML rendering... Thanks $strXML = "<chart lowerLimit='0' upperLimit='100' caption='BulletChart' subcaption='' numberprefix='' numbersuffix='' showValue='1'>"; $strXML .= "<colorrange>"; $strXML .= "<color minvalue='0' maxvalue='20' color='A6A6A6'/>"; $strXML .= "<color minvalue='20' maxvalue='50' color='CCCCCC'/>"; $strXML .= "<color minvalue='50' maxvalue='100' color='E1E1E1'/>"; $StrXML .="</colorrange><value><target>"; $strXML .="<set target='95'/>"; $strXML .='</target>'; $strQuery = "select * FROM tables"; $result = mysql_query($strQuery) or die(mysql_error()); if ($result) { while ($row_strQuery = mysql_fetch_assoc($result)){ $strXML .="<set value='" . $row_strQuery['test1'] . "'/>"; } $strXML .='</value>'; } $strXML .="</chart>";
  7. how to add a link in caption

    Expanding on my project..trying to get an HBullet.swf chart on single data result but getting error that Chart type not supported. Thanks for the help.. <?php include("./includes/FusionCharts.php"); include("./includes/DBConn.php"); ?> <html> <head> <title>HBullet Chart</title> <script type="text/javascript" src="Fusion/Charts/FusionCharts.js"></script> </head> <body> <?php // Connect to the Database $link = connectToDB(); //Generate the graph element $strXML = "<chart lowerLimit='0' upperLimit='100' caption='testchart' showValue='1'>"; $StrXML = "<colorRange>"; $StrXML = "<color minValue='0' maxValue='50' color='A6A6A6'/>"; $StrXML ="<color minValue='50' maxValue='500' color='CCCCCC'/>"; $StrXML ="<color minValue='500' maxValue='5000' color='E1E1E1'/>"; $StrXML .="</colorRange>"; $strQuery = "select brick1 FROM Counts WHERE date = (SELECT MAX(date) FROM Counts)"; $result = mysql_query($strQuery) or die(mysql_error()); if ($result) { while ($row_strQuery = mysql_fetch_assoc($result)){ $strXML .="<value>"; $strXML .="<set value='" . $row_strQuery['brick1'] . "'/>"; } $strXML .='</value>'; } //Finally, close <graph>element $strXML .="</chart>"; //Create the chart with data from $strXML FC_SetRenderer("javascript"); echo renderChart("Fusion/Widgets/HBullet.swf", "", $strXML, "brick1", "400", "400",false,true,true); ?> </body> </html>
  8. javascript chart don't works !

    "New line characters in XML/JSON string cause JavaScript error" I need to include New line Character in caption... ( for Java rendering) $StrXML = <Chart caption = I need New line Does not work I can get it to work in Chrome and Firefox, but not on my Ipad and Iphone (Safari), If I use \\n Thanks
  9. how to add a link in caption

    Thanks!. It worked..
  10. how to add a link in caption

    I am not sure if it would be possible to add database data to caption?/ $strXML = "<chart caption='Airborne Allergens Levels' subcaption= 'Toledo, OHIO Last Count on: ' $strQuery7 = "SELECT DATE_FORMAT(date, '%W [%M %d, %Y]') AS Formated_date FROM Counts WHERE date = (SELECT MAX(date) FROM Counts)"; $result7 = mysql_query($strQuery7) or die(mysql_error()); So that my caption would read: "Airborne Allergen Levels Toledo, Ohio Last Count on: Saturday October 5, 2013" I can get an echo statement to print 'Formated_date' correctly outside the Chart but not within caption, subcaption or other areas in the chart I tried echo and other tricks but have not been successful..Help is appreciated