Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

扇形图设置成环形图 #32

Closed
q13945951476 opened this issue Aug 9, 2017 · 4 comments
Closed

扇形图设置成环形图 #32

q13945951476 opened this issue Aug 9, 2017 · 4 comments

Comments

@q13945951476
Copy link

你好,请问,怎么显示环形图,没有找到怎么设置。

@AAChartModel
Copy link
Owner

现已为AAChartKit项目中的 AASeriesElement模型添加了innerSize字符串属性,你可以即时更新一下AASeriesElement.h,AASeriesElement.m文件内容.

@AAChartModel
Copy link
Owner

AAChartModel commented Aug 9, 2017

这样配置AAChartModel模型对象

        AAChartModel *chartModel= AAObject(AAChartModel)
        .chartTypeSet(AAChartTypePie)
        .titleSet(@"编程语言热度")
        .subtitleSet(@"虚拟数据")
        .dataLabelEnabledSet(true)//是否直接显示扇形图数据
        .yAxisTitleSet(@"摄氏度")
        .seriesSet(
                   @[
                     AAObject(AASeriesElement)
                     .nameSet(@"语言热度占比")
                     .innerSizeSet(@"35%")//设置扇形图中空的圆形半径区域大小
                     .dataSet(@[
                                @[@"Java"  , @67],
                                @[@"Swift" , @44],
                                @[@"Python", @83],
                                @[@"OC"    , @11],
                                @[@"Ruby"  , @42],
                                @[@"PHP"   , @31],
                                @[@"Go"    , @63],
                                @[@"C"     , @24],
                                @[@"C#"    , @888],
                                @[@"C++"   , @66],
                                ]),
                     ]
                   )
        ;

您将得到最终所要的环形图.

附言

注意示例代码中的关键语句innerSizeSet(@"35%")//设置扇形图中空的圆形半径区域大小,innerSize 取值范围为@"0%"@"100"%

@q13945951476
Copy link
Author

灰常感谢!

@wangxihu
Copy link

你好!请问如何修改xy轴数字的颜色以及语言类型name的颜色

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants