Sign in to follow this  
babuu

Click Event Supported Lengend

Recommended Posts

Guest Sumedh

Hi,

 

 

To track the legend click event, FusionCharts XT Service Release 4 has introduced advanced event known as "LegendItemClicked". This is currently not documented but would work for both Flash Chart and JavaScript Chart

 

Ref. Code:

function myChartListener(eventObject, argumentsObject)

{

alert( "Legend clicked" );

}

FusionCharts("ChartId").addEventListener ("LegendItemClicked" , myChartListener );

 

For other events, please refer the following URL:

http://docs.fusioncharts.com/charts/contents/?JavaScript/API/Events.html

 

Hope this helps!

Share this post


Link to post
Share on other sites

Hi,

 

I have created a Multi series(2 bars) chart. By default, when the chart is loaded i want to display only one bar. And when i click the legend of the bar that is hidden, i want to show both the bars.

 

Kindly help me.

 

Thanks

Nandhu 

Share this post


Link to post
Share on other sites

Hi

 

You do not need `legendItemClick` event for this purpose. You can directly specify attribute `initiallyHidden` in data series you don't want to show when chart is rendered.

 

Chart will render only with data series that are enabled and on legend click for disabled items, they will also appear. Please refer to this JSFiddle sample for the same: http://jsfiddle.net/fusioncharts/mEHs3/

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