Google-chart interacting

25 views
Skip to first unread message

skalde...@gmail.com

unread,
Apr 19, 2016, 6:33:40 AM4/19/16
to Polymer
Hey guys,

I am using a google-chart-element (type bar) in my application and wanted to do the following:
When the user clicks on a bar, I want to switch the colour from the current one to grey

I tried doing this by handling the on-google-chart-select event, in which i modify the data
array of the chart at the respective position to the new colour

This lead to two problems:
1. The select event seems to be always fired twice ... annoying, but fixable
2. I could change the correct colour value in my data array to the new colour, and then I wanted
    to redraw the chart, so that the clicked bar now shows the grey colour
    So I used drawChart() - method, which did not lead to the desired result

The select event was fired 5 or 6 times after using drawChart() (??) and the colour was not updated
But the data array contained the correct colour value at the correct position...

What am I missing here?



Reply all
Reply to author
Forward
0 new messages