Chart styling - padding, margins etc


#1

Hi,

Is it possible to add spacing around elements of the chart such as the axis labels and chart title? I’m trying to make a chart match a supplied design and everything’s too close together at the moment.

Thanks,

Chris


#2

Hi Chris,

You can add space between the tick label and the corresponding tick mark which will push the label either towards of away from the axis whether you supply a positive or negative value. This is done by setting the “tickGap” property to the number of pixels you want inbetween the tick label and the tick mark. This property can be found on your axis style’s majorTickStyle property.

You can reposition your chart’s title label yourself in the sChartRenderFinished method like so:

- (void)sChartRenderFinished:(ShinobiChart *)chart
{
    chart.titleLabel.frame = CGRectMake(0, 0, 150, 50);
}

Let me know if you have any other queries.

Kind Regards,
Andrew Polkinghorn