mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-23 09:20:08 +00:00
增加AxisLabel的onZero参数可将Label显示在0刻度上
This commit is contained in:
@@ -757,7 +757,8 @@ namespace XCharts
|
||||
|
||||
private Vector3 GetLabelXPosition(float scaleWid, int i, int xAxisIndex, XAxis xAxis)
|
||||
{
|
||||
var startY = xAxisIndex == 0 ? coordinateY : coordinateY + coordinateHeight;
|
||||
var startY = coordinateY + (xAxis.axisLabel.onZero ? m_YAxises[xAxisIndex].runtimeZeroYOffset : 0);
|
||||
if (xAxisIndex > 0) startY += coordinateHeight;
|
||||
var posY = 0f;
|
||||
var inside = xAxis.axisLabel.inside;
|
||||
if ((inside && xAxisIndex == 0) || (!inside && xAxisIndex == 1))
|
||||
|
||||
Reference in New Issue
Block a user