mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-21 16:00:24 +00:00
优化Axis的AxisName的偏移设置
This commit is contained in:
@@ -64,6 +64,7 @@ slug: /changelog
|
||||
|
||||
## master
|
||||
|
||||
* (2022.11.27) 优化`Axis`的`AxisName`的偏移设置
|
||||
* (2022.11.27) 优化`Comment`的位置,用`Location代替Position`
|
||||
* (2022.11.27) 优化`Tooltip`的`LineStyle`支持设置`Shadow`时的颜色
|
||||
* (2022.11.26) 优化`LabelLine`的`symbol`默认不显示
|
||||
|
||||
@@ -421,7 +421,7 @@ namespace XCharts
|
||||
label.SetActive(axis.axisName.labelStyle.show);
|
||||
label.SetPosition(axis.position == Axis.AxisPosition.Top ?
|
||||
new Vector2(zeroPos.x - offset.x, axisStartY + relativedLength + offset.y + axis.offset) :
|
||||
new Vector2(zeroPos.x - offset.x, posY));
|
||||
new Vector2(zeroPos.x - offset.x, posY + offset.y));
|
||||
break;
|
||||
|
||||
case LabelStyle.Position.Middle:
|
||||
@@ -431,7 +431,7 @@ namespace XCharts
|
||||
label.SetActive(axis.axisName.labelStyle.show);
|
||||
label.SetPosition(axis.position == Axis.AxisPosition.Top ?
|
||||
new Vector2(axisStartX + axisLength / 2 + offset.x, axisStartY + relativedLength - offset.y + axis.offset) :
|
||||
new Vector2(axisStartX + axisLength / 2 + offset.x, posY));
|
||||
new Vector2(axisStartX + axisLength / 2 + offset.x, posY + offset.y));
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -441,7 +441,7 @@ namespace XCharts
|
||||
label.SetActive(axis.axisName.labelStyle.show);
|
||||
label.SetPosition(axis.position == Axis.AxisPosition.Top ?
|
||||
new Vector2(axisStartX + axisLength + offset.x, axisStartY + relativedLength + offset.y + axis.offset) :
|
||||
new Vector2(axisStartX + axisLength + offset.x, posY));
|
||||
new Vector2(axisStartX + axisLength + offset.x, posY + offset.y));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -458,7 +458,7 @@ namespace XCharts
|
||||
label.SetActive(axis.axisName.labelStyle.show);
|
||||
label.SetPosition(axis.position == Axis.AxisPosition.Right ?
|
||||
new Vector2(axisStartX + relativedLength + offset.x + axis.offset, axisStartY - offset.y) :
|
||||
new Vector2(posX, axisStartY - offset.y));
|
||||
new Vector2(posX + offset.x, axisStartY - offset.y));
|
||||
break;
|
||||
|
||||
case LabelStyle.Position.Middle:
|
||||
@@ -468,7 +468,7 @@ namespace XCharts
|
||||
label.SetActive(axis.axisName.labelStyle.show);
|
||||
label.SetPosition(axis.position == Axis.AxisPosition.Right ?
|
||||
new Vector2(axisStartX + relativedLength - offset.x + axis.offset, axisStartY + axisLength / 2 + offset.y) :
|
||||
new Vector2(posX, axisStartY + axisLength / 2 + offset.y));
|
||||
new Vector2(posX + offset.x, axisStartY + axisLength / 2 + offset.y));
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -478,7 +478,7 @@ namespace XCharts
|
||||
label.SetActive(axis.axisName.labelStyle.show);
|
||||
label.SetPosition(axis.position == Axis.AxisPosition.Right ?
|
||||
new Vector2(axisStartX + relativedLength + offset.x + axis.offset, axisStartY + axisLength + offset.y) :
|
||||
new Vector2(posX, axisStartY + axisLength + offset.y));
|
||||
new Vector2(posX + offset.x, axisStartY + axisLength + offset.y));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user