AxisTooltip
AxisTooltip copied to clipboard
How to align text to top
I'm trying to understand how to apply the Axis Text to appear at the top of where axisToolTip is being applied.
Code:
.axisToolTip(isPresented: $tooltip, alignment: .bottomTrailing, constant: constant, foreground: {
Label("Contrary to popular belief, Lorem Ipsum is not simply random text.", systemImage: "heart")
.padding()
.frame(width: 200)
})
Result

Expected

I sort of figured it out, but I needed to have a constant similar to the below
@State private var constant: ATConstant = .init(axisMode: .top)
Is this the only way to specify the position in the case I have more than one Tooltip?
@arbyruns, Just make different configs for different axis