Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript library for clickable bar chart?

I need a Javascript charting tool to build a bar chart that allows me to click on a chart bar and get another chart (in a popup or below the first chart). What I need is a bar chart that fires an event giving me some kind of id of the column that has been clicked.

Dettails

The data for the first chart should be loaded with ajax when the page loads and the data for the second chart should be loaded when you click on one of the columns.

an example: A graph with one bar for March and one bar for April, when you click on the March bar you get a second graph (below or in a pop up) with two bars: one for the 12/03/2011 and the other for the 23/03/2011.

Total expenses: March 1200 April 300

Total expenses for March: 12/03/2011 1000 23/03/2011 200

Total expenses for April: 16/04/2011 10 21/04/2011 290

like image 499
Lince81 Avatar asked Dec 22 '22 17:12

Lince81


2 Answers

Yet another option, if you are already using jQuery: Flot.

Graph Types: flot graph type example

Interaction: flot interaction example

Click the images to see the actual demo.

like image 165
Matt Ball Avatar answered Dec 27 '22 06:12

Matt Ball


Highcharts allows custom "click" handlers for individual points or entire series.

like image 23
maerics Avatar answered Dec 27 '22 05:12

maerics