Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

Line Chart with series dynamically generated from cell values

$
0
0

I have the following data:

https://docs.google.com/spreadsheets/d/1odEoSCiz897B3Qm_GCOXQkxyE5JP504blizhDkC4y4o/edit?usp=sharing

Data and Line Chart

I wanted a line chart where the x-axis was the 'date' from column A and 4 series (A,B,C,D according to the value in column B 'category) using the value from the 'total' column.

I didn't know how to do this without copying the values from the 'total' column E into 4 separate columns F-to-I and giving each of those additional columns the headers A,B,C,D.

Question: How can I create the same line chart using only the columns A, B and E, without using the additional columns F,G,H and I ? Is it possible ? Basically I want to somehow dynamically create the series based on the 'category' value in column B. Any ideas ?

(Or, if it cannot be done, and assuming that the category values A,B,C,D will always cycle through in that order, can you think of a better way to model the raw data to make it easier to generate the same line chart ? A,B,C and D will always be measured in that order and the date field tells me when that measurement was done. Let's assume that dates will always be either the same date as the previous row or a future date compared to the previous row. 'first' and 'second' are individual measurements made on that date, and 'total' is what I want to display in the chart. Also, two consecutive rows for a particular 'category' (e.g. 'A') will never be made on the same date.)

Thanks!


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>