Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clickable Bars in js Highcharts?

Tags:

I have horizontal bar chart with Highcharts. How can I make each bar clickable for an event, for example like 'alert' ?

I have this series for example:

series : [{     name: 'John',     data: [5, 3, 4, 7, 2] }, {     name: 'Jane',     data: [2, 2, 3, 2, 1] }, {     name: 'Joe',     data: [3, 4, 4, 2, 5] }]; 

What more should I do?

like image 479
夏期劇場 Avatar asked May 16 '12 02:05

夏期劇場


1 Answers

You might find the Highcharts Options Reference a good starting point.

From the reference, here's an example of a column chart where clicking a column fires an alert.

http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/plotoptions/series-point-events-click-column/

like image 165
mg1075 Avatar answered Oct 07 '22 01:10

mg1075