Trendline for data series and dates on X-axis

76 views
Skip to first unread message

piw...@gmail.com

unread,
Mar 15, 2022, 2:25:42 AM3/15/22
to Google Visualization API
Hi, is it possible with Google Chart to add a trendline to LineChart graph with two data series distributed by data in X-axis, like: ['2021-12-29', 4.65, 1.65] ? It seems not possible in my lab...

thanks, Thomas

piw...@gmail.com

unread,
Sep 7, 2022, 8:14:24 AM9/7/22
to Google Visualization API
simple, my dear Watson:

1. start with declaring column type
google.visualization.arrayToDataTable                                 ([[{label: "Data",      type: "date"},

2. populate dates like:
[new Date('2021-01-04'), 0, 0, 0],

...but. it took me quite some time to figure it out!
Reply all
Reply to author
Forward
0 new messages