Author Topic: Easy Chart Builder - percentage bars?  (Read 3427 times)

ferpont

  • Tadpole
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Easy Chart Builder - percentage bars?
« on: March 06, 2012, 09:29:32 PM »
Hi there, I am new to this forum so I say hello to everybody!
I am actually trying to make this sweet plugin do the following: I want three chores to be displayed in just ONE groupname showing their progress in time as percentages. What I really want to show is the progress of different chores in the construction of a house, like "ceiling" "floors" "walls", but still to no avail... If I write percentages in the groupvalue (I use just one group) the chart is only extending up to the higher value, but not showing the 100%... I am racking my brains, but no cigar.

This is the shortcode on my wordpress page:
[easychart type="horizbar" height="50" title="Obra Montañeses: Progreso de Obra" groupnames="Progreso Obra Montañeses" groupcolors="005599" valuenames="Losas,Muros,Terminaciones," group1values="50%,30%,10%"]

Any input?
Yhank you in advance!
« Last Edit: March 06, 2012, 10:51:25 PM by ferpont »

doug@dyerware.com

  • Administrator
  • Sr. Member
  • *****
  • Posts: 456
  • Karma: +15/-0
    • View Profile
    • Email
Re: Easy Chart Builder - percentage bars?
« Reply #1 on: March 06, 2012, 11:28:41 PM »
Yeah, it scales the values to fill the plot area and this causes problems with folks plotting percentages.  If its acceptable to you you can cheat a bit by creating a sole white 100-value bar and shove your values in group2values:

[easychart type="horizbar" height="50" title="Obra Montañeses: Progreso de Obra" groupnames="Progreso Obra Montañeses," groupcolors="00000000,005599" valuenames="Losas,Muros,Terminaciones" group1values="100" group2values="50,30,10" ]


ferpont

  • Tadpole
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Easy Chart Builder - percentage bars?
« Reply #2 on: March 07, 2012, 07:41:36 PM »
Worked!!!  :)
I don't know why, but I had tried a very similar method with no success, maybe because the sole was set as three bars on the groupvalue1 and the whole chart as a horizontal bar stack. All resolved now wit your code, which I shall take as a reference for future charts
Thanks for the help!