Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make vertical annotation when using Google Charts DataTable roles?

I am using the Google Chart Tools DataTable Roles feature to annotate LineChart as mentioned in the below link:- https://developers.google.com/chart/interactive/docs/roles

But the annotations are coming Horizontal and not vertical. For example "Started Using Spreadsheets" annotation below is vertical which is what I want but for me its not coming vertical. enter image description here

I am using the below code to add annotated column:-

addColumn({type:'string', role:'annotation'});

Please help.

like image 698
Anuroop Avatar asked Jun 06 '12 11:06

Anuroop


1 Answers

You are close! Since you have regular annotations ready, just add to your chart options: annotations: {style: 'line'}.

jsFiddle example: http://jsfiddle.net/tVCv9/268/

Read the docs on annotations: https://developers.google.com/chart/interactive/docs/roles?hl=fr#annotationrole

Good luck!

like image 163
Tony Avatar answered Nov 09 '22 12:11

Tony