User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 391,938 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,835 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 414 | Replies: 3 | Solved
Reply
Join Date: Jan 2008
Location: India
Posts: 143
Reputation: sbv is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 5
sbv's Avatar
sbv sbv is offline Offline
Junior Poster

Urgent help needed.

  #1  
Feb 27th, 2008
Hi
i am developing a voting system. i want to show the result as in image.
plz help me. Result.JPG
i am blanck. Can't think how to achive this...
Accept Challenges and Enjoy Coding... :)
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2008
Location: India
Posts: 143
Reputation: sbv is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 5
sbv's Avatar
sbv sbv is offline Offline
Junior Poster

Re: Urgent help needed.

  #2  
Feb 27th, 2008
My problem is how to show those percentage and mostly that blue line
Accept Challenges and Enjoy Coding... :)
Reply With Quote  
Join Date: Sep 2007
Posts: 1,054
Reputation: SheSaidImaPregy is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 61
SheSaidImaPregy SheSaidImaPregy is offline Offline
Veteran Poster

Re: Urgent help needed.

  #3  
Feb 27th, 2008
What you do is count the amount of votes for each, then do tests on it like:
if counts > 0 then
  'This is your percentage:
  counts = (counts/totalcounts)
  'This is your image width:
  imgWidth = Math.Round(counts)
else
  counts = 0
  imgWidth = 0
end if
Now this is based off the image having a max width of 100 pixels. Use simple math and divide where needed to if it is larger or smaller (150 pixels, multiply counts by 1.5.. 50 pixels, multiply counts by .5)
Last edited by SheSaidImaPregy : Feb 27th, 2008 at 9:15 am.
Reply With Quote  
Join Date: Jan 2008
Location: India
Posts: 143
Reputation: sbv is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 5
sbv's Avatar
sbv sbv is offline Offline
Junior Poster

Re: Urgent help needed.

  #4  
Feb 27th, 2008
Hi,SheSaidImaPregy !
Thanks for reply. Yes the solution you suggested is worked. Thanks a lot. Have a nice time.
Accept Challenges and Enjoy Coding... :)
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ASP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the ASP Forum

All times are GMT -4. The time now is 8:42 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC