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

我想请教一个问题 #23

Closed
FanYuanBo888 opened this issue May 23, 2017 · 2 comments
Closed

我想请教一个问题 #23

FanYuanBo888 opened this issue May 23, 2017 · 2 comments

Comments

@FanYuanBo888
Copy link

那个扇形图,我能不能把具体的数据 展示在扇形上,不使用拖线的方式。手机屏幕太小,拖了线扇形图就会变小

@AAChartModel
Copy link
Owner

AAChartModel commented May 26, 2017

AAChartModel *chartModel= AAObject(AAChartModel)
        .chartTypeSet(AAChartTypePie)
        .titleSet(@"编程语言热度")
        .subtitleSet(@"虚拟数据")
        .dataLabelEnabledSet(false)//是否直接显示扇形图数据, 设置为 false 将不显示拖线
        .yAxisTitleSet(@"摄氏度")
        .seriesSet(
                   @[AAObject(AASeriesElement)
                     .nameSet(@"语言热度占比")
                     .dataSet(@[
                                @[@"Java"  , @67],
                                @[@"Swift" , @44],
                                @[@"Python", @83],
                                @[@"OC"    , @11],
                                @[@"Ruby"  , @42],
                                @[@"PHP"   , @31],
                                @[@"Go"    , @63],
                                @[@"C"     , @24],
                                @[@"C#"    , @888],
                                @[@"C++"   , @66],
                                ]),
                     ]
                   
                   )
        ;

从上段示例代码中,你可以看出,如果因手机屏幕太小受限,可以设置 AAChartModel 属性dataLabelEnabled值为 false,这时扇形图就不显示拖线了

@AAChartModel
Copy link
Owner

AAChartModel commented May 26, 2017

如果按照你所提的要求,将具体的数据展示在扇形上,得到的效果如下
88b6c3a3-d9a2-4484-8a32-3f4b8e7f0392
数据占比较小的部分文字会挤压在一起,造成一种视觉上的混乱感觉.这样的最终效果可能不会是你所想要的结果.不过你真的需要的话,可以考虑添加的.

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

2 participants