Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(legacy-charts): fix render multiple charts at one page
- Loading branch information
1 parent
3ad8bc2
commit 835e8f8
Showing
2 changed files
with
51 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import type { Chart } from 'chart.js' | ||
|
||
interface IComponentStore { | ||
readonly componentChart: Chart | null | ||
setComponentChart(componentChart: Chart): void | ||
} | ||
|
||
export class ComponentStore implements IComponentStore { | ||
private _chart = null | ||
|
||
public get componentChart() { | ||
return this._chart | ||
} | ||
|
||
public setComponentChart(val: Chart) { | ||
this._chart = val | ||
} | ||
} |