Closed AAChartModel closed 6 months ago
Hello @AAChartModel, did you try this solution?
I tried it, it is only useful for tooltip, not the crosshair
Hello @AAChartModel, did you find a solution?
I haven't found any solution so far.
HI @AAChartModel! Apologies for the delayed response. Here's another option to hide the tooltip with a delay:
let tooltip = HITooltip()
options.tooltip = tooltip
let series = HIColumn()
series.point = HIPoint()
series.point.events = HIEvents()
series.point.events.click = HIFunction(closure: { (context) in
guard let context = context else {return}
DispatchQueue.main.asyncAfter(deadline: .now() + 5.0) {
options.tooltip.hide()
}
})
You can apply a similar approach for the crosshair:
let xAxis = HIXAxis()
xAxis.crosshair = HICrosshair()
options.xAxis = [xAxis]
let series = HIColumn()
series.point = HIPoint()
series.point.events = HIEvents()
series.point.events.click = HIFunction(closure: { (context) in
guard let context = context else {return}
DispatchQueue.main.asyncAfter(deadline: .now() + 5.0) {
options.xAxis.first?.hideCrosshair()
}
})
Closing due to inactivity. Please feel free to reopen the ticket if you have any further questions.
Can the crosshair be auto-hide after a few seconds?
Just like auto-hide tooltip, refer to the issue:
97