Skip to content

Commit c67f459

Browse files
committed
feat(Chart): keep data hidden
1 parent ee7aa26 commit c67f459

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,13 @@ export function init(id, invoke, method, option) {
490490
}
491491

492492
export function update(id, option, method, angle) {
493-
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+
});
494500
let op = getChartOption(option);
495501
handlerClickData(invoke, op, option.options.onClickDataMethod);
496502
op.angle = angle

0 commit comments

Comments
 (0)