mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-21 16:00:24 +00:00
优化Axis的Time时间轴支持设置Custom和ceilRate
This commit is contained in:
@@ -80,6 +80,8 @@ slug: /changelog
|
||||
|
||||
## master
|
||||
|
||||
* (2025.04.07) 修复`Gantt`甘特图在有多维数据时计算的时间区间不准确的问题
|
||||
* (2025.04.07) 优化`Axis`的`Time`时间轴支持设置Custom和ceilRate
|
||||
* (2025.04.07) 修复`GridCoord`在设置背景色且Serie开启Clip时会覆盖图表的问题
|
||||
* (2025.04.07) 修复`Gantt`甘特图年份大于2038时显示异常的问题
|
||||
* (2025.04.07) 修复`Axis`的`Time`时间轴无法显示大于2038的年份的问题
|
||||
|
||||
@@ -354,8 +354,8 @@ namespace XCharts.Runtime
|
||||
axis.splitNumber = splitNumber;
|
||||
return;
|
||||
}
|
||||
if (axis.type == Axis.AxisType.Time) { }
|
||||
else if (axis.minMaxType == Axis.AxisMinMaxType.Custom)
|
||||
if (ceilRate == 0) ceilRate = axis.ceilRate;
|
||||
if (axis.minMaxType == Axis.AxisMinMaxType.Custom)
|
||||
{
|
||||
if (axis.min != 0 || axis.max != 0)
|
||||
{
|
||||
@@ -371,13 +371,19 @@ namespace XCharts.Runtime
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (axis.type == Axis.AxisType.Time)
|
||||
{
|
||||
if (ceilRate != 0)
|
||||
{
|
||||
minValue = ChartHelper.GetMinCeilRate(minValue, ceilRate);
|
||||
maxValue = ChartHelper.GetMaxCeilRate(maxValue, ceilRate);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ceilRate == 0) ceilRate = axis.ceilRate;
|
||||
switch (axis.minMaxType)
|
||||
{
|
||||
case Axis.AxisMinMaxType.Default:
|
||||
|
||||
if (minValue == 0 && maxValue == 0) { }
|
||||
else if (minValue > 0 && maxValue > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user