-
-
Notifications
You must be signed in to change notification settings - Fork 753
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
如何设置 x 轴两边的间隙? #637
Comments
忍不住为作者点个👍 |
这个确实还没有找到比较好的解决办法 |
不过设置Y轴偏移量勉强算是有点效果吧
AAChartModel *aaChartModel = AAChartModel.new
.chartTypeSet(AAChartTypeAreaspline)
.titleSet(@"")
.subtitleSet(@"")
.categoriesSet(@[@"一月", @"二月", @"三月", @"四月", @"五月", @"六月",
@"七月", @"八月", @"九月", @"十月", @"十一月", @"十二月"])
.yAxisTitleSet(@"")
.backgroundColorSet(@"#FFFFFF")
.markerRadiusSet(@0)
.yAxisLineWidthSet(@1)
.yAxisGridLineWidthSet(@0)
.legendEnabledSet(false)
.stackingSet(AAChartStackingTypeNormal)
.easyGradientColorsSet(true)
.seriesSet(@[
AASeriesElement.new
.nameSet(@"Tokyo Hot")
.colorSet((id)AAGradientColor.deepSeaColor)
.dataSet(@[@7.0, @6.9, @2.5, @14.5, @18.2, @21.5, @5.2, @26.5, @23.3, @45.3, @13.9, @9.6]),
]
);
AAOptions *aaOptions = [AAOptionsConstructor configureChartOptionsWithAAChartModel:aaChartModel];
AAYAxis *aaYAxis = aaOptions.yAxis;
aaYAxis.offsetSet(@(-15));//设置Y轴偏移量
[aaChartView aa_drawChartWithOptions:aaOptions];
|
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
如图所示,我希望可以修改 x 轴左侧和右侧的间隙
我发现:当不设置 categories 的时候,默认是没有间隙的,但是一旦设置了 categories ,就会出现在这个间隙。
我尝试使用了 AAOptions - AAXAxis 的 tickmarkPlacement 等相关属性
也尝试了设置 AAYAxis 的 offset ,都没有达到我的预期效果
#577 也是类似的问题
此外,参照 # 537 ,发现曲线图也是类似柱形图的结构 ..
但是关于设置两边间隙,还是没有头绪 ..
The text was updated successfully, but these errors were encountered: