Hi Everybody, I've a problem.
I am drawing a column chart with a NumberRangeFilter (slider) in this
way;
//...
dashboard.bind(slider, myChart);
dashboard.draw(dataTable);
I added a listener:
google.visualization.events.addListener(myChart, 'select',
selectHandler);
function selectHandler() {
var selectedItem = chart.getChart().getSelection()[0];
var value = data.getValue(selectedItem.row, 0);
alert('The user selected ' + value);
}
Everything works fine. But when I use the slider to filter my data the
listener dosn't work anymore. The problem is that the Listener
considers as row 0 the first bar of the "filterd chart", but it refers
to the "unfiltered data table". So the item selection does not work
when I use the slider.
i.e.
DataTable:
item value
A 5
B 3
C 2
If I use the slider to see value < 5 I get a column chart with only
bar B and bar C. But when I click on the first bar of the chart (bar
B) the event listener returns the first row of DataTable: the item A.
How can I fix this?
Tanks.
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.