Label for 2nd Y-axis

Asked by Ask Bjørn Hansen

Is it possible to add a label to the 2nd Y-axis (the right hand side one)?

Related: Is it possible to override the texts in the legend? Internally I have to store the data with relatively goofy names, but would like to make them more user friendly in the output. (The goal is to proxy the output to the public internet).

http://graphite:8080/render/?width=586&height=308&_salt=1323251622.458&target=ntp.371.offset.0&target=secondYAxis(ntp.371.score.5)&from=00%3A00_20110620&until=23%3A59_20110621&yLimitRight=20&lineWidth=2&rightDashed=1&logBase=&bgcolor=FFFFFF&fgcolor=000000&vtitle=Offset&hideLegend=true

Question information

Language:
English Edit question
Status:
Solved
For:
Graphite Edit question
Assignee:
No assignee Edit question
Solved by:
Michael Leinartas
Solved:
Last query:
Last reply:
Revision history for this message
Nicholas Leskiw (nleskiw) said :
#1

First, yes there is documentation. http://graphite.readthedocs.org

Second, use the alias() or substr() function to rename items in the legend.

Third, there is no way (yet) to add a label to the second y-axis, but there are several functions to differentiate between the the two axes. (Color, dashes, etc...)

Ask Bjørn Hansen <email address hidden> wrote:

>New question #181150 on Graphite:
>https://answers.launchpad.net/graphite/+question/181150
>
>Is it possible to add a label to the 2nd Y-axis (the right hand side one)?
>
>Related: Is it possible to override the texts in the legend? Internally I have to store the data with relatively goofy names, but would like to make them more user friendly in the output. (The goal is to proxy the output to the public internet).
>
>http://graphite:8080/render/?width=586&height=308&_salt=1323251622.458&target=ntp.371.offset.0&target=secondYAxis(ntp.371.score.5)&from=00%3A00_20110620&until=23%3A59_20110621&yLimitRight=20&lineWidth=2&rightDashed=1&logBase=&bgcolor=FFFFFF&fgcolor=000000&vtitle=Offset&hideLegend=true
>
>--
>You received this question notification because you are a member of
>graphite-dev, which is an answer contact for Graphite.
>
>_______________________________________________
>Mailing list: https://launchpad.net/~graphite-dev
>Post to : <email address hidden>
>Unsubscribe : https://launchpad.net/~graphite-dev
>More help : https://help.launchpad.net/ListHelp

Revision history for this message
Best Michael Leinartas (mleinartas) said :
#2

For docs, try http://readthedocs.org/docs/graphite/en/latest/index.html instead - the link above contains some incomplete and out of date docs

That said, I dont believe the alias() or substr() functions are documented...

In the composer view once you've composed your graph, hit "Graph Data" and select a metric and hit "Apply Function"
Under the "special" category, there's a function named "Set Legend Name" - this will configure the alias function. Alternatively, you can manually edit your graph url's target querystrings to add the function

Where previously you had:

&target=ntp.371.offset.0

You can alias it with
&target=alias(ntp.371.offset.o,"MyNtpMetric")

As far as the 2nd axis label, there's no way to do that currently but feel free to file a bug for the feature request to track your need.

Revision history for this message
Ask Bjørn Hansen (askbjoernhansen) said :
#3

Hi Nicholas and Michael; thanks for the replies! I had read the documentation but was browsing the "1.1" version of the docs and there the URL API section is empty:

http://readthedocs.org/docs/graphite/en/1.1/url-api.html

Somewhat confusingly the 1.0 version of the docs links to there:
http://readthedocs.org/docs/graphite/en/1.0/url-api.html

I'll make a ticket for alias not being documented and for the feature request of labeling the 2nd axis.

Thanks again!

Revision history for this message
Ask Bjørn Hansen (askbjoernhansen) said :
#4

Thanks Michael Leinartas, that solved my question.