|
Changing the blank spacing when Axis::setIndent(true) is used |
Posted by Sal on Jul-10-2015 05:06 |
|
Hi Peter,
I know that ChartDir automatically inserts spacing for some type of graphs at the front and the end of the axis (Say X) (Bar chart etc...)
Working with a XYChart and after having described the X Axis range of values to plot for, I have added:
pAxisX->setIndent(true);
because I want to have some blank separation before the vertical axis() [at the front end of the X axis]
It looks like this blank size is equivalent to 1/2 number of pixels between Major Tics
I see and understand why you all did that (Bar chart display and few more)
I am plotting sets of points in some sort of unique areas using DrawArea::polygon() method
It is like I am wasting too much useful plotting area at the start and end of X axis.
I need the indentation, but the default amount is too much...
Q: Is there a way to override the size ChartDir defaults to, since the Chart I am using is not belonging to any of the predefined sets, you automatically supply indentation ?
Thanks
Sal |
Re: Changing the blank spacing when Axis::setIndent(true) is used |
Posted by Peter Kwan on Jul-10-2015 23:28 |
|
Hi Sal,
You can use Axis.setMargin to provide a margin in pixel units. For example:
// 20 pixels margin at both ends of the axis
pAxisX->setMargin(20, 20);
Hope this can help.
Regards
Peter Kwan |
|