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.71k stars 750 forks source link

饼状图过小,如何删除饼状图自身的内边距 #1408

Closed lhpkxywm closed 1 year ago

lhpkxywm commented 1 year ago

如题

AAChartModel commented 1 year ago

重复问题, 参考:

AAChartModel commented 1 year ago

在 AAChartKit 中对应的内容为:

AAPropStatementAndPropSetFuncStatement(strong, AAChart, NSArray     *, margin)// 图表外边缘和绘图区域之间的边距。 数组中的数字分别表示顶部,右侧,底部和左侧 ([👆,👉,👇,👈])。 也可以使用 marginTop,marginRight,marginBottom 和 marginLeft 来设置某一个方向的边距。默认值为[null]
AAPropStatementAndPropSetFuncStatement(strong, AAChart, NSNumber    *, marginTop) //👆
AAPropStatementAndPropSetFuncStatement(strong, AAChart, NSNumber    *, marginRight) //👉
AAPropStatementAndPropSetFuncStatement(strong, AAChart, NSNumber    *, marginBottom) //👇
AAPropStatementAndPropSetFuncStatement(strong, AAChart, NSNumber    *, marginLeft) //👈
AAPropStatementAndPropSetFuncStatement(strong, AAChart, NSArray     *, spacing) // 图表的内边距,指图表外边缘和绘图区之间的距离,数组中的数字分别表示顶部,右侧,底部和左侧([👆,👉,👇,👈])。可以使用选项 spacingTop,spacingRight,spacingBottom 和 spacingLeft 来指定某一个内边距。 默认是:[10, 10, 15, 10].
AAPropStatementAndPropSetFuncStatement(strong, AAChart, NSNumber    *, spacingTop) //👆
AAPropStatementAndPropSetFuncStatement(strong, AAChart, NSNumber    *, spacingRight) //👉
AAPropStatementAndPropSetFuncStatement(strong, AAChart, NSNumber    *, spacingBottom) //👇
AAPropStatementAndPropSetFuncStatement(strong, AAChart, NSNumber    *, spacingLeft) //👈
AAChartModel commented 1 year ago

参考在线文档:

lhpkxywm commented 1 year ago

试了,margin和spacing都设置成0了,还是有边距啊。

AAChartModel commented 1 year ago

你现在的视图效果是什么样子的?

AAChartModel commented 1 year ago

你再调整一下饼图的 size 试试, 也就是调整AASeriesElementsize 属性.