Cyril Duchon-Doris
Cyril Duchon-Doris

Reputation: 13949

Google charts how to display friendly time duration labels?

I am trying to build a graph highlighting response times percentiles

To make the graph readable, I'd like to show friendly labels for values of the Y axis (or the datapoint themselves). It also makes sense to use the log of the duration so I can easily show days, weeks or months on the same graph. I found out it's possible to add labels to a series.

The problem, is that I have too many values, so if I show the friendly label on each datapoint, it's too hard to see anything

Here is how it looks like

enter image description here

When I see this, I say to myself, that it would make sense to only show the data label for one out of X datapoints (in this graph, maybe one out of 4 would look rather neat). Is there some way to easily do this ? Or maybe there's some other approach that could be used to have a nice graph representaiton of durations ?

Also, is there a way to "translate" the values of the Y axis instead of adding the labels on the datapoints ? (the number of seconds does not make sense but the number of days or months does, I'm using a Ruby helper to generate those values, but if something similar exists in Google I'd gladly take it)

EDIT : the source sheet if you'd like to experiment

Upvotes: 0

Views: 168

Answers (1)

basic
basic

Reputation: 11968

The solution could be to create an additional column specifically for annotations and specify it as a label for the series. I did the following:

  1. Add a new column Annotation
  2. Fill it with a formula =if(MOD(ROW(),5)=0,B2,"") so that every fifth row has a value
  3. Chart editor -> Setup -> Series -> Label point to the Annotation column
  4. Chart editor -> Customize -> Series -> Data labels -> Type point to the Custom

Result:

enter image description here

Upvotes: 1

Related Questions