Prorated goggle charts?

13 views
Skip to first unread message

Péter Drenkovics

unread,
Jan 28, 2017, 2:56:53 PM1/28/17
to Google Visualization API
Greetings!


I am developing a skill systerm for our company that needs an area or line google charts for it too to show skill changing / average based on time. I got it to work nicely, but my problem is that every line is drawed in an equal length. Meaning if I have 4 dates, it gets the 4 dates and the full width of the chart and splits it into 4 equal parts. Thats not what I need.

What I need is a prorated chart, meaning if there is 4 dates for example, there is 1 month difference between the first and second date but between the second and third date there is only a week or so, draw the lines accordingly. So the line between the first 2 dates would be longer than the line between the second and third, not equal like now.

How can I achieve it with google charts? I'm sure there is an easy way to do this, I just cannot find it in the documentation.

Thank you for your help!

Daniel LaLiberte

unread,
Jan 28, 2017, 9:38:39 PM1/28/17
to Google Visualization API
What you need to do is change the dates from strings to date values.  If you are getting data from a Google spreadsheet, you probably want to format the date column as a date.   There is a documentation page on dates and times that may help: https://developers.google.com/chart/interactive/docs/datesandtimes

--
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+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/e7b2b0e3-6525-4680-b571-ee9c1e2bd306%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Péter Drenkovics

unread,
Jan 29, 2017, 9:50:34 AM1/29/17
to Google Visualization API
Thank you for your answer, it works perfectly, exactly what I need.
Reply all
Reply to author
Forward
0 new messages