|
| |
|
|
womble
Posts: 5721 Joined: 3/14/2005 From: Living on the edge Status: offline
|
PHP total graph - 5/13/2007 7:44:55
Okay, never one to make life easy for myself, I need to develop some sort of fundraising tracking type graph for a site, kind of along the lines of TickerFactory, but not quite so tacky, and vertical rather than horizontal, and nice clean xhtml and accessible code as well, oh, and using specific images. Not too much to ask is it? Having spent half the morning googling for such a thing, I've come to the conclusion that such a thing either doesn't exist, or I'm using the wrong search terms. As ever, I'm guessing that such a thing ain't gonna exist off the peg (unless anyone knows otherwise), soooooo, my next question is, any ideas how I'd go about doing such a thing? I'm thinking PHP (*nix server), and hacking something from hotscripts.com to death. Having spent some time wandering around there I've found there's oodles of dynamic graph producing scripts, some which output as html/css, but as always getting the output xhtml valid and accessible is a problem. Anyone any ideas on where I should start with this? This looks like the closest to what I'm trying to acheive that I've found at the moment, but I've not looked at it in any great depth, so I'm not sure if the image is changeable, and as it outputs an image, it's not accessible really unless I use a longdesc or something. Hmmmmm..... *wanders off to find some food*
_____________________________
~~ "A cruel god ain't no god at all" ~~ ~~ Erase hate. Practice love. ~~
|
|
|
|
treetopsranch
Posts: 1209 From: Cottage Grove, OR, USA Status: offline
|
RE: PHP total graph - 5/13/2007 16:06:08
There are no amounts or totals shown on that thermometer graph. Wouldn't your viewers want to know what was being graphed? I thought that the whole idea of a graph was to present data at a glance without having to read tons of paragraphs to see what was being graphed.
_____________________________
Don from TreeTops Ranch, Oregon "I've got a taste for quality and luxury"
|
|
|
|
womble
Posts: 5721 Joined: 3/14/2005 From: Living on the edge Status: offline
|
RE: PHP total graph - 5/13/2007 16:41:57
Yep, 'tis nice isn't it Jaybee? <grin> Took all of about 5 minutes to set it up too, then probably another 5 to tweak the image. (I just changed the background colour of the thermometer because it's in a sidebar that's got a coloured background) quote:
There are no amounts or totals shown on that thermometer graph. Yes, ideally Don I would have liked an actual figure rather than a %, but I think that's probably the best I'm going to get that's xhtml strict and accessible and that easy to install. Mostly, as I've discovered the past couple of days looking for something to do this, anything that produces the "graph" using images is a huge PITA to make accessible. I've just realised though, the height of the "mercury" is controlled by the CSS, so in theory I could actually display the % or the £££ figure (the one that's between the <p> tags, as if you take out the display: none for the current-value class, that appears at the top of the "mercury". I'll see what the client prefers. The way I've set it up at the moment though it's got a heading of "Our fundraising target this year" and the amount, and then underneath it "total to date" and the amount, with the thermometer thing underneath. Really it's just a quick graphical representation of the rough progress for those who aren't too hot with figures so they can just look at the graph and see yeah, they're about half way there or whatever. There'll be more in depth information further into the site, but the client just wanted something visual for the home page. The only problem I've discovered is if they actually exceed the target - because the image is a fixed size and if the amount's more than 100% a red column shoots out of the top of it!
_____________________________
~~ "A cruel god ain't no god at all" ~~ ~~ Erase hate. Practice love. ~~
|
|
|
|
BobbyDouglas
Posts: 5479 Joined: 5/15/2003 From: Arizona Status: offline
|
RE: PHP total graph - 5/14/2007 14:21:47
I did something similar to this using CSS for our rating system @ ja mbo nie.com The width/position is hard coded into the html code, which will display the correct number of stars for the song. PHP simply outputs the correct width for each song, and then a style is applied to the image to display the correct rating.
_____________________________
Arizona Web Design - Mr Bobs Web Design in Arizona The Arizona Web Hosting Challenge
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|