Getting rid of plot area bottom margin/padding


#1

I have a few charts displaying side by side and they have a bit of padding at the bottom (the top part looks ok).

Here’s an image showing this: http://i.imgur.com/ZD7Xq9t.png , it’s obvious it’s all in the shinobi chart if you look at the axis titles on the side. Interestingly, the padding amounts are different even though I’m using the same code to display the charts.

Is there a setting to make the charts expand all the way to the bottom?

Thanks!


#2

Hi radu,

How have you hidden the x-axis on the 3 charts to the right? The recommended way would be to use the SChartAxisStyle;

axisStyle.majorTickStyle.showTicks = NO;
axisStyle.majorTickStyle.showLabels = NO;
axisStyle.minorTickStyle.showTicks = NO;

#3

Sorry, I didn’t specify I was using android (though the screenshot makes it kinda obvious).

I’m using this for all charts (minor ticks shown is false by default so no need to do that):

TickStyle xTickStyle = xAxis.getStyle().getTickStyle();
xTickStyle.setLabelsShown(false);
xTickStyle.setMajorTicksShown(false);

#4

I also tried adding these but still having the same problem:

xAxis.setExpectedLongestLabel("");
xTickStyle.setTickGap(0);
xTickStyle.setLineWidth(0);
xTickStyle.setLineLength(0);
xTickStyle.setMinorTicksShown(false);

#5

Hi Radu,

Have you tried setting the line width of the axis itself to 0 eg. xAxis.getStyle().setLineWidth(0.0f); (and calling chart.redrawChart() if appropriate). By default the axis line is transparent but has a width.

Kind regards,

Patrick


#6

Thanks Patrick, setting the line wifth on the axis style works perfectly!