Page Index Toggle Pages: [1] 2  Send TopicPrint
Very Hot Topic (More than 25 Replies) Pie Chart for Polls in YaBB 2.2, 2.2.1 and 2.2.2 (Read 18327 times)
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
Pie Chart for Polls in YaBB 2.2, 2.2.1 and 2.2.2
Mar 16th, 2008 at 8:37pm
Print Post  
Version 1.1

This mod gives users the option to see Poll results as a Pie Chart.

The Poll-author can:
- select the color for each pie slice
- choose if the option-text and vote-results should be shown as labels next to each pie slice (default) or as legends next to the pie chart
- change the radius for the pie
- split one or more slices from the pie (explode)

Added YaBB 2.2.2 compatible mod file.
« Last Edit: Jun 6th, 2008 at 8:42pm by Carsten »  

pollpie11_yabb22_221_222.zip ( 18 KB | Downloads )

If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
Re: Pie Chart for Polls in YaBB 2.2 and 2.2.1
Reply #1 - Mar 16th, 2008 at 8:38pm
Print Post  
Screnshot:
« Last Edit: Mar 25th, 2008 at 12:56am by Carsten »  

pollpie.gif ( 35 KB | Downloads )
pollpie.gif

If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
Jeff
God Member
*****
Offline


There are no bugs there
are only features

Posts: 2552
Joined: Jan 14th, 2005
Gender: Male
Re: Pie Chart for Polls in YaBB 2.2 and 2.2.1
Reply #2 - Mar 16th, 2008 at 9:15pm
Print Post  
Hi
looks super, but in Step 4 i have height tag in left and right. For YaBB 2.2.1  Wink

Quote:
               <div style="float: left; text-align: left;">&nbsp;<img src="$imagesdir/poll_left.gif" height="12" align="middle" alt="" /><img src="$imagesdir/poll_middle.gif" height="12" width="$pollbar" align="middle" alt="" /><img src="$imagesdir/poll_right.gif" height="12" align="middle" alt="" /> $votes[$i] ($pollpercent%)</div>



looks awesome, after installed this mod.  8)
  

greetings
Jeff
Back to top
WWW  
IP Logged
 
ccarr
Ex Member


Re: Pie Chart for Polls in YaBB 2.2 and 2.2.1
Reply #3 - Mar 16th, 2008 at 9:35pm
Print Post  
Thanks Carsten

Works just great in my v2.2. Some fancy maths going on there.

I love to see new mods  Smiley

How easy would it be for the user to change the colours in the piechart.js file? The default colours look great on a light background but I would like to change my default colours to more primary colours for a black background.  As in this example:

  
Back to top
 
IP Logged
 
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
Re: Pie Chart for Polls in YaBB 2.2 and 2.2.1
Reply #4 - Mar 16th, 2008 at 9:53pm
Print Post  
Quote:
Hi
looks super, but in Step 4 i have height tag in left and right. For YaBB 2.2.1  Wink

Oups - forgot about that small change - new zip attached to first post now with two seperate mod files for 2.2 and 2.2.1
  

If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
Jeff
God Member
*****
Offline


There are no bugs there
are only features

Posts: 2552
Joined: Jan 14th, 2005
Gender: Male
Re: Pie Chart for Polls in YaBB 2.2 and 2.2.1
Reply #5 - Mar 17th, 2008 at 9:21am
Print Post  
thnx Carsten
so a bug I found, if Poll Result is hidden, until is closed, the icons is still display.
  

greetings
Jeff
Back to top
WWW  
IP Logged
 
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
Re: Pie Chart for Polls in YaBB 2.2 and 2.2.1
Reply #6 - Mar 17th, 2008 at 10:06pm
Print Post  
Fixed - new zip attached to first post.
  

If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
Jeff
God Member
*****
Offline


There are no bugs there
are only features

Posts: 2552
Joined: Jan 14th, 2005
Gender: Male
Re: Pie Chart for Polls in YaBB 2.2 and 2.2.1
Reply #7 - Mar 17th, 2008 at 11:08pm
Print Post  
thnx.  Cheesy
  

greetings
Jeff
Back to top
WWW  
IP Logged
 
Larian
Senior Member
****
Offline



Posts: 316
Location: Leipzig
Joined: Oct 22nd, 2002
Gender: Male
Re: Pie Chart for Polls in YaBB 2.2 and 2.2.1
Reply #8 - Mar 19th, 2008 at 11:04am
Print Post  
I have a vote with 14 answers, so the pie lokes bad. The text is'nt the problem (lokks not good, but i think there is'nt a solution), but it looks like the colors repaeting after 12 pies?

Look at http://www.4u-treff.de/cgi-bin/yabb2/YaBB.cgi at the poll at first site.

Larian
  
Back to top
 
IP Logged
 
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
Re: Pie Chart for Polls in YaBB 2.2 and 2.2.1
Reply #9 - Mar 19th, 2008 at 3:37pm
Print Post  
@Larian - agreed - pie charts are not the best way of showing that many options. In next beta release i'll add a new option for the poll author to change the pie radius which will make it possible to increase the space available to pie lables. About the colors - the script auto-generate 60 different colors (5 * 4 * 3) - and i actually see 14 different colors on your example-pie.

@ccarr and Larian - next beta release will include options for the pie-author to change the default color for each pie-slice. Expect next beta-release in a few days  Smiley
  

If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
ccarr
Ex Member


Re: Pie Chart for Polls in YaBB 2.2 and 2.2.1
Reply #10 - Mar 19th, 2008 at 6:17pm
Print Post  
Thanks for the response Carsten.  Smiley

  
Back to top
 
IP Logged
 
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
Re: Pie Chart for Polls in YaBB 2.2 and 2.2.1
Reply #11 - Mar 21st, 2008 at 8:57pm
Print Post  
added options to change colors for each pie-slice and to change the pie-radius. Also made the bar chart in colors. New zip package attached to first post.
  

If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
Jeff
God Member
*****
Offline


There are no bugs there
are only features

Posts: 2552
Joined: Jan 14th, 2005
Gender: Male
Re: Pie Chart for Polls in YaBB 2.2 and 2.2.1
Reply #12 - Mar 21st, 2008 at 9:12pm
Print Post  
woow. thats super.  Cheesy Will test it later, while i working on a special mod for Easter  Grin

Edit:
Works great.  8) Thnx Carsten.
  

greetings
Jeff
Back to top
WWW  
IP Logged
 
ccarr
Ex Member


Re: Pie Chart for Polls in YaBB 2.2 and 2.2.1
Reply #13 - Mar 21st, 2008 at 10:34pm
Print Post  
That's so cool. Thanks Carsten.  Smiley
  
Back to top
 
IP Logged
 
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
Re: Pie Chart for Polls in YaBB 2.2 and 2.2.1
Reply #14 - Mar 22nd, 2008 at 1:10am
Print Post  
made the font color for the option-labels on the pie-chart use the correct active css color style. New package attached to first post.

Guess this is as close as we get to a final release.
  

If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint