-
-
Notifications
You must be signed in to change notification settings - Fork 752
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
当y轴数值都为0时,如何让y轴的0刻度线不在中间 #773
Labels
Comments
AAOptions *aaOptions = [AAOptionsConstructor configureChartOptionsWithAAChartModel:self.aaChartModel];
//设置刻度线个数
aaOptions.yAxis.tickAmount = @6;
//设置是否允许Y轴显示小数
aaOptions.yAxis.allowDecimals = NO; 这样设置后也不需要计算Y轴的刻度尺了。 |
aaOptions.yAxis
.minSet(@0)
.minRangeSet(@1) |
配置 AAOptions- (AAOptions *)customChartStyleWhenEveryDataValueIsZero {
AAChartModel *aaChartModel= AAChartModel.new
.chartTypeSet(AAChartTypeAreaspline)
.titleSet(@"Custom Chart Style When Every Data Value Is 0")
.categoriesSet(@[
@"Java", @"Swift", @"Python", @"Ruby", @"PHP", @"Go",@"C",
@"C#", @"C++", @"Perl", @"R", @"SQL"])
.yAxisTitleSet(@"摄氏度 (℃)")
.seriesSet(@[
AASeriesElement.new
.nameSet(@"Tokyo Hot")
.dataSet(@[@0, @0, @0, @0, @0, @0, @0, @0, @0, @0, @0, @0, ]),
]);
AAOptions *aaOptions = [AAOptionsConstructor configureChartOptionsWithAAChartModel:aaChartModel];
aaOptions.yAxis
.minSet(@0)
.minRangeSet(@1);
return aaOptions;
} 折线图图表效果 |
@AAChartModel 作者你好,尝试了设置 |
已在最新提交中解决, 按照 README 文档中所说, 将pod 更新至最新内容的 AAChartKit 即可. |
@AAChartModel 👍非常感谢~ |
Closed
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dataset 都为0时让y轴0刻度线和x轴重合,
The text was updated successfully, but these errors were encountered: