Interactive bar chart, multicolored and with markers

33 views
Skip to first unread message

jdbru...@gmail.com

unread,
Dec 20, 2013, 7:43:02 AM12/20/13
to google-visua...@googlegroups.com
I want to create an interactive bar chart, where each bar has a different color and at the top of the bar I want to show the value marker for that bar.

Apart from the multicolor bit i've got it working. But I cannot figure out how to make it multi colored. 
Is there anyone that can modify my code to my specifications?


index.html

asgallant

unread,
Dec 20, 2013, 10:50:20 AM12/20/13
to google-visua...@googlegroups.com
First off, the ColumnCharts now support annotations natively, so you don't need to use the hack to work around the problem any more.  Second, you can use the new "style" column role to set the color of columns.  Here's a working example based on your code: http://jsfiddle.net/asgallant/LYr59/.

What is your goal with calling drawChart, animating a chart, and then drawing over it with the continueExecution function?  I suspect that there is an easier way to get what you want.

jdbru...@gmail.com

unread,
Dec 20, 2013, 5:14:50 PM12/20/13
to google-visua...@googlegroups.com
Thank you for your answer, i'll have a look at the example it sounds to be exactly what i need.

The file i added was made to the same specifications as in my original post :
An animated multicolor bar chart with the values above the columns So if you have a better solution i am happy to hear it

asgallant

unread,
Dec 20, 2013, 6:03:54 PM12/20/13
to google-visua...@googlegroups.com
You don't need to use two separate chart functions to accomplish this.  Here's a simpler way: http://jsfiddle.net/asgallant/LYr59/1/

Jos de Bruijn

unread,
Jan 2, 2014, 3:45:07 AM1/2/14
to google-visua...@googlegroups.com
Thank you for the sample. This is exactly how I want the chart to work.


2013/12/21 asgallant <drew_g...@abtassoc.com>

--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/1YtAHNeasBw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages