Previous Thread
Next Thread
Print Thread
Hop To
Anonymous
Unregistered
Anonymous
Unregistered
The poll bars in the bar graph are miss-aligned. Why is the winner going all the way to the end? Shouln't that only be if the result is 100%?

BRIAN HUGHES, WAYMAN TISDALE, DAVE KOZ, AND ALL THE PREETY-PINK JAZZ MEN ARE AS ULTIMATE AS ULTIMATE BULLETIN BOARD

BORING BROWN COUNTRY MUSIC STINKS


[This message was edited by Charles Capps on August 23, 2002 at 10:50 AM.]

Anonymous
Unregistered
Anonymous
Unregistered
No, it's X% compared to the others.

So if 66% is the biggest, 66% -> 100%, 33% -> 50%, 6% -> 10%, etc

Anonymous
Unregistered
Anonymous
Unregistered
Correct. This is the designed behavior.

--
Charles Capps
Programmer, Infopop Corporation
Please do not contact me privately for support - post on the board or open a support ticket instead!

Anonymous
Unregistered
Anonymous
Unregistered
I'm with you, PJ.

I want my bars to be representative of the number, so if the width of the cell is:

********** (100%)

Then results of 50%, 30%, 20% and 10% would look like:

*****
***
**
*


If you want to change the code to behave that way, it is in public_polls.pl in the "Templates" directory.

Find:
Code
 			print qq( style="border: 1px solid black; background-color: $this_color; width: 

$width_percentage%"> ); 
and replace it with:
Code
			print qq( style="border: 1px solid black; background-color: $this_color; width: 

$vote_percentage%"> );
That's it!


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
1 members (Havenofsobriety), 458 guests, and 91 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)