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