UNPKG

1.24 kBPlain TextView Raw
1/**
2 * Copyright (c) 2017 ~ present NAVER Corp.
3 * billboard.js project is licensed under the MIT license
4 */
5import {d3Selection} from "../../../types/types";
6
7type T = d3Selection | null;
8
9/**
10 * Elements class.
11 * @class Elements
12 * @ignore
13 * @private
14 */
15export default class Element {
16 constructor() {
17 const element: {
18 [key: string]: T | {[key: string]: T}
19 } = {
20 chart: null,
21 main: null,
22 svg: null,
23 axis: { // axes
24 x: null,
25 y: null,
26 y2: null,
27 subX: null
28 },
29 defs: null,
30 tooltip: null,
31 legend: null,
32 title: null,
33 subchart: {
34 main: null, // $$.context
35 bar: null, // $$.contextBar
36 line: null, // $$.contextLine
37 area: null // $$.contextArea
38 },
39
40 arcs: null,
41 bar: null, // mainBar,
42 candlestick: null,
43 line: null, // mainLine,
44 area: null, // mainArea,
45 circle: null, // mainCircle,
46 radar: null,
47 text: null, // mainText,
48 grid: {
49 main: null, // grid (also focus)
50 x: null, // xgrid,
51 y: null, // ygrid,
52 },
53 gridLines: {
54 main: null, // gridLines
55 x: null, // xgridLines,
56 y: null, // ygridLines
57 },
58 region: {
59 main: null, // region
60 list: null // mainRegion
61 },
62 eventRect: null
63 };
64
65 return element;
66 }
67}