Creating Drill-down charts |
In our previous example, we had used FusionCharts XT to plot a chart using data stored in database. We will now extend that example itself to create a drill-down chart which can show more information. If you recall from previous example, we were showing the sum of factory output in a pie chart as under: |
![]() In this example, we will extend this example, so that when users click on a pie slice for a factory, they can drill down to see date wise production for that factory. |
Setting up the pie chart for Link |
To set up the pie chart to enable links for drill-down involves just minor tweaking of our previous BasicDBExample.php. We basically need to add the link attribute for each <set> element. We create a new page Default.php from the previous page in DBExample folder with the following code changes: |
<?php |
As you can see in the code above, we are doing the following:
Let's now shift our attention to Detailed.php page. |
Creating the detailed data chart page |
The page Detailed.php contains the following code: |
<?php |
In this page, we are:
When you now run the app, you will see the detailed page as under: |
![]() |