Adding drill-down links to Fusion Charts

By | May 16, 2014

Fusion Charts can be easily and extensively used to create drill-down charts.  Using the drill down functionality provided by Fusion Charts, you can easily produce charts that have “drill down” or “zoom in (data)” capabilities.
In my last blog I had explained how we can generate XML based fusion charts using COM API and .NET API. You can refer below links for the same.
 Related Posts: XML based Fusion Charts using .NET API
In this blog I will explain Simple links feature of Drill Down functionality provided by Fusion Charts. This feature enables Drill-down to open simple URLs.
Let us consider the same example which we had discussed in the above blogs that we want to display the bar chart for forecast achieved in current quarter. In this example, suppose we want to open a new window with some URL when we drill down the chart. To do this, we have to pass one more attribute named as “link” in the “set” element. Below is the reference code for the same.
Code in COM API:
<set label=”October” value=”5000″ link=”n-”/>
Code in .NET API:
XmlElement hedder = docConfig.CreateElement(“set”);
                hedder.SetAttribute(“label”, “October”);
                hedder.SetAttribute(“value”, “5000″);
hedder.SetAttribute(“link”, “n-”);                  docConfig.DocumentElement.PrependChild(hedder);
In the above code, we have to mention the URL after “n-” which we need to open after drill down.
By following above steps, when we drill down the chart it will looks like as follows.