Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override default series color palette #843

Closed
fschaer opened this issue Sep 22, 2014 · 25 comments
Closed

Override default series color palette #843

fschaer opened this issue Sep 22, 2014 · 25 comments

Comments

@fschaer
Copy link

fschaer commented Sep 22, 2014

Hi,

I just started "playing" with grafana and graphite a short while ago, so it's perfectly possible I overlooked what I will ask : is it possible to specify a series colors, or a theme color scheme ?

I've seen the "color picker" appear when you click on a specific series color, but all these colors do not allow for correctly viewing my ~25 stacked series on the same graph. Not enough contrast, I fear. What I'd like is to specify a (list of) series color by value, e.g : RGB=00FF00 ?

Can I give grafana my list of prefered colours instead of the pre-defined ones, which I find are not optimum for what I whant to graph (and how many can I feed grafana with ? Can I have 30 prefered colors ?) ?

Also, even if possible for one series at a time, I'm wondering how this could be done when selecting series with a star in the metric query, for instance :
monitoring.infosys.batch.queues.node74.*.GlueCEStateRunningJobs

?

Thanks

@torkelo
Copy link
Member

torkelo commented Sep 22, 2014

You cannot override the color palate (currently).

@fschaer
Copy link
Author

fschaer commented Sep 22, 2014

Oh too bad ... if this could be considered a feature request then, I'd be happy :]

Regards

@torkelo torkelo changed the title redefine series colors ? Override default series color palette Sep 23, 2014
@misterstrogg
Copy link

👍 Would be really nice to have a color palette per-query.

So, for example, a stacked CPU graph can have reds for system, yellows for user, blue-blacks for iowait, light greens for idle.

The colors for each type are close enough you can get a good representation of how the pool is doing on cpu overall, but they are different enough that you can also tell if one host or cpu is struggling disproportionately.

Uploading querypalettes.png . . .

@torkelo
Copy link
Member

torkelo commented Apr 19, 2015

@misterstrogg you can change color easily for each series, not sure what you mean "palette per-query"

@misterstrogg
Copy link

For a static graph choosing each series' color manually is fine. But once I change a template variable, new series are generated with new colors from the wildcards in my queries.

I'm trying to get to something like the template-generated image here:

querypalettes

Where the template variable is the hostname, the wildcard is the cpu number, and each type of counter (system, iowait, etc) is handled by its own query, which has a limited color palette, that it cycles through as series are generated by the query.

Palettes are the grail in this case though, I'd be giddy if I could force all series from a query to a single color. If I could limit a query to generating series of only one color, I could achieve a similar banded-group effect with transparency of line fill + non-zero line width.

@faxm0dem
Copy link
Contributor

👍 for custom palettes: the one available is too narrow

@matschaffer
Copy link
Contributor

matschaffer commented Apr 26, 2016

I could also get behind at least choosing the start color for a graph, using the built-in palette.

The use case for me would be to differentiate success metrics (via the usual blue/yellow/green/orange), and error metrics (starting with red, then blue/pink/purple).

@faxm0dem
Copy link
Contributor

as a workaround you could invert y axis for errors

@fschaer
Copy link
Author

fschaer commented Apr 26, 2016

For the record : it seems that with grafana 2.6+ you can override series color using this kind of thing in the dashboards json :

"aliasColors": {
"alice": "#FF0000",
"apc": "#554400",
"atlas": "#0000FF",
"atlasMC8": "#0000FF",
"atlasana": "#0080FF",
"biomed": "#8000FF",
"cms": "#00FF00",
"hess": "#FF0088",
"ops": "#C0C0C0"
},

(these are series titles)

At least we can override things, even if that's not perfect

@torkelo
Copy link
Member

torkelo commented Apr 26, 2016

@fschaer you can pick colors by clicking on the series legend (the color line icon), or specify override rules using regex in the styles tab

@aschor
Copy link

aschor commented Jun 23, 2016

as a matter of fact, I found a "hack" :

  • edit the file grafana/public/app/boot.xxxx.js
  • search the string i.colors=[
  • edit / add / remove colors as hex RGB values
  • enjoy your new colors

@steviecoaster
Copy link

You can edit the JSON of the dashboard and change the colors to the hex code of your liking. I just accomplished this in needing black to show Printer Toners on a panel. Worked a treat!

@therealsamlin
Copy link

FYI - Not sure about older versions. I'm on 4.1.1 and I can change my series colour by going into

Edit Graph > Display > Series overrides > Color

screen shot 2017-03-15 at 11 00 00 am

@maxboyer
Copy link

For the next person, you can change the color by clicking on the line in the legend. Mind blown finding it.
grafana_colorchange

@austinbutler
Copy link

@maxboyer this issue is I believe about adding to/modifying those colors in the popup.

@maxboyer
Copy link

@austinbutler Reading the first post again, you're right. I'm new to grafana and found out today how to change the graph colors.

@johann8384
Copy link

Any update on being able to update the default pallet? Is this something that is likely to get attention in upcoming versions?

@kasperkarlsson
Copy link

I would also (really) like to see this feature. Is there any chance that it might get implemented?

@swe
Copy link

swe commented Jan 23, 2018

Any updates or not?

@jean7458
Copy link

jean7458 commented Feb 8, 2018

No updates for now (I'm on Grafana 4.0). Maybe try in the Grafana 5.0 Beta to see if a update is available or not.

@torkelo
Copy link
Member

torkelo commented Feb 9, 2018

actually starting from v4.5 (I think) we introduced a new color picker that allowes you to specify a custom color

@torkelo torkelo closed this as completed Feb 9, 2018
@torkelo torkelo added this to the 4.6.0 milestone Feb 9, 2018
@jjustinwhite
Copy link

The color picker is great, but it would be nice to be able to set default colors. Having to change every metric on every panel by hand is tedious.

@barry-dutton-ck
Copy link

@torkelo I don't think this addresses the question. My understanding is that people want to alter the set of colors that Grafana chooses from when determining which colors to assign to each series in a graph. This is more for when you don't know specifically what your series are but know that things are related and want them colored similarly. This would also be helpful for doing things like preventing Grafana from assigning something a very dark color when the background is black!

I too would love to be able to change the set of colors that Grafana chooses from (possibly even specifying RGB ranges, but at least being able to give a list of actual colors?)

@jjustinwhite
Copy link

Yep, for us we like to have the first metric start as blue, the second metric is green, the third metric is yellow... and so on. Right now, Grafana defaults to green, then yellow, then teal (maybe?). We can switch these by hand of course using the color picker, but it isn't ideal to do this each time. Allowing an override, or for us to change the default coloring order would be great.

@CME64
Copy link

CME64 commented May 15, 2019

The feature is there and just needs voting, here is the request:
#17092

And here is the PR:
#17145

dsotirakis pushed a commit that referenced this issue Apr 26, 2023
* fix JWT query param leak

Co-authored-by: Gabriel MABILLE <[email protected]>
Co-authored-by: Kalle Persson <[email protected]>

* skip broken test

---------

Co-authored-by: jguer <[email protected]>
Co-authored-by: Gabriel MABILLE <[email protected]>
Co-authored-by: Kalle Persson <[email protected]>
dsotirakis pushed a commit that referenced this issue Apr 27, 2023
* fix JWT query param leak

Co-authored-by: Gabriel MABILLE <[email protected]>
Co-authored-by: Kalle Persson <[email protected]>

* skip broken test

---------

Co-authored-by: jguer <[email protected]>
Co-authored-by: Gabriel MABILLE <[email protected]>
Co-authored-by: Kalle Persson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests