mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-22 08:50:10 +00:00
修复Axis的indicatorLabel无法隐藏的问题
This commit is contained in:
@@ -80,6 +80,7 @@ slug: /changelog
|
|||||||
|
|
||||||
## master
|
## master
|
||||||
|
|
||||||
|
* (2025.11.05) 修复`Axis`的`indicatorLabel`无法隐藏的问题
|
||||||
* (2025.11.03) 增加`Tooltip`的`Title`可通过`TitleLabelStyle`的`numericFormatter`格式化时间显示 (#353)
|
* (2025.11.03) 增加`Tooltip`的`Title`可通过`TitleLabelStyle`的`numericFormatter`格式化时间显示 (#353)
|
||||||
* (2025.10.30) 增加`Chart`的`useUtc`参数设置显示时间是否用UTC时间
|
* (2025.10.30) 增加`Chart`的`useUtc`参数设置显示时间是否用UTC时间
|
||||||
* (2025.10.30) 优化`Candlestick`对时间轴的支持
|
* (2025.10.30) 优化`Candlestick`对时间轴的支持
|
||||||
|
|||||||
@@ -255,6 +255,11 @@ namespace XCharts.Runtime
|
|||||||
{
|
{
|
||||||
if (label == null) return;
|
if (label == null) return;
|
||||||
if (double.IsNaN(axis.context.pointerValue)) return;
|
if (double.IsNaN(axis.context.pointerValue)) return;
|
||||||
|
if (!axis.show || !axis.indicatorLabel.show)
|
||||||
|
{
|
||||||
|
label.SetActive(false, false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
label.SetActive(true, true);
|
label.SetActive(true, true);
|
||||||
label.SetTextActive(true);
|
label.SetTextActive(true);
|
||||||
label.SetPosition(axis.context.pointerLabelPosition + axis.indicatorLabel.offset);
|
label.SetPosition(axis.context.pointerLabelPosition + axis.indicatorLabel.offset);
|
||||||
@@ -732,6 +737,7 @@ namespace XCharts.Runtime
|
|||||||
|
|
||||||
private void DrawXAxisIndicator(VertexHelper vh, Tooltip tooltip, GridCoord grid)
|
private void DrawXAxisIndicator(VertexHelper vh, Tooltip tooltip, GridCoord grid)
|
||||||
{
|
{
|
||||||
|
if (!tooltip.lineStyle.show) return;
|
||||||
var xAxes = chart.GetChartComponents<XAxis>();
|
var xAxes = chart.GetChartComponents<XAxis>();
|
||||||
var lineType = tooltip.lineStyle.GetType(chart.theme.tooltip.lineType);
|
var lineType = tooltip.lineStyle.GetType(chart.theme.tooltip.lineType);
|
||||||
var lineWidth = tooltip.lineStyle.GetWidth(chart.theme.tooltip.lineWidth);
|
var lineWidth = tooltip.lineStyle.GetWidth(chart.theme.tooltip.lineWidth);
|
||||||
|
|||||||
Reference in New Issue
Block a user