Google Sheets: Cannot add labels to a chart series - google-sheets

I have a google sheet chart based on a simple dataset. Column A is the x-axis, column B is the series, and I would like to use column C as my labels for the series. You can see this below:
My understanding is that (and I have done that in the past) I can select the series, press the "3 dots" and click on "Add labels" so I can configure column C as the labels for the series, as shown below.
It turns out that when I click "Add labels", nothing happens. Has anyone seen this? It seems random since when I try simpler datasets, sometimes it works.
EDIT:
I removed the series, removed the x axis, and then removed the Data Range. Started from scratch, and then it allowed me to add labels.

Related

Hide some Legend Items in Line Chart

I have my line chart showing all the data properly, including some annotated values which are meant to act as the label in the last data point for the lines. I wanted to do it this way so that I don't have to show literally every data label for every data point.
I have everything working correctly, but I noticed I am unable to remove the annotated legend item without removing the series. By removing the series, I lose the label. Below is my chart.
As you can see, the last data points are working as labels (1092 for example). The problem is you can also see each annotated item in the legend (the colored dashes with no text next to them). How can I only show the legend items for Gained (green), Lost (red), Net (gained - lost) (yellow), and Total (blue), without the other dashes? Is this doable?
I am also open to seeing if there is another way to have only the last data point have a data label in Google Sheets. I was just working off of this tutorial.
Below is a screenshot of some of my data rows in an accompanying sheet.
as long as the annotation column is specified as 'Label' for the primary column you shouldn't be seeing the former in legend

How can i create a duration chart in google sheets?

I'm trying to make a file to track the time I study a certain subject:
I would like now to make a chart with all the values (that in this case are durations) in the B, C and D columns, but I don't really understand how to do it. When I select the cells and click "create chart" it does the following:
which is obiously wrong. If i remove "date" from the "series list" in the settings of the chart above i get the following:
But I don't understand what this represent. How can I do this? Please keep it simple.. This is the first time for me using google sheets
Ps i just realized that that kind of format specifies a time (2am, 3am etc) and not a duration. Is there any format that indicate a duration?
Here is what to do:
1.) Select all of your time columns entirely within the spreadsheet itself (not the graph). Using your posted setup, that would be Col-B, Col-C, Col-D. To do this, just click on the "B" at the top of Col-B, hold down the mouse and drag right to Col-D, then release. If you have more columns than these that will record durations for classes, select those as well.
2.) From the main menu, choose **Format > Number > Custom number format > **. In the field at the top, enter this format: [h]:mm
The second chart in your post is actually correct. It's just showing your durations as the decimal percentage of a full day on the Y-axis. The steps above should cause the chart to adjust to showing durations.

Smooth line diagram in google sheets - complex case

Can you please help me to understand how to build a diagram (smooth line) that is basing on RED values (BLUE category) per GREEN month?
Table in google sheets
I have no idea by this time how to do it - I think diagrams cannot understand multiple values if I just select them separately.
I tried to select individual cells that I need to build diagram for, but it does not work, since it cannot understand that I need to bind the selected cells with months and category names..
The way of doing this would be:
Select the first cell of the series
Insert chart
Select type: smooth line chart
Click on Select data range (button on the right of the Data range input)
Click Add another range and add the other cells one by one, and then click OK
Set Combine ranges to Vertically
And the graph should appear

Google Sheets - Waterfall Chart Subtotal Labels

Here's a data sample
and screenshots too.
I'm trying to make a waterfall chart with Start/End year performance and contributions. I was trying to make the chart more descriptive by including a customized label, with percentage variations.
No matter how I select the labels column, the ending Subtotal bar is independent from the others. I'm trying to customize both bottom and top labels, but I'm more concerned on the top one (the growth/loss percentage or the absolute value at the end of the year.
Thanks again to #kirkg13 for guiding me through the solution. It was not quite difficult in the end, but I think the option should be made clearer/simpler in some future updates.
You can check my solution on the Chart 4 from the sample file as long as It'll be online. Steps are as follows:
1: Lay the data in three columns: Column names, values (start value, absolute deltas and end values) and custom labels (whatever you like, in my case % variations for all columns except start/end). Include the subtotal column
2: On the chart editor make sure all the data is selected, including the sub-total (from Start Year to End Year in my example). Check that x-axis and series are correctly assigned (column 1 and 2); from the series click and add a label, selecting the third column.
3: This is the part I had difficulties finding: on customize>series>data labels, you need to:
Uncheck the "Add subtotal..." box (optionally check the "Use first value as subtotal" one, for better color clarity
Below, click "Add new subtotal".
The new Subtotal must be of "type" "Replacing" and "column index" as the last column you have
The end result is as below: all columns have a customizable name and label, with coherent colors.

Add a vertical line to Google Sheet Line Chart

I have a sheet with a line chart, now I'm trying to do something maybe very simple: I would like to add to this chart a vertical line using a value in a cell.
So I have this line chart
And a cell with the date 2016/01/01, I would like to have a vertical line through all the chart on the cell date
I can't figure out how to do it...
This is a copy of that sheet: https://docs.google.com/spreadsheets/d/1oeiwmeDT8pUVqBQvoE_cqk7mZxxvD5moZr41Vp4IN2I/edit?usp=sharing
I would like to show a vertical line using the "Purchase date"
I had the same problem and created a solution to overcome limitations of Google Sheets charts.
The main idea is to create an additional line in the chart, with only two points, both with the desired date. The value of the first point is 0 and the last has the maximum value of the Y axis. This way, the line always covers the entire height of the chart.
Screenshot of the Chart
Note that it is necessary to add two new values in the X axis (highlighted in blue on the sheet). Don't worry with the fact they are repeated. Google Sheets handles it correctly.
These values can be placed at the beginning of the lists. This way, it is possible to add new values at the end of them.
This solution can be viewed in: "[GoogleSheets] Dinamic Vertical Line in a Chart"
To change position of red line, just select a different value in "Purchase date" (yellow cell).
I made a merge of my first solution with the one suggested by dimo414 and created a new solution with two variations.
In the previous version of the spreadsheet, there were only two points to draw the vertical line.
In the new version, a third point were inserted to show intersection between the line and the real curve. A new column was also created, containing only a label for the new point.
The result is:
Theses changes can be seen in green background in sheets 'Dashboard_v2' and 'Dashboard_v3' of the SpreadSheet.
To determine coordinates of the new point, two approaches were used:
Search Purchase Date directly in the dataset (see sheet 'Dashboard_v2')
If the goal is to highlight only points of intersection that belong to the original dataset, it is just necessary to VLOOKUP() the date in the dataset.
Interpolate the two points immediately smaller and larger than the purchase date (see sheet 'Dashboard_v3')
Given the points [x1,y1], [x2,y2] and a value of x (where x1 <= x <= x2), its possible to find an interpolation point [x,y] with the following formula:
y=(y2-y1)*(x-x1)/(x2-x1)+y1
Although this formula is easy to implement, find the correct points to interpolate is more challenging and requires a bit of creativity.
At first, I thought of using a JS script to make things easier, but decided to use only builtin functions.
By the way, different approaches to find [x1,y1] and [x2,y2] are welcome.
To make things easier to understand, each point coordinate is determined in a different cell (see L2:M5) and the point of intersection is in L6:M7.
Of course, its possible to join all of them in just one cell, but I thought it would be harder to understand.
To close, one more detail: According to above definition, interpolation formula is valid only if (x1 <= x <= x2). Thus, both cells C2 and M6 have protections to limit the value of 'x'.
One way is to add a label to your x-axis.
For example, this is a chart that plots weight against date, with a label "Cheat Day" on 2021-07-21
For the data:
Date
Label
Weight (kg)
Weight Goal (kg)
2021-07-19
83.85
75
2021-07-20
84.55
75
2021-07-21
Cheat Day
83.8
75
2021-07-22
84.95
75
2021-07-23
83.75
75
Go to Edit the chart > Setup > Under X-axis > Click on ••• next to your "Date" column > Add labels > Select the column "Label" as your label.
Your Chart Editor > Setup should look like this:
you can have it like this, unfortunately not programmatically. the only way is to insert a line via Drawing and position it manually where needed.
spreadsheet demo
As best I can tell there isn't a way to add a vertical marker line to a chart in Google Sheets. One option that may be "good enough" in many cases is to "Add notes to a data point" and then use "Format data point" to make the point more visible. Here's an example, from your spreadsheet:
Unfortunately one limitation with this approach is you can only label a data point in the data set the chart is displaying. In your case the date you wanted to mark with a line isn't in the data set, so this won't work directly. You might be able to introduce a separate data series consisting of just that date and then add a note to that data point, but I haven't fiddled with it enough to make it work.

Resources