Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
143 views
in Technique[技术] by (71.8m points)

Google Sheets Charting with complex grouping

I am working in a Google Sheet with data being pulled in from NPM via an Google App Script. I'm iterating over the time periods that I'm trying to pull data for and grabbing the Download count. I'm trying to create a chart that shows the quantity of Downloads on the x axis and the End Date on the y-axis with a line for each Package and a legend showing the package name. I've tried multiple types of charts as well as what feels like every combination of Series and X-axis but nothing comes out looking lime I want.

The image below the dataset is as close to what I'm looking for as I have gotten. The End Date is set as the X-axis, Downloads is set as the series, Row 1 as headers is checked, as is Use Column C as labels.

Package Start Date End Date Downloads
my-package 2019-12-30 2020-01-05 92834
my-package 2020-01-06 2020-01-12 168066
my-package 2020-01-13 2020-01-19 184788
another-package 2019-12-30 2020-01-05 92834
another-package 2020-01-06 2020-01-12 168066
another-package 2020-01-13 2020-01-19 184788
question from:https://stackoverflow.com/questions/65892483/google-sheets-charting-with-complex-grouping

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

After a ton of digging and attempts using Query and other stuff. I was able to get the data restructured nicely with a Pivot Table which had columns of the dates and rows of the packages. After that I was able to create a chart with the Package on the x axis and a series for the values of the packages. The dates showed up as the y axis.

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...