Poll graphics tweaked

Suggestions, complaints and news about coffeeshopdirect.com
Post Reply
User avatar
Lemming
Site Admin
Posts: 3433
Joined: Sat 5th Mar 2005 07:17 am
Location: UK
Contact:

Poll graphics tweaked

Post by Lemming »

I've fiddled around with the code that makes the bar graphs on polls.

For some time the bars on polls with just two options have been too long and those with the maximum 50 options have been too short.
This is because with two options one will have 50% or more whereas with 50 options no individual option is likely to be over 10%.

I've now biased the length of the bars according to the number of options.
It seems to work well on some existing polls, so:

The leading shops really stand out on the 50-option Favourite Coffeeshops poll now.

The two-option polls on popular shops like Nes Cafe now have a sensible length of bar for "like".

Gapie's 4-option boat days poll also works well.

I can foresee a slight problem when polls with large numbers of options are first started. If a poll has 50 options and one option has all of the votes then the bar will be very long but it should soon settle down.

Please let me know if you see any other problems.


Post Reply