You are viewing documentation for an older version. For current documentation - click here.

FusionCharts v3 offers Stacked Chart – a type of Multi-series chart where multiple datasets are stacked one above the other. Have a look at the image below to have an idea how a Stacked Chart looks like:

Before you go further with this page, we recommend you to please see the previous pages Creating First Chart & Creating Multi-series chart as we start off from concepts explained in that page.

The process of generating Stacked chart is same as Multi-series chart. The only difference is here we need to specify a different chart type. Open and modify the Multi-series chart you have created in the previous page like this:

<?php
      # Include  FusionCharts PHP Class
   include('../Class/FusionCharts_Gen.php');
      # Create Stacked Column3D chart object using FusionCharts PHP Class 
   $FC = new  FusionCharts("StackedColumn3D","350","300");   
    ...      

As you can see, while creating the chart object, we have only changed the chart type to stackedColumn3D

$FC = new FusionCharts("StackedColumn3D","350","300");

This does the trick and you will see that, instead of a multiseries chart, we render a stacked chart.

Please go through FusionCharts PHP Class API Reference section to know more about the functions used in the above code.

Here comes the output: