You can do something quite similar by creating a DataTable with 4 columns:
domain (axis labels), value (for the height of the lower bars), box
thickness (for the height of the colored boxes), and color:
var data = google.visualization.arrayToDataTable([
['Label', 'Value', 'Box thickness', {type: 'string', role: 'style'}],
['Foo', 20, 2, '#ff0000'],
['Bar', 25, 2, '#00ff00'],
['Cad', 15, 2, '#0000ff'],
['Qud', 27, 2, '#ff00ff']
]);
Then set the chart's "isStacked" option to true.
You will probably want to do more customization with this, as the default
behaviors for these components are probably not what you want.
On Monday, October 6, 2014 10:19:46 AM UTC-4, [email protected] wrote:
>
> Hello,
>
> I would like to create a column chart, where all of the columns are of the
> same color, but have a colored 'block' of a different color on top of it,
> like so:
>
> http://imgur.com/6IhW53q
>
> Anyone has an idea how to do it using visualization API?
>
--
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.