Change line color, based on value

Asked by Alex Gray

I have 50 lines that I'm graphing and I have a legend showing all 50 lines.

Is there a way to sort the colors of the lines like a heat-map, or something similar, where the lines with the highest values are reddish and the lines with the lowest values are bluish?

Example, each line represents a state and the value is the temperature.

It would be nice to quickly see, just based on the color of the line in the legend what the relative temperature is.

Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Graphite Edit question
Assignee:
No assignee Edit question
Solved by:
Dave Rawks
Solved:
Last query:
Last reply:
Revision history for this message
Best Dave Rawks (drawks) said :
#1

Use colorList in your url query args to provide an ordered list of colors to use. The use a render function to sort your metrics. the colors will be applied in order left to right.

Revision history for this message
Jason Dixon (jason-dixongroup) said :
#2

You could do this with colorList() and sortByMaxima(), but of course
it's on you to define the colorList. See also graphTemplates.

Jason

On Tue, Jan 07, 2014 at 09:16:01PM -0000, Alex Gray wrote:
> New question #241853 on Graphite:
> https://answers.launchpad.net/graphite/+question/241853
>
> I have 50 lines that I'm graphing and I have a legend showing all 50 lines.
>
> Is there a way to sort the colors of the lines like a heat-map, or something similar, where the lines with the highest values are reddish and the lines with the lowest values are bluish?
>
> Example, each line represents a state and the value is the temperature.
>
> It would be nice to quickly see, just based on the color of the line in the legend what the relative temperature is.
>
> Thanks!
>
>
> --
> 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

--
Jason Dixon
http://obfuscurity.com/
https://twitter.com/obfuscurity

Revision history for this message
Alex Gray (grayaii) said :
#3

Thanks Dave Rawks, that solved my question.