AAChartModel / AAChartKit

📈📊🚀🚀🚀An elegant modern declarative data visualization chart framework for iOS, iPadOS and macOS. Extremely powerful, supports line, spline, area, areaspline, column, bar, pie, scatter, angular gauges, arearange, areasplinerange, columnrange, bubble, box plot, error bars, funnel, waterfall and polar chart types. 极其精美而又强大的现代化声明式数据可视化图表框架,支持柱状图、条形图、折线图、曲线图、折线填充图、曲线填充图、气泡图、扇形图、环形图、散点图、雷达图、混合图等各种类型的多达几十种的信息图图表,完全满足工作所需.
https://cocoapods.org/pods/AAChartKit
MIT License
4.7k stars 751 forks source link

Swift 无法为 X 轴文字 Labels 添加点击事件 #1531

Closed gy6177 closed 5 months ago

AAChartModel commented 5 months ago

现已在 AAChartKit-Swift 中添加使用示例.

参考此次提交:

更新 demo 并运行.

对图表进行点击交互, 然后查看控制台 console 输出的信息, 可以看到类似如下内容:

 👇🏻👇🏻👇🏻------------------------------------------------------------------------------------------
 clicked X axis label category: Oct
 message = {
        category: Oct,
        index: 9,
    };
 👆👆👆------------------------------------------------------------------------------------------