Here is my function to draw chart. I need vertical annotation but syle: 
line is not working with column charts.

function drawChart() {
    // Create and populate the data table.
  var option = {
  width:175, height:500,
               animation: {duration: 2000, easing: 'linear',},
               vAxis: {minValue:0, maxValue:334000, 
gridlines: {
color: 'transparent'
},
baselineColor: 'transparent',
textStyle: {
color: 'transparent'
}
},
               hAxis: {gridlines: {
color: 'transparent'
},
textStyle: {
color: '#fff'
}
},
tooltip: {trigger: 'none'
},
legend: {position: 'none'},
axisTitlesPosition: 'none',
backgroundColor: '#026B56',
annotations: {
textStyle: {
fontSize: 12,
color: '#fff',     // The color of the text.
opacity: 1          // The transparency of the text.
},
enableInteractivity: false,
                                                1: {
style: 'line'
}
}
  };
  var data = new google.visualization.DataTable();    
  data.addColumn('string', 'N');
  data.addColumn('number', 'Value');
  data.addColumn({type: 'string', role: 'style'});
  data.addColumn({type: 'string', role: 'annotation'});
  data.addRow(['11', 0, 'color: #E5E0D7', '239,458']);
  data.addRow(['12', 0, 'color: #00BC6F', '273,530']);
  data.addRow(['13', 0, 'color: #82BC00', '300,000']);
  data.addRow(['14', 0, 'color: #5AB6B2', '333,000']);

  // Create and draw the visualization.
  var chart = new 
google.visualization.ColumnChart(document.getElementById('chart-6'));

  chart.draw(data, option);
  data.setValue(0, 1, 239458);
  data.setValue(1, 1, 273530);
  data.setValue(2, 1, 300000);
  data.setValue(3, 1, 333000);
  chart.draw(data, option);
  
}
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);

-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
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