UNPKG

1.54 kBPlain TextView Raw
1/**
2 * Copyright (c) 2017 ~ present NAVER Corp.
3 * billboard.js project is licensed under the MIT license
4 */
5import Chart from "../../Chart/Chart";
6import ChartInternal from "../../ChartInternal/ChartInternal";
7import Options from "../Options/Options";
8import {extend} from "../../module/util";
9
10// Chart
11import apiSelection from "../../Chart/api/selection";
12import apiSubchart from "../../Chart/api/subchart";
13import apiZoom from "../../Chart/api/zoom";
14
15// ChartInternal
16import selection from "../../ChartInternal/internals/selection";
17import subchart from "../../ChartInternal/interactions/subchart";
18import zoom from "../../ChartInternal/interactions/zoom";
19
20// Axis based options
21import optDataSelection from "../Options/data/selection";
22import optSubchart from "../Options/interaction/subchart";
23import optZoom from "../Options/interaction/zoom";
24
25export {
26 selectionModule as selection,
27 subchartModule as subchart,
28 zoomModule as zoom
29};
30
31let selectionModule = (): boolean => {
32 extend(ChartInternal.prototype, selection);
33 extend(Chart.prototype, apiSelection);
34 Options.setOptions([optDataSelection]);
35
36 return (selectionModule = () => true)();
37};
38
39let subchartModule = (): boolean => {
40 extend(ChartInternal.prototype, subchart);
41 extend(Chart.prototype, apiSubchart);
42 Options.setOptions([optSubchart]);
43
44 return (subchartModule = () => true)();
45};
46
47let 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