Hi i am developing a voting system. i want to show the result as in image. plz help me.

i am blanck. Can't think how to achive this...

Recommended Answers

All 3 Replies

My problem is how to show those percentage and mostly that blue line

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)

Hi,SheSaidImaPregy !
Thanks for reply. Yes the solution you suggested is worked. Thanks a lot. Have a nice time. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.