Din Revah Report post Posted February 27, 2013 I have recently bought the website package of the FusionCharts XT. And I am trying to make myself a "Multi-Series Line 2D Chart" From the "FusionCharts XT Gallery". For some reason I couldn't find any documentation about it in PHP. And I wasn't able to create 2 lines in that graph. How can I make it work? This is the code I was trying: $this->load->plugin( 'fusion' ); $FC = FusionCharts("MSLine","620","400"); $strParam="palette=2;showvalues=1;numvdivlines=10;drawanchors=0;numberprefix=$;divlinealpha=30;alternatehgridalpha=20;setadaptiveymin=1;"; # Set chart attributes $FC->setChartParams($strParam); # Add category names $FC->addCategory("2001"); $FC->addCategory("2002"); $FC->addCategory("2003"); $FC->addCategory("2004"); $FC->addCategory("2005"); # Add category names # Add Multi-series Dataset $FC->createMSStDataset(); # Add Multi-series dataset with in dataset $FC->addMSStSubDataset("Product A", ""); # Add set data for plotting the chart $FC->addChartData("30"); $FC->addChartData("26"); $FC->addChartData("29"); $FC->addChartData("31"); $FC->addChartData("34"); $FC->createMSStDataset(); # Add Multi-series dataset with in dataset $FC->addMSStSubDataset("Product B", ""); # Add set data for plotting the chart $FC->addChartData("1"); $FC->addChartData("6"); $FC->addChartData("123"); $FC->addChartData("4"); $FC->addChartData("132"); echo $FC->renderChart(); Share this post Link to post Share on other sites
Guest Sashibhusan Report post Posted February 28, 2013 Hi, Welcome to FusionCharts Forum. With regard to your issue, since you are rendering "MSLine2D" chart, you would require to build the chart XML/JSON data in the respective format, recommended by FusionCharts. Please follow the below link of "Multi-Series Line Chart Specification sheet > Sample XML Data", for your reference. Link: http://docs.fusioncharts.com/charts/contents/?ChartSS/MSLine.html Please note that you have used "createMSStDataset()" method of FusionCharts PHP Class API, which will create primary dataset for multi-series stacked chart only. Similarly, "addMSStSubDataset()" method adds sub-dataset to multi-series stacked chart's primary dataset created using the createMSStDataset() function. So, Could you please try once by removing the above two methods and provide the data set name in the method "addDataset()"? Please visit the below link of "Creating Multi-series Chart" and follow the sample code provided, to create the chart for your application. Link: http://docs.fusioncharts.com/charts/contents/?guide-for-web-developers/fusioncharts-php-class/MultiSeriesChart.html Also, for more information on "FusionCharts PHP Class API Reference > List of Functions", please follow the link below: http://docs.fusioncharts.com/charts/contents/?guide-for-web-developers/fusioncharts-php-class/Functions.html Hope this helps! Share this post Link to post Share on other sites