pChart 2.x forum
http://wiki.pchart.net/forum/

StackedBarChart: customize
http://wiki.pchart.net/forum/viewtopic.php?f=3&t=28
Page 1 of 1

Author:  serg2070 [ Wed Dec 15, 2010 9:19 am ]
Post subject:  StackedBarChart: customize

Hello!

Is there any posibility to customize my horizontal StackedBarChart:
1. Only integer numbers should be diplayed on a scale. (For example, my dataset contains only integer from 0 to 100).
2. I need, if its possible, my horizontal StackedBarChart starts from 0.


Probably I haven't precisely described my problem:
At a data set from 0 to 5 on a scale are displayed not only integers

Thanks
Serg

Attachments:
chart2.png
chart2.png [ 12.76 KiB | Viewed 7454 times ]

Author:  mice32 [ Wed Dec 15, 2010 6:50 pm ]
Post subject:  Re: StackedBarChart: customize

1. Try 'LabelSkip' => 5 parameter in pImage::drawScale function.
2. What about 'Mode' => SCALE_MODE_START0 parameter in same function?

Author:  serg2070 [ Thu Dec 16, 2010 10:55 am ]
Post subject:  Re: StackedBarChart: customize

Parameter SCALE_MODE_START0 works for the drawBarChart, but not for the drawStackedBarChart.
The parameter LabelSkip is applicable for axis Х, but not for an axis Y

The first image:
drawScale(array("Pos"=>SCALE_POS_TOPBOTTOM,"Mode"=>SCALE_MODE_ADDALL,"CycleBackground"=>true,"GridTicks"=>2,"GridR"=>39,"GridG"=>121,"GridB"=>170))

The second image:
drawScale(array("Pos"=>SCALE_POS_TOPBOTTOM,"Mode"=>SCALE_MODE_START0,"CycleBackground"=>true,"GridTicks"=>2,"GridR"=>39,"GridG"=>121,"GridB"=>170,"LabelSkip"=>2));


Serg

Attachments:
chart2-1.png
chart2-1.png [ 11.91 KiB | Viewed 7431 times ]
chart2-2.png
chart2-2.png [ 10.33 KiB | Viewed 7431 times ]

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/