AAChartModel/AAChartKit

柱形图的Y轴坐标轴刻度线怎么能设置为虚线?

Closed this issue · 4 comments

柱形图设置了 aaOptions.yAxis.tickPositions=@[@0,@20,@40];怎么将刻度线设置为虚线,而不是用 _aaChartModel
.yAxisPlotLinesSet,因为这么设置的刻度线会压在图形上方,而默认的刻度线会在图形下方。并且设置了aaOptions.yAxis.tickWidth和aaOptions.yAxis.tickColor并没有起到效果,不知道问题出在哪儿?

  1. 刻度线只有一点点的长度, 设置成虚线意义不大, 而且也不支持设置成虚线.
  2. aaOptions.yAxis.tickWidthaaOptions.yAxis.tickColor 设置的是刻度线相关内容, 然而刻度线 tick标志线 yAxisPlotLines 是两个东西.
  3. 如果你是想将 yAxisPlotLines 设置成虚线, 参考: https://api.highcharts.com/highcharts/xAxis.plotLines.dashStyle

我感觉你应该是把刻度线 tick标志线 plotLines 以及网格线 gridLine 这三者的概念弄混了, 可以先查看在线文档:

Snip20240307_2
感谢您的回复。想再次确认一下,图中的这个横线可以自定义颜色,或者换成虚线吗?

你图中所示的是 Y 轴的网格线 gridLine , 对应的的属性是 AAYAxis 中的如下内容:

AAPropStatementAndPropSetFuncStatement(strong, AAYAxis, NSNumber *, gridLineWidth) // y 轴网格线宽度
AAPropStatementAndPropSetFuncStatement(copy,   AAYAxis, NSString *, gridLineColor) // y 轴网格线颜色
AAPropStatementAndPropSetFuncStatement(copy,   AAYAxis, NSString *, gridLineDashStyle) //网格线线条样式,所有可用的线条样式参考:Highcharts线条样式
AAPropStatementAndPropSetFuncStatement(strong, AAYAxis, NSNumber *, gridZIndex) //网格线的层叠值(zIndex) 默认是:1.
AAPropStatementAndPropSetFuncStatement(copy,   AAYAxis, AAChartYAxisGridLineInterpolationType, gridLineInterpolation) //Polar charts only. Whether the grid lines should draw as a polygon with straight lines between categories, or as circles. Can be either circle or polygon. 默认是:null.

参考对应的在线文档:

非常感谢!