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?