|
boxwhisker question |
Posted by aldy on Jan-25-2012 22:21 |
|
Hi Peter, I made a larger version of a boxwhisker (attached: boxwhisker-02.png) from an
original chart made by someone else (attached: boxwhisker-01.png). I just copied all the
data needed from the original in making the larger version( except for the x and o marks).
Chart looks ok except that in the original, the 2 pairs of limits are plotted while in my
version, only 1 pair is shown(L2 & H2). I tried to fix this by adding the limits as a dataset to
a transparent line layer to but the result is not exactly the same (attached: boxwhisker-
03.png) in terms of the min and max of the y axis since it started at 0 while the original is
at 18. Why is chartdirector did not render it the same? Maybe I missed some settings?
|
Re: boxwhisker question |
Posted by Peter Kwan on Jan-26-2012 01:51 |
|
Hi aldy,
If the y-axis is auto-scaled, it will only consider the data values in the layers. If your axis mark is outside the axis range, it may not be displayed. If you want the marks to be always visible, we suggest people to add a transparent line that contains the mark values. So the method you are currently using is fine.
The y-axis scale may or may not start from 0. It depends on your data values. Even without the mark, the axis may start at 0 for some box-whisker data values. The "tendency" of the axis to start from 0 is configurable using Axis.setAutoScale. If you do not want the axis to have any preference to start from 0, you may set the zero affinity parameter to 0. For example:
$c->yAxis->setAutoScale(0.05, 0.05, 0);
Hope this can help.
Regards
Peter Kwan |
Re: boxwhisker question |
Posted by aldy on Jan-26-2012 02:18 |
|
Hi Peter, thanks again for the great support. SetAutoscale(0.2 ,0.2 ,0) seems to work fine. |
|