Sign in to follow this  
daveyoi76

Programatically Trigger Drilldown Event?

Recommended Posts

Hey,

 

Firstly can I say I am having great fun using fusion charts as part of an internal dashboard project, it has made my life so much easier and also impressed a few of the business - so thanks for that ;)

 

I have searched but didn't find anything regarding what I am trying to achieve, apologies if it has been asked before.

 

I have 1 main linked chart which has 2 levels of drill down through a monthly, daily and then hourly view of data, I also have 2 sub charts which are showing different grouping of those levels of data.

 

I want to make the subcharts linked charts but I want the drill down level to change when I click the first chart only - is it possible to fire a Click event in code programatically?

 

At the moment I am doing it by capturing the linkitemopened event from the main chart and updating the datasource of the remote charts - but its a little hacky and would prefer to have 3 drillable charts and the first chart controls the drill down refresh.

 

$("#sChartMainDiv").insertFusionCharts({
 	swfUrl    	: "/assets/charts/Column2D.swf",
 	dataSource	: "/index.php/dashboard/jsonGraphData/id/sChartMain",
 	dataFormat	: "jsonurl",
 	width 		: "100%",
 	height    	: "300",
 	id        	: "sChartMain"
  }).bind('fusionchartslinkeditemopened', function(eo, ao){
  	// Handle Chart changes

  	link = ao.item.args['dataSource'];
  	routeLink = link.replace("sChartMain", "sChartRoute");
  	stateLink = link.replace("sChartMain", "sChartState");

  	$("#sChartRouteDiv").updateFusionCharts({
  		dataSource	: routeLink
  	});

  	$("#sChartStateDiv").updateFusionCharts({
  		dataSource	: stateLink
  	});
  })

 

Any help much appreciated

 

Thx

Dave

Share this post


Link to post
Share on other sites

I came back to edit my above post - but appears it is not possible?

 

Anyhow, 12hrs on and still not any closer to working this out - I have scrapped the idea of having all 3 charts as linked charts as the redraw does not look pretty - so I am back to my above hack.

 

The problem I have is that when pressing the Back button on a linked chart it does not refresh the data from the dataSource - it appears it is cached in the dom, is there anyway to overide that behavior and make the back button trigger an update?

 

Thx

Dave

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi Dave,

 

In a linked chart, when you press on the Back Button, the data of the parent chart is cached indeed.

 

There is no such API available for the Back Button Object to customize it as per your needs, as of now.

 

However to update the parent chart you can use your hacky code.

 

Thanks,

 

Sashi

Edited by Sashibhusan

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
Sign in to follow this