From ffe80e8f0cbdfbe43a89c193a83f6118aa568bab Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Sat, 11 Jul 2026 14:04:44 +0800 Subject: [PATCH 1/2] feat(Chart): add AutoSkip parameter --- .../BootstrapBlazor.Chart/Components/Chart/Chart.razor.js | 7 +++++++ .../BootstrapBlazor.Chart/Components/Chart/ChartAxes.cs | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/src/components/BootstrapBlazor.Chart/Components/Chart/Chart.razor.js b/src/components/BootstrapBlazor.Chart/Components/Chart/Chart.razor.js index c3143355..c7581ad9 100644 --- a/src/components/BootstrapBlazor.Chart/Components/Chart/Chart.razor.js +++ b/src/components/BootstrapBlazor.Chart/Components/Chart/Chart.razor.js @@ -127,6 +127,9 @@ const getChartOption = function (option) { text: option.options.x.title }, stacked: option.options.x.stacked, + ticks: { + autoSkip: option.options.x.autoSkip + }, grid: { display: option.options.showXLine } @@ -139,6 +142,9 @@ const getChartOption = function (option) { }, stacked: option.options.x.stacked, position: option.options.y.position, + ticks: { + autoSkip: option.options.y.autoSkip + }, grid: { display: option.options.showYLine } @@ -359,6 +365,7 @@ const getChartOption = function (option) { stacked: option.options.x.stacked, position: option.options.y2.position, ticks: { + autoSkip: option.options.y2.autoSkip, max: option.options.y2.TicksMax, min: option.options.y2.TicksMin } diff --git a/src/components/BootstrapBlazor.Chart/Components/Chart/ChartAxes.cs b/src/components/BootstrapBlazor.Chart/Components/Chart/ChartAxes.cs index 0b6f4420..3a3b7db1 100644 --- a/src/components/BootstrapBlazor.Chart/Components/Chart/ChartAxes.cs +++ b/src/components/BootstrapBlazor.Chart/Components/Chart/ChartAxes.cs @@ -26,6 +26,11 @@ public class ChartAxes /// public bool Stacked { get; set; } + /// + /// 获得/设置 是否自动跳过刻度标签 默认 true 容器宽度不足时自动隐藏部分标签避免重叠 设置 false 时始终显示全部标签 + /// + public bool AutoSkip { get; set; } = true; + /// /// 获得/设置 比例最小步长/大小 默认 0 /// From 56affdf677ccfacd270259d135f61e7423999060 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Sat, 11 Jul 2026 14:04:57 +0800 Subject: [PATCH 2/2] chore: bump version 10.0.5 --- .../BootstrapBlazor.Chart/BootstrapBlazor.Chart.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/BootstrapBlazor.Chart/BootstrapBlazor.Chart.csproj b/src/components/BootstrapBlazor.Chart/BootstrapBlazor.Chart.csproj index 5bce8c32..123f6035 100644 --- a/src/components/BootstrapBlazor.Chart/BootstrapBlazor.Chart.csproj +++ b/src/components/BootstrapBlazor.Chart/BootstrapBlazor.Chart.csproj @@ -1,7 +1,7 @@ - 10.0.4 + 10.0.5