Comparing version 0.1.0-beta.16 to 0.1.0-beta.17
@@ -9,2 +9,3 @@ import { LegendOption } from '../types/index.js'; | ||
get name(): string; | ||
inactivatedSet: Set<string>; | ||
render(): void; | ||
@@ -11,0 +12,0 @@ update(): void; |
@@ -39,2 +39,6 @@ import { StyleSheet, css } from 'aphrodite/no-important.js'; | ||
export class Legend extends BaseComponent { | ||
constructor() { | ||
super(...arguments); | ||
this.inactivatedSet = new Set(); | ||
} | ||
get name() { | ||
@@ -126,2 +130,9 @@ return 'legend'; | ||
legendItemClick(props) { | ||
const currentStatus = !props.isActive; | ||
if (currentStatus) { | ||
this.inactivatedSet.delete(props.data.name); | ||
} | ||
else { | ||
this.inactivatedSet.add(props.data.name); | ||
} | ||
this.ctrl.emit(ChartEvent.LEGEND_ITEM_CLICK, props); | ||
@@ -128,0 +139,0 @@ } |
{ | ||
"name": "zz-chart", | ||
"version": "0.1.0-beta.16", | ||
"version": "0.1.0-beta.17", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "author": "Alauda", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
454132
12035