yAxis labels very close to chart border


#1

![example](file:///Users/Basconje/Desktop/example.png)Hi

in my project i have to use yAxes in reverse position (SChartAxisPositionReverse),

but labels of points is very close to chart border , how i can make some padding

between values labels and chart border .

Thanks a lot .

I am working with ios version.


#2

I’m presuming you’re referring to the axis tickmarks? If so, you can achieve this by using the alterTickMark delegate method and doing something like this.

func sChart(chart: ShinobiChart!, alterTickMark tickMark: SChartTickMark!, beforeAddingToAxis axis: SChartAxis!)
{
    if(!axis.isXAxis())
    {
        tickMark.tickLabel.frame.origin.x += 5
    }
}

#3

Matt

like i posted problem in yAxes in reverse position.

and i solution that you post is for xAxes , not yAxes.


#4

The solution refers to the y axis as it negates the isXAxis flag. However having reread your question I think I may have misunderstood your problem. Can you please clarify if you are aiming to add padding to the tick marks on the y-axis or between the y-axis and the series itself?


#5

I need set padding between Y values ticks and chart border , not between ticks.

 __I  56I  :now its something like this 56 and chart border together

__I  56 I  : so i want it , move tickets say 5 mm left from chart border.

Thanks a lot for help.


#6

Hi basconje,

This is possible by using the “tickGap” property on the MajorTickStyle object on your axes’ style object.

chart.yAxis.style.majorTickStyle.tickGap = @10;

Let me know if you have any questions.

Kind regards,
Andrew Polkinghorn.