Hi,
You can accomplish the same type of functionality with one-dimensional data
by pivoting the data and specifying the colors option on the chart. The
following bit of code should demonstrate how to do that:
function drawVisualization() {
// Create and populate the data table.
data = google.visualization.arrayToDataTable([
['', 'a', 'b', 'c', 'd', 'e', 'f'],
['', 14, 47, 80, 55, 16, 90]]);
// Create and draw the visualization.
new google.visualization.ColumnChart(document.getElementById(
'visualization')).
draw(data,
{title:"Yearly Coffee Consumption by Country",
width:600, height:400,
colors: ['f00', '0f0', '00f', 'ff0'],
hAxis: {title: "Year"}}
);
}
On Sunday, October 14, 2012 12:52:56 PM UTC-4, eviva65 wrote:
>
> Hi Steve,
>
> Have you gotten any responses for your question? I'm in the same boat. I'd
> like to be able to have the same capability with the columnchart because it
> is easier to see which data is our of specs.
>
>
> On Thursday, August 16, 2012 5:55:03 PM UTC-4, Steve Heady wrote:
>>
>> The "old" imagechart has one key advantage. It allows creating column
>> charts with ranges for colors. This is quite effective for a variety of
>> reasons, but showing as much data as we do in a chart, color is one of the
>> most effective tools of communication.
>>
>>
>> https://code.google.com/apis/ajax/playground/?type=visualization#image_multicolor_bar_chart
>>
>> I've added this chart to my working example, but it has a number of
>> limitations such as having zero interaction. Being able to set a range of
>> value to assign color to a column chart is exactly what I'm looking for.
>> The biggest drawback to google charts in my experience has been title
>> positioning and colors. I've attached a couple examples so you can see
>> what my application is using the same dataset.
>>
>> It's a no brainer to me that a colored imagechart is more effective than
>> having an interactive chart. Because it's deprecated, will this support be
>> added to ColumnChart or am I missing something?
>>
>> Thanks,
>> Steve
>>
>
--
You received this message because you are subscribed to the Google Groups
"Google Chart API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-chart-api/-/UE-dbItz6Y0J.
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-chart-api?hl=en.