Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Apr 2007
    Posts
    85
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Need some advice, best way to create a simple bar graph...

    Ok, I am attempting to create a bar graph like this...

    http://jyte.com/cl/i-dig-anime

    if you scroll a tiny bit down the page you will see it. Now I looked at it and it just looks like a simple image that is altered. I was thinking of possibly using some javascript to achieve this. Does anyone have any ideas? Any suggestions are greatly appreciated.
    I am on my way. :)

  • #2
    Senior Coder ahallicks's Avatar
    Join Date
    May 2006
    Location
    Lancaster, UK
    Posts
    1,134
    Thanks
    1
    Thanked 57 Times in 55 Posts
    It looks like the javascript dynamically alters the style percentage of the green and red bars respectively so that when a vote is cast the script reads whichever way it went, works out the percentages and then changes the style of the green and red bar accordingly. However, don't ask me how it's done because my javascript knowledge is very limited. View the source and navigate to the js file to get some ideas if know js.
    "write it for FireFox then hack it for IE."
    Quote Originally Posted by Mhtml View Post
    Domains are like women - all the good ones are taken unless you want one from some foreign country.
    Reputation is your friend

    Development & SEO Tools


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •