rohit111111

Drilldown of Chart

Recommended Posts

Hello,

 

How we can drilldown through any chart and the chart coming next on click of any particular point on previous chart will be of any type of chart (By passing Xml string instead of Xml file path/url) ?

 

Thanks,

Rohit

Edited by rohit111111

Share this post


Link to post
Share on other sites

Hi Rohit,

 

If you want the descendant chart to replace the parent chart, then you may use Linked charts. Refer : http://docs.fusioncharts.com/charts/contents/JavaScript/JS_LinkedCharts.html

 

If you want to change the chart type of descendant chart, then you need to use the function "configureLink()". The 'configureLink()' function is used to configure each level of descendant chart. For more information on configurelink, please visit-http://docs.fusioncharts.com/charts/contents/index.html?JavaScript/API/Methods.html#configurelink
 
Also, if you want to provide linked data using XML string rather than URL, then you may use the method setXMLData(). Refer: http://docs.fusioncharts.com/charts/contents/FirstChart/DataXML.html
 
Please find an attached sample of StackedColumn3D chart drilled down to Column 2D chart. Please click on Product A from category Jan to open a Column2D chart.
 
Hope this helps.

configure link Drill down.zip

Share this post


Link to post
Share on other sites

Hi Rohit,

 

The above given sample uses "configureLink" for drilling down through JavaScript linked charts.

 

If you want to use Linked charts with Flash variant, and have multiple drill downs with each level drilling down to a different chart type, then try this:

 

Eg.
myChart.configureLink(
     [ {swfUrl: 'Charts/Bar2D.swf'},
       {swfUrl: 'Charts/Pie2D.swf'},
       {swfUrl: 'Charts/Line.swf'}, 
       {swfUrl: 'Charts/Area.swf'}
     ] 
    );
 
 
Hope this helps.

Share this post


Link to post
Share on other sites

Hi

 

I am using fusion chart trial version. Is there any possibility of using x-axis label as link attribute in drill down linked chart(In multiLine chart) ?

 

If yes,Then please give me some example how to use that.

 

if no, Then tell me how to achieve that in linked chart with x axis label.

 

Thanks,

Share this post


Link to post
Share on other sites

Hi,

 

I am new to Fusion Chart & using free version of it. I need to add links(drill down) on X-axis labels for a Multi Line Chart. I can do it by clicking on the plotted values for Pie & Bar Chart, but I need it with the Multi Line Chart on X-Axis labels. Is it possible to do it using Fusion Chart. Thanks.

Share this post


Link to post
Share on other sites

Hello,

 

I wan to ask you that, you have written like this in your demo project for one level drilldown:

 

 var myChart = new FusionCharts( "StackedColumn3D","myChartId", "600", "500", "0", "1" );
  myChart.setXMLData(xmldata);
  myChart.render("chartdiv");
 
  FusionCharts("myChartId").configureLink (
  {
    type : "Column2D",
    overlayButton:
    {  
      message: 'Back',
      fontColor : '880000',
      bgColor:'FFEEEE',
      borderColor: '660000',
    }
  }, 0);

 

You have specifed type as column2D, so that coming chart is column2d chart. So, if we want three level drilldown then where we have to specify column type?

 

And for the swf url you mentioned in above post, if drill down is upto four levels then according to order of swf url you placed(In configurelink method) will mapped accordingly to each level of drill down chart?

 

Thanks,

Rohit

Edited by rohit111111

Share this post


Link to post
Share on other sites

Can we configure "type" or, "swfurl" property of configurelink for each link on any chart or, its drilldown chart?

 

So, that on each link click we can open another type of chart different from its parent chart(for drilldown)?

 

Thanks,

Edited by rohit111111

Share this post


Link to post
Share on other sites

Hi,

 

@Momi and tutibordoloi : please refer the link : http://forum.fusioncharts.com/topic/14980-x-axis-labels-as-links-using-json/

 

@Rohit: Please find the answers below:

 

1. You have specifed type as column2D, so that coming chart is column2d chart. So, if we want three level drilldown then where we have to specify column type?

Ans:  As said in my previous post, if you have multiple levels of drill down each opening a new chart type, then use "swfUrl" (for Flash chart) or "type" (for JS chart) multiple times. 

 

2. And for the swf url you mentioned in above post, if drill down is upto four levels then according to order of swf url you placed(In configurelink method) will mapped accordingly to each level of drill down chart?

Ans: Yes.  Please refer configureLink() at http://docs.fusioncharts.com/charts/contents/index.html?JavaScript/API/Methods.html

 

3. Can we configure "type" or, "swfurl" property of configurelink for each link on any chart or, its drilldown chart?  So, that on each link click we can open another type of chart different from its parent chart(for drilldown)?

Ans: If you want to open different chart types on click of different links in the same chart, then you will have to use Drill down feature with JavaScript function instead of using Linked charts. On click of each link, you may call a JavaScript function, which opens a new chart with the desired chart type. For information on using JavaScript functions as links, refer : http://docs.fusioncharts.com/charts/contents/index.html?DrillDown/JavaScript.html

 

Hope this helps.

Share this post


Link to post
Share on other sites

Thanks for your help.

 

 

Can you please let me know whether fusion chart api provides export functionality for drilldown charts if we goes upto nth level? so, that all charts upto we goes come into one file i.e. jpg or pdf.

 

And, also let me know how we set type option of configurelink for each link in chart and upto 4 level of drilldown if possible instead of using javascript function and disposing parent chart to replace it with new chart.

 

Thanks,

Rohit

Edited by rohit111111

Share this post


Link to post
Share on other sites

Hi,

 

The following method is not working for configuring each link on chart. Could you provide me a demo for this?

 

  FusionCharts("myChartId").configureLink(
     [ {swfUrl: 'Charts/Bar2D.swf'},
       {swfUrl: 'Charts/Pie2D.swf'},
       {swfUrl: 'Charts/Line2D.swf'},
       {swfUrl: 'Charts/Area2D.swf'}
     ]
    );

 

 

Thanks,

Rohit

Share this post


Link to post
Share on other sites

Sorry to say that but your demo sample for drill-down, which you have given above is not working. When I click on bar for 2004 year, it doesn't load anything and remains as usual. Please look into this.

 

Thanks,

Rohit

Edited by rohit111111

Share this post


Link to post
Share on other sites

Can you please let me know whether fusion chart api provides export functionality for drilldown charts if we goes upto nth level? so, that all charts upto we goes come into one file i.e. jpg or pdf.

Share this post


Link to post
Share on other sites

Hi,

 

1. Sorry to say that but your demo sample for drill-down, which you have given above is not working. When I click on bar for 2004 year, it doesn't load anything and remains as usual. Please look into this.

>> You need to host the sample on a server. You may then use localhost on your machine to run it.

 

Many browsers restrict JavaScript from accessing local file system owing to security reasons. If you run the files from a server, it will run absolutely fine, though. 

 

2. Can you please let me know whether fusion chart api provides export functionality for drilldown charts if we goes upto nth level? so, that all charts upto we goes come into one file i.e. jpg or pdf.

>> Each chart in the drill down can be exported separately. It is not possible to obtain all the charts present in linked charts in one single Image/PDF, as of now.

 

Hope this helps.

Share this post


Link to post
Share on other sites

Thanks for your reply.

 

1. Can we have a button on chart like back button which is shown if we drill to some level of chart?.  As, now I am disposing parent chart and rendering new chart using javacript function. So, I need a button on which I will render parent chart again and dispose the child chart.

 

Is this possible to have button on chart?

 

 

2. In our application Charts Id and Charts are creating dynamically. So, when I am drilling a chart using js function and disposing parent chart and rendering new chart, I want the same div id in which parent chart is rendering. So can we do this? As in jquery, if we set 'this' (without quotes) as a parameter to function and bind this function to any element click attribute then we can get current element reference. You can check below:

 

For example:

 

<a onclick='GetId(this)'>Call</a>

 

function GetId(ref)

{

alert($(ref).text());

}

 

 

Can we do same like above function to get the reference of current element?

 

Thanks,

Rohit

Edited by rohit111111

Share this post


Link to post
Share on other sites

Hi,

 

1. Can we have a button on chart like back button which is shown if we drill to some level of chart?.  As, now I am disposing parent chart and rendering new chart using javacript function. So, I need a button on which I will render parent chart again and dispose the child chart.

Is this possible to have button on chart?

Ans: No, it is not possible to have a button over a chart.

 

2. In our application Charts Id and Charts are creating dynamically. So, when I am drilling a chart using js function and disposing parent chart and rendering new chart, I want the same div id in which parent chart is rendering. So can we do this?

Ans:  Yes, after disposing the chart, it is possible to create the new chart with the same ID.

 

3. Can we do same like above function to get the reference of current element?

Ans: Yes, you may refer to the chart container in the similar way but using quotes.

 

Ref.

$("#chartContainer").updateFusionCharts({ swfUrl: "../../../Charts/Pie3D.swf" });
 
 
Hope this helps.

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