safadig

Adding Multi-axis not working in mysql/php mult idata chart

Recommended Posts

Adding the <axis> as strXML prevents the chart from Rendering. 

$strXML .="<axis title='item 2014' tickwidth='10' divlinedashed='1'>";
	$strXML .="<dataset seriesName='item 2014' >";
	 if ($result2) {
          while($ors1 = mysql_fetch_array($result2)) {
           $strXML .= "<set   value='".$ors1['item']."' />";
         }
     }
	 $strXML .= "</dataset>";
	 $strXML .="</axis>";
	 
	 $strXML .="<axis title='item 2015' tickwidth='10' divlinedashed='1'>";
	 $result3 = mysql_query($strQuery15) or die(mysql_error());
	 $strXML .="<dataset seriesName='item 2015'>";
	 if ($result3) {
         while($ors1 = mysql_fetch_array($result3)) {
          $strXML .= "<set   value='".$ors1['item']."' />";
         }
    }
	$strXML .= "</dataset>";
	$strXML .="</axis>";
	
	
	 $strXML .="<axis title='item 2016' numdivlines='10' tickwidth='10' divlinedashed='1'>";
	 $result4 = mysql_query($strQuery16) or die(mysql_error());
	 $strXML .="<dataset seriesName='item 2016'>";
	 if ($result4) {
         while($ors1 = mysql_fetch_array($result4)) {
          $strXML .= "<set   value='".$ors1['item']."' />";
         }
    }
	 
	  
	 	 
           mysql_close($link);
		   
		   
           $strXML .= "</dataset></axis>";

Share this post


Link to post
Share on other sites

Hello,

 
I have tried to create a sample as per your requirement ie. Multi-axis line chart in xml using mysql and it is working as expected from our end.
 
Kindly refer the link below for your implementation.
 
 
Hope this helps,
Thanks

Share this post


Link to post
Share on other sites

Thank you for the sample implementation...

 

Yes it works in "multiaxisline"

 

But unfortunately,  it did not work in "mssplinearea" or "msspline"   That would truly be desirable

Share this post


Link to post
Share on other sites

Hello,


Thanks for replying back.
 
As the xml structure of multi axis line chart and the msspline or mssplinearae chart are not same. 
So the previous code won't work in case of msspline or mssplinearae chart. 
 
I have tried to create a new sample as per the requirement ie. multi series spline chart in xml using database.
 
For any other multi series chart,please change the chart type in the sample.
 
Kindly refer the link below for the implementation.
 
Hope this  helps,
Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now