Changing Graph default colors

(Dafydd Hirst) #1

Can someone point me to where the graph module picks the default colors. im getting really board of changing them all the time.
Ive had a look but its not jumping out at me.

Ideally if just the first 4 can be changed to brown black gray and blue it would make my life easier.

(Paul) #2

Is this it?

I think it is copied straight over from flot

(Dafydd Hirst) #3

Thanks for that . It should indeed work Doesn’t seem to make any difference… The Hunt Continues

(Paul) #4

Just took a peek at the source of a random page and searched for “flot”, it seems to only ref <SERVER>/Lib/flot/jquery.flot.min.js navigate to that page and search for the color code “#edc240” shows it is included just once, so I’m guessing that’s where it needs changing perhaps?

That file contains just one (very long) line so it’s not easy to manipulate or link to a specific point. But if you look at the “raw” github page ( and search “edc240” you can find it, (likewise I expect you can find it using ctrl-w if you open it with nano locally, maybe at /var/www/html/emoncms/Lib/flot/jquery.flot.min.js).

I would expect you would need to force a browser refresh (ctrl-f5) to reload the file from your server once edited though. Please let us know if that works.

[edit - Many of the default config in that file gets overridden by individual visualisations, perhaps the default colors could be (easily?) overridden by inserting a cleverly placed line in emoncms (eg in the theme?), but that’s all a bit above my pay grade I’m afraid]

(Dafydd Hirst) #5

Your a LEGEND!!!
Thats working nicely. i had been in that earlier but not managed to find it .
Ill have a tinker now see what else can be achieved.
Thanks Buddy