Thank you very much for all your assistance, asgallant!

On Thursday, March 13, 2014 4:03:38 PM UTC-4, asgallant wrote:
>
> You can set the color by series or by bar.  To set the series colors, 
> either set the "colors" option (which takes an array of colors to apply to 
> the series) or set the series.<series index>.color options.  If you want to 
> color bar individually, you can use the "style" role column, like the 
> example; you need to have one style column for each data series that you 
> want to change the bar colors of.  Here are examples of each of the three 
> methods: colors option <http://jsfiddle.net/asgallant/aFs9x/1/>, series 
> option <http://jsfiddle.net/asgallant/aFs9x/4/>, style role 
> column<http://jsfiddle.net/asgallant/aFs9x/3/>
> .
>
> On Thursday, March 13, 2014 3:45:24 PM UTC-4, Captain Gordon Freeman wrote:
>>
>> Yes, that is exactly what I am looking for! Thank you asgallant!
>>
>> I do have one additional question if you don't mind. Is it possible to 
>> set the color of the bars?
>>
>> On Thursday, March 13, 2014 3:20:48 PM UTC-4, asgallant wrote:
>>>
>>> Is this what you are looking for?  http://jsfiddle.net/asgallant/aFs9x/
>>>
>>> On Thursday, March 13, 2014 3:03:26 PM UTC-4, Captain Gordon Freeman 
>>> wrote:
>>>>
>>>> I'm looking to setup a bar chart like the first one on this 
>>>> page<https://google-developers.appspot.com/chart/interactive/docs/gallery/barchart>
>>>>  but 
>>>> also have it setup so the values display on the bars themselves. I have 
>>>> attempted to set it up but it doesn't quite work properly. Here's what 
>>>> I've 
>>>> got for the code: 
>>>>
>>>> var data = google.visualization.arrayToDataTable([
>>>>             ["Section", "Number1", "Number2", { role: "style" }, { 
>>>> role: 'annotation' }, { role: 'annotation' }],
>>>>             ["Section 1", 3, 5, "blue", 3, 5],
>>>>             ["Section 2", 30.00, 50.00, "red", 30.00, 50.00],
>>>>     ]);
>>>>
>>>>     var view = new google.visualization.DataView(data);
>>>>     view.setColumns([0, 1,
>>>>                         {
>>>>                             calc: "stringify",
>>>>                             sourceColumn: 1,
>>>>                             type: "string",
>>>>                             role: "annotation",
>>>>                             role: "annotation",
>>>>                         },
>>>>                         2]);
>>>>
>>>>     var options = {
>>>>         title: "TEST CHART",
>>>>         legend: { position: "none" },
>>>>         hAxis: {
>>>>             ticks: null,
>>>>             direction: 1,
>>>>         },
>>>>         enableInteractivity: false,
>>>>     };
>>>>
>>>>     var chart = new 
>>>> google.visualization.BarChart(document.getElementById('chart'));
>>>>     chart.draw(data, options);
>>>>
>>>> This setup works fine if I only have one bar per row but if I add a 
>>>> second bar it stops working. Is there a reason for this?
>>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to