How to display numbers as grid marks along axes for plotting in Swift Charts?

If you try to add a graph for a function in Apple Notes you can see that numbers marking coordinates are positioned along the axes (see screenshot 1).

But when I am making my own plot view with Swift Charts I don't see that option. Marks for X axis are positioned at the bottom, and marks for Y axis are positioned to the right. I don't see an API that can configure them to be shown along the axes.

Is there something that I am missing? Or is Apple just using some private API for that?

I could make a custom overlay to display these marks, but then I will have to adjust them while zooming myself, which can be problematic.

Swift Charts doesn't currently support real, zero-line axes; they're always at the edge of the plot area.

But you can create, for example, a zero-size PointMark, and/or a RuleMark acting as tick lines, and add an annotation for each value. You'll need to work with accessibility modifiers to avoid representing these visual annotation marks as actual data.

How to display numbers as grid marks along axes for plotting in Swift Charts?
 
 
Q