Hi Abdullah, We are making many changes to the annotations feature which will show up in new releases. Try loading "1.1" instead of "1" to get the latest experimental version to see it as soon as it becomes available.
On Tue, Aug 4, 2015 at 6:12 AM, Abdullah Akram <[email protected]> wrote: > 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 [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. > -- Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> - 978-394-1058 [email protected] <[email protected]> 5CC, Cambridge MA [email protected] <[email protected]> 9 Juniper Ridge Road, Acton MA -- 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.
