ECharts数值Y轴设置min为dataMin,使用最小数值作为最小值,加大上下对比度

This commit is contained in:
智能大石头 2025-07-25 16:47:17 +08:00
parent b487cd580d
commit 7e8c2715ed
1 changed files with 2 additions and 0 deletions

View File

@ -177,6 +177,7 @@ public class ECharts : IExtend
public YAxis SetY(String name, String type = "value")
{
var axis = new YAxis { Name = name, Type = type };
if (type == "value") axis.Min = "dataMin";
YAxis.Add(axis);
return axis;
}
@ -194,6 +195,7 @@ public class ECharts : IExtend
public YAxis SetY(String name, String type, String formatter)
{
var axis = new YAxis { Name = name, Type = type, AxisLabel = new { formatter } };
if (type == "value") axis.Min = "dataMin";
YAxis.Add(axis);
return axis;
}