Skip to content

Commit 824133b

Browse files
committed
Merge branch 'master' into feat-univer
2 parents 43e7dec + b6df265 commit 824133b

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/components/BootstrapBlazor.Chart/BootstrapBlazor.Chart.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<Version>10.0.1</Version>
4+
<Version>10.0.2</Version>
55
</PropertyGroup>
66

77
<PropertyGroup>

src/components/BootstrapBlazor.Chart/Components/Chart/Chart.razor.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,6 @@ const getChartOption = function (option) {
356356
}
357357
}
358358

359-
// pie 图除外默认显示 网格线与坐标系
360359
if (option.type !== 'pie' && option.type !== 'doughnut') {
361360
if (option.options.showXScales === null) {
362361
scale.x.display = true
@@ -491,7 +490,13 @@ export function init(id, invoke, method, option) {
491490
}
492491

493492
export function update(id, option, method, angle) {
494-
const { invoke, chart } = Data.get(id)
493+
const { invoke, chart } = Data.get(id);
494+
option.data.forEach(d => {
495+
const l = chart.legend.legendItems.find(i => i.text === d.label);
496+
if(l) {
497+
d.hidden = l.hidden;
498+
}
499+
});
495500
let op = getChartOption(option);
496501
handlerClickData(invoke, op, option.options.onClickDataMethod);
497502
op.angle = angle

0 commit comments

Comments
 (0)