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

柱状图 dataLabels的设置问题 #1539

Closed gaojing0428 closed 3 months ago

gaojing0428 commented 3 months ago

你好,我的柱状图上面,两个数据是一样的,这个时候dataLabels只显示了一个,这个怎么解决? Snip20240326_13

gaojing0428 commented 3 months ago

相差不多的时候,也是只显示一个

AAChartModel commented 3 months ago

参考相同问题:

gaojing0428 commented 3 months ago

label全部显示出来了,但是文字会重叠,有办法解决吗? image

AAChartModel commented 3 months ago
//允许DataLabels重叠
AAPropStatementAndPropSetFuncStatement(assign, AADataLabels, BOOL, allowOverlap)

这个有点难搞, 毕竟你的数值都太接近了. 这个属性allowOverlap = true就是允许重叠的意思.

真的非要避免重叠, 只能

gaojing0428 commented 3 months ago

谢谢,分别调整了align属性,解决了~