google / google-visualization-issues

288 stars 35 forks source link

How can I create a line graph using time (in format XX:YY.ZZZ) on the google sheets API? #2974

Open BrennanK07 opened 2 years ago

BrennanK07 commented 2 years ago

I'm working on a timer-based website currently, and I plan to use google sheets for the graph showcasing past times and such. However, whenever I try to get a time in the form of a string onto a graph, it ends up with an error that states that strings are not allowed; only numbers. How can I accomplish this?

dlaliberte commented 2 years ago

The "Date(...)" format is documented here: https://developers.google.com/chart/interactive/docs/datesandtimes#dates-and-times-using-the-date-string-representation

If you are using this format, and you still get an error about using numbers vs strings, you'll have to provide more details about exactly what your format is, what your data looks like, and which chart type you are trying to draw. These details can all make a difference in the outcome.

BrennanK07 commented 2 years ago

The "Date(...)" format is documented here: https://developers.google.com/chart/interactive/docs/datesandtimes#dates-and-times-using-the-date-string-representation

If you are using this format, and you still get an error about using numbers vs strings, you'll have to provide more details about exactly what your format is, what your data looks like, and which chart type you are trying to draw. These details can all make a difference in the outcome.

Thank you! This solved the problem!