2
votes

I'm looking to build a clickable drill-down bar chart of sorts using dimple or nvd3.

I can create a bar chart no problem, but what I'd like to do is make each bar clickable to allow me to call a Javascript function which will load JSON to populate a separate chart (essentially doing a drill-down across multiple charts)

The problem however seems to be that I can only access the value or label in the series to the item I've selected, and in order to load the next chart I would need something distinct... another field from my recordset or even the index of the bar being clicked on.

Being new to dimple, I'm looking for a simple example but everything I'm seeing seems to involve drill-downs in the same chart or examples showing far more features than I need.

I'm just looking for a way to bind an event to each item in the series, and to use data during the click event that would be unique to that data point, but not used in the chart.

1

1 Answers

0
votes

You can add events to a series using the series.addEventHandler method documented here.

This example is essentially a drill through but using the hover event instead of the click.