uselessninja Report post Posted September 14, 2011 Hi i have a code that use single line graph... and i want to change it to dual y axis: I have 3 columns on my database: POWER_GEN_1_VAL0 POWER_GEN_2_VAL0 FOREBAY_ELEV_vAL0 the 2 power gens will be at the yellow line and the forebay will be at violet line.. i try it many times but i always failed heres my code: ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- <?php $conn=odbc_connect('datasourcegaby','',''); $firststring= "Select FOREBAY_ELEV_VAL0,timestamp,POWER_GEN_1_VAL0,POWER_GEN_2_VAL0 FROM generators WHERE convert(datetime,convert(char(10),timestamp,101)) = '$search' "; $rs=odbc_exec($conn,$firststring); $strXML ="<graph caption='RESULT' subCaption=' FOR THIS DAY ' decimalPrecision='3' showNames='0' numberSuffix='' pieSliceDepth='' formatNumberScale='1' >"; while (odbc_fetch_row($rs)) { $g1=odbc_result($rs,"POWER_GEN_1_VAL0"); $g2=odbc_result($rs,"POWER_GEN_2_VAL0"); $timestamp=odbc_result($rs,"timestamp"); $forebayelev=odbc_result($rs,"FOREBAY_ELEV_VAL0"); $timestampx=$timestamp; $strXML .= "<set name='($timestampx) || (GEN 1)' value='$g1' />"; $strXML .= "<set name='($timestampx) || (GEN 2)' value='$g2' />"; $strXML .= "<set name='($timestampx) || (FOREBAYELEV)' value='$forebayelev' color='525252'/>"; } $strXML .= "</graph>"; //Create the chart - Column 3D Chart with data from strXML variable using dataXML method echo renderChartHTML("../../FusionCharts/FCF_Line.swf", "", $strXML, "generators", 1350, 500, false); ?> Share this post Link to post Share on other sites
Guest Angshu Report post Posted September 14, 2011 Hi, Thanks for your post. You would need to change the swf file type in your code. For ex: echo renderChartHTML("../../FusionCharts/FCF_Line.swf", "", $strXML, "generators", 1350, 500, false); change this to: echo renderChartHTML("../../FusionCharts/FCF_MSColumn3DLineDY.swf , "", $strXML, "generators", 1350, 500, false); For more details, please visit: http://www.fusioncha...s/CombiXML.html Hope this helps. Share this post Link to post Share on other sites
uselessninja Report post Posted September 15, 2011 Hi, Thanks for your post. You would need to change the swf file type in your code. For ex: echo renderChartHTML("../../FusionCharts/FCF_Line.swf", "", $strXML, "generators", 1350, 500, false); change this to: echo renderChartHTML("../../FusionCharts/FCF_MSColumn3DLineDY.swf , "", $strXML, "generators", 1350, 500, false); For more details, please visit: http://www.fusioncha...s/CombiXML.html Hope this helps. uhhmmm .... can i do it with FCF_MSLine.swf chart? ... Coz MSColumn3DLineDY chart is not the right chart........i mean the data from my database is about electricity and i think MSLine is the right one..... Share this post Link to post Share on other sites
Guest Angshu Report post Posted September 15, 2011 Hi, Thanks for your response. I am afraid, MSLine chart does not suppport dual Y axis, at this time. Hope this helps. Share this post Link to post Share on other sites
uselessninja Report post Posted September 15, 2011 Hi, Thanks for your response. I am afraid, MSLine chart does not suppport dual Y axis, at this time. Hope this helps. ohhh so sad but thankzz though... ill find another way... : ) Share this post Link to post Share on other sites
Guest Angshu Report post Posted September 16, 2011 Hi, Glad to know that you have managed to resolve your purpose. Happy FusionCharting! Share this post Link to post Share on other sites