1 |
|
2 |
|
3 |
|
4 |
|
5 | import Chart from "../../Chart/Chart";
|
6 | import ChartInternal from "../../ChartInternal/ChartInternal";
|
7 | import Options from "../Options/Options";
|
8 | import {extend} from "../../module/util";
|
9 |
|
10 |
|
11 | import apiSelection from "../../Chart/api/selection";
|
12 | import apiSubchart from "../../Chart/api/subchart";
|
13 | import apiZoom from "../../Chart/api/zoom";
|
14 |
|
15 |
|
16 | import selection from "../../ChartInternal/internals/selection";
|
17 | import subchart from "../../ChartInternal/interactions/subchart";
|
18 | import zoom from "../../ChartInternal/interactions/zoom";
|
19 |
|
20 |
|
21 | import optDataSelection from "../Options/data/selection";
|
22 | import optSubchart from "../Options/interaction/subchart";
|
23 | import optZoom from "../Options/interaction/zoom";
|
24 |
|
25 | export {
|
26 | selectionModule as selection,
|
27 | subchartModule as subchart,
|
28 | zoomModule as zoom
|
29 | };
|
30 |
|
31 | let selectionModule = (): boolean => {
|
32 | extend(ChartInternal.prototype, selection);
|
33 | extend(Chart.prototype, apiSelection);
|
34 | Options.setOptions([optDataSelection]);
|
35 |
|
36 | return (selectionModule = () => true)();
|
37 | };
|
38 |
|
39 | let subchartModule = (): boolean => {
|
40 | extend(ChartInternal.prototype, subchart);
|
41 | extend(Chart.prototype, apiSubchart);
|
42 | Options.setOptions([optSubchart]);
|
43 |
|
44 | return (subchartModule = () => true)();
|
45 | };
|
46 |
|
47 | let zoomModule = (): boolean => {
|
48 | extend(ChartInternal.prototype, zoom);
|
49 | extend(Chart.prototype, apiZoom);
|
50 | Options.setOptions([optZoom]);
|
51 |
|
52 | return (zoomModule = () => true)();
|
53 | };
|
54 |
|
\ | No newline at end of file |