I'm trying to figure out how to add annotations to my ColumnChart when my 
data comes from a URL to a Google Sheet. I have found many examples online 
with a data table created right in the code. I have added a column into my 
data that's supposed to serve the "annotation" role, but I can't figure out 
how to specify its role and use that in my code. This is what I have:

google.charts.load('current');
function drawFireClassChart(year = slider.value) {

  var wrapper_class = new google.visualization.ChartWrapper({
    chartType: 'ColumnChart',
    dataSourceUrl: 
'https://docs.google.com/spreadsheets/d/1D_JZN9YRYWiPvxErx9AtLSTtncZ3KAcBisXDtyzPr6E/edit#gid=1683808434?key=[hidden]',
    query: 'SELECT B,C,D WHERE A = "'+String(year)+'"',
    options: {'colors': ['#fab85d'],
            'hAxis' : { 'title' : 'Class' },
            'title': 'Distribution of Fire Sizes, Classed A-G',
            'titleTextStyle': {'fontSize': '14'},
            'legend' : {position: 'none' },
            'vAxis' : {format: 'decimal',
                       title: 'Number of Fires',
                       maxValue: 58000},
            'displayAnnotations' : true,
            'annotations': {'alwaysOutside' : true}},
    containerId: 'fire_class_div'
  });


In my query, column D is what holds the annotation values. I would 
appreciate any help!

-- 
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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/30b04b0d-708e-44c2-a070-f4b16fcd485a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to