Using Google Charts through a module

25 views
Skip to first unread message

Chris P

unread,
Aug 14, 2018, 6:15:09 PM8/14/18
to Google Visualization API

Using Google Charts through a module in Drupal 8 - My question is much simpler than anything to do with Drupal or associated modules.

This is where I am looking

https://developers.google.com/chart/interactive/docs/gallery/barchart

 in the section headed as below 

"Labeling bars

Charts have several kinds of labels, such as tick labels, legend labels, and labels in the tooltips. In this section, we'll see how to put labels inside (or near) the bars in a bar chart."


We are able to remove the legend as required by the specs we are following, however we also need to write the labels (formatted dates) in front of the horizontal bar values of 0 to 100. How would this be accomplished in javascript. From the example it looks as though the labels could be in the place of the Elements and the value in place of the Density. I see there is some type of setting roles for the "TABLED" entries of the array. In the example shown are there roles set for the headers designated such as role:annotation is set for the elements periodic chart values of Ag and Cu?


My (might be dangerous) assumption is that the first two in the data array/table have set roles. Is this correct?


If I can have a bit of clarification on this issue I should be able to go from here.



Reply all
Reply to author
Forward
0 new messages