I have a ColumnSeries chart that I want to represent the majorTickLabel
as if hovering above the majorGridLine
but I don't see a straight forward way of controlling where the label draws beyond what I currently have which achieves insetting the label so that it 'hovers' above the graph.
Is this functionality missing from the API? If so, any suggestions on where to look at to achieve this?
Below is my current y-axis implementation
let yAxis = SChartNumberAxis()
yAxis.style.majorGridLineStyle.showMajorGridLines = true
yAxis.rangePaddingHigh = 500
yAxis.discontinuousTickLabelClipping = SChartDiscontinuousTickLabelClippingHigh
yAxis.axisPosition = SChartAxisPositionReverse
yAxis.style.majorTickStyle.tickGap = -45
goalChart.yAxis = yAxis
UPDATE- ANSWER BELOW
Thanks Sammy, simply offsetting the tickLabel resolved my issue. Below is a copy of the solution used.
@objc func sChart(chart: ShinobiChart!, alterTickMark tickMark: SChartTickMark!, beforeAddingToAxis axis: SChartAxis!) {
if !axis.isXAxis() {
if let label = tickMark.tickLabel {
label.frame.offset(dx: 0, dy: -8)
}
}
}