0

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...

2
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by sbv
0

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

0

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)

0

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.