Configuring grid lines for the axes descriptor

Hi! I was trying out the Audio Graph APIs. I'm trying to add gridlines to my chart's data axes descriptor, but doing so doesn't seem to make any difference to me. So I'm surely missing something...

I was watching the WWDC21 session "Bring accessibility to charts in your app", and the presenter says: "When you provide grid lines, they're represented in the audio graph as haptic feedback during playback and interaction." And that is quite interesting!

This is how I'm trying to do it.

var accessibilityChartDescriptor: AXChartDescriptor? {
        get {
            let xAxis = AXNumericDataAxisDescriptor(title: "Lines of code", range: 0...10, gridlinePositions: [2.5, 5.0, 7.5]) { number in
                "\(number) lines"
            }

            let yAxis = AXNumericDataAxisDescriptor(title: "Lines of code", range: 0...40, gridlinePositions: []) { number in
                "\(number) cups"
            }

            let dataSeriesDescriptor = AXDataSeriesDescriptor(name: "Lines of code per coffees taken", isContinuous: false, dataPoints: [20, 30, 35, 32, 28, 9, 4, 3, 15, 1].enumerated().map({ (point, index) in
                AXDataPoint(x: Double(point), y: Double(index), additionalValues: [], label: nil)
            }))

            return AXChartDescriptor(title: "Cups of coffee vs. lines of code", summary: "This chart shows how coffee consumption impacts coding ability", xAxis: xAxis, yAxis: yAxis, additionalAxes: [], series: [dataSeriesDescriptor])
        }

        set {}
    }

But for me, it already showed grid lines even if I didn't configure them. Once I do, they don't change visually and it is not adding any haptic feedback...

Any pointers on how I can achieve having gridlines that provide haptic feedback would be hugely appreciated! Many thanks!

Hello and thanks so much for your detailed post about the issue you are experiencing with this API. Your usage looks correct, so we are investigating what might be wrong on our side which would cause you to not see the expected behavior.

Configuring grid lines for the axes descriptor
 
 
Q