add annotation to csv datasource

17 views
Skip to first unread message

johnwoo...@gmail.com

unread,
Oct 9, 2015, 6:48:43 PM10/9/15
to Google Visualization API
I have a csv file created along with a google Bar graph.
The graph shows the annotation at top of the data.
But when I re-draw the graph using the csv function 
I just get the bars and no annotation.

How do i save the annotation in the csv file, so that when
it is re-drawn i get the annoatation by :

$.get("https://www.pathfinder2.com/emelwebsite/template_b/graphs/files/<%=chart_name%>", function(csvString) {
//           $.get("https://www.pathfinder2.com/emelwebsite/reports_custom/example.csv", function(csvString) {
                var arrayData = $.csv.toArrays(csvString, 
                                              {onParseValue: $.csv.hooks.castToScalar}),
                    data      = new google.visualization.arrayToDataTable(arrayData),
options = {'title':'<%=This_name%>',
                       'width':1024,
                       'height':1268};
  options.chartArea = { left: '38%', top: '8%', width: "60%", height: "75%" };

// var view = new google.visualization.DataView(data);

Now the csv is shown correctly but without the annotation.


Reply all
Reply to author
Forward
0 new messages