PDA

View Full Version : Custom chart colors



Bok
08-09-2006, 09:48 AM
and cI've been tinkering with this and wanted to get some feedback before going further...

Simple at the moment, in statstool there is a new column named 'Chart Color 1'. This is in hex format (as that is what chart director uses, sorry!). It is of the format AAxxyyzz, where AA is a transparency option of 00 to FF (00 is not transparent).

Anyways, this allows you to set the colors of the charts, initially only on the userstats.php page as that's all I've coded, but it's simple to do the others too. It will only show up if you are logged in, otherwise it'll show the default colors. If you are logged in, go here (http://stats.free-dc.org/new/userstats.php?proj=rsi&name=3042) after altering the color in statstool and check the graphs. For instance 800000FF gives a semi-transparent blue color.

It opens up the option to set many custom options within the stats, is there interest in this at all ? What kind of things would you like to be able to control....?

Bok

AMDave
08-09-2006, 10:30 AM
Love the idea.
All features in shades of green would be terrific. snicker snicker j/k

If you can go that way you can set options for background, text, borders etc, but I'd leave the graph line colours for last as there are some tricks there depending on background & grid-line colours wich "could" confuse the novice user. (diagnosing chart lines that have blended with the background colour is so much fun)

A fixed set of optional CSSs might be the go to reduce load on the server. I'm apprehensive about the sever-side render load if all users had independant optional colour settings affecting rendering on the charts etc. Not sure how you have your http cache set up, but it would rapidly reduce the frequency of hits on a set of cached renders. If your cached hits are already low then there's no issue - and then I'll have all mine in green thanks :)

just some thoughts.

Bok
08-10-2006, 01:59 AM
Added a couple more options whilst tidying up statstool a little..

Bok