billboard.js 4.0.3 → 4.1.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -7
- package/dist/billboard.css +1 -1
- package/dist/billboard.js +1848 -494
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +19 -24
- package/dist/billboard.pkgd.js +1844 -679
- package/dist/billboard.pkgd.min.js +24 -29
- package/dist/billboard.react.js +205 -0
- package/dist/billboard.react.min.js +9 -0
- package/dist/billboard.worker.js +10 -0
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +5 -3
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.js +6 -3
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +3 -3
- package/dist/plugin/billboardjs-plugin-stanford.js +6 -3
- package/dist/plugin/billboardjs-plugin-stanford.min.js +3 -3
- package/dist/plugin/billboardjs-plugin-tableview.js +59 -27
- package/dist/plugin/billboardjs-plugin-tableview.min.js +5 -5
- package/dist/plugin/billboardjs-plugin-textoverlap.js +75 -55
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +5 -3
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +6 -3
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +3 -3
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +6 -3
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +59 -27
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +11 -11
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +68 -3557
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +8 -8
- package/dist/theme/dark.css +1 -1
- package/dist/theme/dark.min.css +1 -1
- package/dist/theme/datalab.css +1 -1
- package/dist/theme/datalab.min.css +1 -1
- package/dist/theme/graph.css +1 -1
- package/dist/theme/graph.min.css +1 -1
- package/dist/theme/insight.css +1 -1
- package/dist/theme/insight.min.css +1 -1
- package/dist/theme/modern.css +1 -1
- package/dist/theme/modern.min.css +1 -1
- package/dist-esm/Chart/Chart.js +134 -152
- package/dist-esm/Chart/api/axis.js +217 -237
- package/dist-esm/Chart/api/category.js +54 -54
- package/dist-esm/Chart/api/chart.js +172 -215
- package/dist-esm/Chart/api/color.js +21 -21
- package/dist-esm/Chart/api/data.js +172 -173
- package/dist-esm/Chart/api/export.js +242 -262
- package/dist-esm/Chart/api/flow.js +198 -254
- package/dist-esm/Chart/api/focus.js +136 -143
- package/dist-esm/Chart/api/grid.js +191 -190
- package/dist-esm/Chart/api/group.js +31 -34
- package/dist-esm/Chart/api/legend.js +54 -63
- package/dist-esm/Chart/api/load.js +237 -257
- package/dist-esm/Chart/api/regions.js +148 -168
- package/dist-esm/Chart/api/selection.js +181 -139
- package/dist-esm/Chart/api/show.js +133 -147
- package/dist-esm/Chart/api/stubs.js +43 -42
- package/dist-esm/Chart/api/subchart.js +155 -172
- package/dist-esm/Chart/api/tooltip.js +132 -177
- package/dist-esm/Chart/api/x.js +67 -71
- package/dist-esm/Chart/api/zoom.js +183 -220
- package/dist-esm/ChartInternal/Axis/Axis.js +1059 -1266
- package/dist-esm/ChartInternal/Axis/AxisRenderer.js +408 -540
- package/dist-esm/ChartInternal/Axis/AxisRendererHelper.js +113 -149
- package/dist-esm/ChartInternal/ChartInternal.js +573 -749
- package/dist-esm/ChartInternal/data/convert.helper.js +133 -159
- package/dist-esm/ChartInternal/data/convert.js +200 -229
- package/dist-esm/ChartInternal/data/data.js +967 -1153
- package/dist-esm/ChartInternal/data/load.js +145 -197
- package/dist-esm/ChartInternal/interactions/drag.js +86 -122
- package/dist-esm/ChartInternal/interactions/eventrect.js +455 -621
- package/dist-esm/ChartInternal/interactions/flow.js +151 -215
- package/dist-esm/ChartInternal/interactions/interaction.js +214 -252
- package/dist-esm/ChartInternal/interactions/subchart.js +425 -300
- package/dist-esm/ChartInternal/interactions/zoom.js +321 -440
- package/dist-esm/ChartInternal/internals/category.js +18 -18
- package/dist-esm/ChartInternal/internals/class.js +89 -99
- package/dist-esm/ChartInternal/internals/clip.js +88 -119
- package/dist-esm/ChartInternal/internals/color.js +233 -288
- package/dist-esm/ChartInternal/internals/domain.js +452 -588
- package/dist-esm/ChartInternal/internals/format.js +64 -77
- package/dist-esm/ChartInternal/internals/grid.js +333 -457
- package/dist-esm/ChartInternal/internals/legend.js +675 -927
- package/dist-esm/ChartInternal/internals/redraw.js +200 -289
- package/dist-esm/ChartInternal/internals/region.js +106 -159
- package/dist-esm/ChartInternal/internals/scale.js +186 -215
- package/dist-esm/ChartInternal/internals/selection.js +132 -159
- package/dist-esm/ChartInternal/internals/size.axis.js +92 -139
- package/dist-esm/ChartInternal/internals/size.js +286 -394
- package/dist-esm/ChartInternal/internals/style.js +39 -41
- package/dist-esm/ChartInternal/internals/subchart.util.js +49 -0
- package/dist-esm/ChartInternal/internals/text.arc.js +155 -219
- package/dist-esm/ChartInternal/internals/text.js +368 -528
- package/dist-esm/ChartInternal/internals/text.util.js +179 -239
- package/dist-esm/ChartInternal/internals/title.js +96 -121
- package/dist-esm/ChartInternal/internals/tooltip.js +450 -586
- package/dist-esm/ChartInternal/internals/transform.js +79 -97
- package/dist-esm/ChartInternal/internals/type.js +285 -236
- package/dist-esm/ChartInternal/shape/arc.js +825 -1112
- package/dist-esm/ChartInternal/shape/area.js +73 -94
- package/dist-esm/ChartInternal/shape/bar.js +227 -288
- package/dist-esm/ChartInternal/shape/bubble.js +9 -8
- package/dist-esm/ChartInternal/shape/candlestick.js +110 -138
- package/dist-esm/ChartInternal/shape/core/barRadius.js +197 -133
- package/dist-esm/ChartInternal/shape/core/bubble.js +64 -73
- package/dist-esm/ChartInternal/shape/core/candlestick.js +93 -86
- package/dist-esm/ChartInternal/shape/core/dataRegion.js +68 -75
- package/dist-esm/ChartInternal/shape/core/geometry.js +112 -112
- package/dist-esm/ChartInternal/shape/core/path.js +142 -115
- package/dist-esm/ChartInternal/shape/core/point.js +105 -125
- package/dist-esm/ChartInternal/shape/core/treemap.js +83 -88
- package/dist-esm/ChartInternal/shape/funnel.js +310 -338
- package/dist-esm/ChartInternal/shape/gauge.js +71 -103
- package/dist-esm/ChartInternal/shape/line.js +208 -278
- package/dist-esm/ChartInternal/shape/point.js +310 -425
- package/dist-esm/ChartInternal/shape/polar.js +84 -109
- package/dist-esm/ChartInternal/shape/radar.js +228 -318
- package/dist-esm/ChartInternal/shape/shape.js +782 -843
- package/dist-esm/ChartInternal/shape/treemap.js +152 -190
- package/dist-esm/canvas/CanvasAxisRenderer.js +1180 -1328
- package/dist-esm/canvas/CanvasEngine.js +148 -166
- package/dist-esm/canvas/CanvasPainter.js +395 -411
- package/dist-esm/canvas/CanvasRenderer.js +1584 -1834
- package/dist-esm/canvas/CanvasTheme.js +899 -802
- package/dist-esm/canvas/HitDetector.js +394 -463
- package/dist-esm/canvas/axisTicks.js +672 -786
- package/dist-esm/canvas/classes.js +19 -17
- package/dist-esm/canvas/color.js +40 -59
- package/dist-esm/canvas/geometry.js +38 -38
- package/dist-esm/canvas/labels.js +318 -371
- package/dist-esm/canvas/pointPattern.js +578 -580
- package/dist-esm/canvas/util.js +242 -262
- package/dist-esm/config/Options/Options.js +29 -32
- package/dist-esm/config/Options/axis/axis.js +101 -101
- package/dist-esm/config/Options/axis/x.js +759 -755
- package/dist-esm/config/Options/axis/y.js +525 -522
- package/dist-esm/config/Options/axis/y2.js +501 -485
- package/dist-esm/config/Options/common/boost.js +93 -32
- package/dist-esm/config/Options/common/color.js +88 -87
- package/dist-esm/config/Options/common/grid.js +74 -73
- package/dist-esm/config/Options/common/legend.js +180 -179
- package/dist-esm/config/Options/common/main.js +474 -473
- package/dist-esm/config/Options/common/point.js +160 -159
- package/dist-esm/config/Options/common/title.js +47 -46
- package/dist-esm/config/Options/common/tooltip.js +253 -252
- package/dist-esm/config/Options/data/axis.js +173 -172
- package/dist-esm/config/Options/data/data.js +958 -957
- package/dist-esm/config/Options/data/selection.js +131 -130
- package/dist-esm/config/Options/interaction/interaction.js +53 -52
- package/dist-esm/config/Options/interaction/subchart.js +164 -73
- package/dist-esm/config/Options/interaction/zoom.js +86 -85
- package/dist-esm/config/Options/shape/arc.js +150 -149
- package/dist-esm/config/Options/shape/area.js +69 -68
- package/dist-esm/config/Options/shape/bar.js +147 -146
- package/dist-esm/config/Options/shape/bubble.js +35 -34
- package/dist-esm/config/Options/shape/candlestick.js +61 -60
- package/dist-esm/config/Options/shape/donut.js +181 -180
- package/dist-esm/config/Options/shape/funnel.js +49 -48
- package/dist-esm/config/Options/shape/gauge.js +237 -236
- package/dist-esm/config/Options/shape/line.js +58 -57
- package/dist-esm/config/Options/shape/pie.js +185 -184
- package/dist-esm/config/Options/shape/polar.js +167 -166
- package/dist-esm/config/Options/shape/radar.js +76 -75
- package/dist-esm/config/Options/shape/scatter.js +36 -36
- package/dist-esm/config/Options/shape/spline.js +46 -46
- package/dist-esm/config/Options/shape/treemap.js +80 -79
- package/dist-esm/config/Store/Element.js +64 -62
- package/dist-esm/config/Store/State.js +189 -200
- package/dist-esm/config/Store/Store.js +25 -26
- package/dist-esm/config/classes.js +157 -155
- package/dist-esm/config/config.js +26 -35
- package/dist-esm/config/const.js +120 -128
- package/dist-esm/config/resolver/axis.core.js +25 -25
- package/dist-esm/config/resolver/axis.js +26 -27
- package/dist-esm/config/resolver/canvas.js +2071 -2472
- package/dist-esm/config/resolver/canvasShape.js +201 -177
- package/dist-esm/config/resolver/category.js +26 -27
- package/dist-esm/config/resolver/export.js +24 -26
- package/dist-esm/config/resolver/flow.js +29 -31
- package/dist-esm/config/resolver/grid.js +34 -35
- package/dist-esm/config/resolver/interaction/selection.js +17 -17
- package/dist-esm/config/resolver/interaction/subchart.js +17 -17
- package/dist-esm/config/resolver/interaction/zoom.js +17 -17
- package/dist-esm/config/resolver/regions.js +30 -31
- package/dist-esm/config/resolver/shape/arc.helpers.js +19 -19
- package/dist-esm/config/resolver/shape/area.js +17 -17
- package/dist-esm/config/resolver/shape/axis.helpers.js +28 -25
- package/dist-esm/config/resolver/shape/bar.js +13 -13
- package/dist-esm/config/resolver/shape/bubble.js +18 -14
- package/dist-esm/config/resolver/shape/candlestick.js +13 -13
- package/dist-esm/config/resolver/shape/donut.js +11 -11
- package/dist-esm/config/resolver/shape/funnel.js +11 -11
- package/dist-esm/config/resolver/shape/gauge.js +12 -12
- package/dist-esm/config/resolver/shape/line.js +10 -10
- package/dist-esm/config/resolver/shape/pie.js +11 -11
- package/dist-esm/config/resolver/shape/polar.js +12 -12
- package/dist-esm/config/resolver/shape/radar.js +22 -14
- package/dist-esm/config/resolver/shape/scatter.js +13 -13
- package/dist-esm/config/resolver/shape/treemap.js +11 -11
- package/dist-esm/core.js +208 -211
- package/dist-esm/index.canvas.js +14 -13
- package/dist-esm/index.esm.js +25 -24
- package/dist-esm/module/Cache.js +117 -129
- package/dist-esm/module/browser.js +30 -35
- package/dist-esm/module/dsv.js +107 -127
- package/dist-esm/module/error.js +45 -52
- package/dist-esm/module/generator.js +75 -83
- package/dist-esm/module/sanitize.js +302 -399
- package/dist-esm/module/util/brush.js +27 -38
- package/dist-esm/module/util/dom.js +288 -348
- package/dist-esm/module/util/object.js +277 -341
- package/dist-esm/module/util/type-checks.js +21 -25
- package/dist-esm/module/worker.js +312 -130
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +185 -198
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +442 -450
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +813 -950
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +708 -788
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +344 -301
- package/dist-esm/react/index.js +157 -0
- package/package.json +28 -8
- package/src/Chart/api/selection.ts +130 -5
- package/src/ChartInternal/Axis/Axis.ts +164 -65
- package/src/ChartInternal/Axis/AxisRenderer.ts +41 -8
- package/src/ChartInternal/Axis/AxisRendererHelper.ts +1 -1
- package/src/ChartInternal/ChartInternal.ts +1 -1
- package/src/ChartInternal/data/convert.ts +54 -4
- package/src/ChartInternal/data/data.ts +4 -1
- package/src/ChartInternal/interactions/eventrect.ts +8 -2
- package/src/ChartInternal/interactions/subchart.ts +437 -66
- package/src/ChartInternal/internals/color.ts +2 -2
- package/src/ChartInternal/internals/domain.ts +15 -3
- package/src/ChartInternal/internals/grid.ts +21 -1
- package/src/ChartInternal/internals/scale.ts +9 -2
- package/src/ChartInternal/internals/selection.ts +1 -1
- package/src/ChartInternal/internals/subchart.util.ts +55 -0
- package/src/ChartInternal/internals/text.arc.ts +3 -1
- package/src/ChartInternal/internals/text.ts +18 -5
- package/src/ChartInternal/internals/transform.ts +8 -2
- package/src/ChartInternal/internals/type.ts +105 -1
- package/src/ChartInternal/shape/IShape.ts +6 -3
- package/src/ChartInternal/shape/bar.ts +62 -31
- package/src/ChartInternal/shape/core/barRadius.ts +129 -0
- package/src/ChartInternal/shape/core/candlestick.ts +1 -1
- package/src/ChartInternal/shape/core/path.ts +76 -9
- package/src/ChartInternal/shape/funnel.ts +2 -3
- package/src/ChartInternal/shape/point.ts +2 -2
- package/src/ChartInternal/shape/shape.ts +149 -17
- package/src/Plugin/stanford/index.ts +0 -4
- package/src/Plugin/tableview/index.ts +85 -3
- package/src/Plugin/textoverlap/index.ts +9 -15
- package/src/canvas/CanvasAxisRenderer.ts +184 -36
- package/src/canvas/CanvasRenderer.ts +247 -160
- package/src/canvas/CanvasTheme.ts +212 -0
- package/src/canvas/axisTicks.ts +122 -40
- package/src/config/Options/axis/y2.ts +13 -0
- package/src/config/Options/common/boost.ts +64 -4
- package/src/config/Options/common/color.ts +2 -2
- package/src/config/Options/interaction/subchart.ts +98 -1
- package/src/config/Options/shape/gauge.ts +1 -1
- package/src/config/Options/shape/treemap.ts +2 -2
- package/src/config/Store/Element.ts +3 -1
- package/src/config/Store/State.ts +1 -0
- package/src/config/classes.ts +1 -0
- package/src/config/resolver/canvas.ts +92 -10
- package/src/module/util/type-checks.ts +3 -1
- package/src/module/voronoi.ts +119 -0
- package/src/module/worker.entry.ts +61 -0
- package/src/module/worker.ts +346 -63
- package/src/react/index.ts +193 -0
- package/types/options.d.ts +206 -3
- package/types/react/index.d.ts +27 -0
|
@@ -5,963 +5,964 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.0.
|
|
8
|
+
* @version 4.1.0-next.2
|
|
9
9
|
*/
|
|
10
|
+
//#region src/config/Options/data/data.ts
|
|
10
11
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
12
|
+
* data config options
|
|
13
|
+
*/
|
|
14
|
+
var data_default = {
|
|
15
|
+
/**
|
|
16
|
+
* Specify the key of x values in the data.<br><br>
|
|
17
|
+
* We can show the data with non-index x values by this option. This option is required when the type of x axis is timeseries. If this option is set on a category axis, the values of the data on the key will be used for category names.
|
|
18
|
+
* @name data․x
|
|
19
|
+
* @memberof Options
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @default undefined
|
|
22
|
+
* @example
|
|
23
|
+
* data: {
|
|
24
|
+
* x: "date"
|
|
25
|
+
* }
|
|
26
|
+
*/
|
|
27
|
+
data_x: void 0,
|
|
28
|
+
/**
|
|
29
|
+
* Converts data id value
|
|
30
|
+
* @name data․idConverter
|
|
31
|
+
* @memberof Options
|
|
32
|
+
* @type {function}
|
|
33
|
+
* @default function(id) { return id; }
|
|
34
|
+
* @example
|
|
35
|
+
* data: {
|
|
36
|
+
* idConverter: function(id) {
|
|
37
|
+
* // when id is 'data1', converts to be 'data2'
|
|
38
|
+
* // 'data2' should be given as the initial data value
|
|
39
|
+
* if (id === "data1") {
|
|
40
|
+
* return "data2";
|
|
41
|
+
* } else {
|
|
42
|
+
* return id;
|
|
43
|
+
* }
|
|
44
|
+
* }
|
|
45
|
+
* }
|
|
46
|
+
*/
|
|
47
|
+
data_idConverter: (id) => id,
|
|
48
|
+
/**
|
|
49
|
+
* Set custom data name.
|
|
50
|
+
* If a name is set to `null`, the series is omitted from the legend.
|
|
51
|
+
* @name data․names
|
|
52
|
+
* @memberof Options
|
|
53
|
+
* @type {object}
|
|
54
|
+
* @default {}
|
|
55
|
+
* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataName)
|
|
56
|
+
* @example
|
|
57
|
+
* data: {
|
|
58
|
+
* names: {
|
|
59
|
+
* data1: "Data Name 1",
|
|
60
|
+
* data2: "Data Name 2"
|
|
61
|
+
* }
|
|
62
|
+
* }
|
|
63
|
+
*/
|
|
64
|
+
data_names: {},
|
|
65
|
+
/**
|
|
66
|
+
* Set custom data class.<br><br>
|
|
67
|
+
* If this option is specified, the element g for the data has an additional class that has the prefix 'bb-target-' (eg. bb-target-additional-data1-class).
|
|
68
|
+
* @name data․classes
|
|
69
|
+
* @memberof Options
|
|
70
|
+
* @type {object}
|
|
71
|
+
* @default {}
|
|
72
|
+
* @example
|
|
73
|
+
* data: {
|
|
74
|
+
* classes: {
|
|
75
|
+
* data1: "additional-data1-class",
|
|
76
|
+
* data2: "additional-data2-class"
|
|
77
|
+
* }
|
|
78
|
+
* }
|
|
79
|
+
*/
|
|
80
|
+
data_classes: {},
|
|
81
|
+
/**
|
|
82
|
+
* Set chart type at once.<br><br>
|
|
83
|
+
* If this option is specified, the type will be applied to every data. This setting can be overwritten by data.types.<br><br>
|
|
84
|
+
* **Available Values:**
|
|
85
|
+
* - area
|
|
86
|
+
* - area-line-range
|
|
87
|
+
* - area-spline
|
|
88
|
+
* - area-spline-range
|
|
89
|
+
* - area-step
|
|
90
|
+
* - area-step-range
|
|
91
|
+
* - bar
|
|
92
|
+
* - bubble
|
|
93
|
+
* - candlestick
|
|
94
|
+
* - donut
|
|
95
|
+
* - funnel
|
|
96
|
+
* - gauge
|
|
97
|
+
* - line
|
|
98
|
+
* - pie
|
|
99
|
+
* - polar
|
|
100
|
+
* - radar
|
|
101
|
+
* - scatter
|
|
102
|
+
* - spline
|
|
103
|
+
* - step
|
|
104
|
+
* - treemap
|
|
105
|
+
* @name data․type
|
|
106
|
+
* @memberof Options
|
|
107
|
+
* @type {string}
|
|
108
|
+
* @default "line"<br>NOTE: When importing shapes by ESM, `line()` should be specified for type.
|
|
109
|
+
* @example
|
|
110
|
+
* data: {
|
|
111
|
+
* type: "bar"
|
|
112
|
+
* }
|
|
113
|
+
* @example
|
|
114
|
+
* // Generate chart by importing ESM
|
|
115
|
+
* // Import types to be used only, where this will make smaller bundle size.
|
|
116
|
+
* import bb, {
|
|
117
|
+
* area,
|
|
118
|
+
* areaLineRange,
|
|
119
|
+
* areaSpline,
|
|
120
|
+
* areaSplineRange,
|
|
121
|
+
* areaStep,
|
|
122
|
+
* areaStepRange,
|
|
123
|
+
* bar,
|
|
124
|
+
* bubble,
|
|
125
|
+
* candlestick,
|
|
126
|
+
* donut,
|
|
127
|
+
* funnel,
|
|
128
|
+
* gauge,
|
|
129
|
+
* line,
|
|
130
|
+
* pie,
|
|
131
|
+
* polar,
|
|
132
|
+
* radar,
|
|
133
|
+
* scatter,
|
|
134
|
+
* spline,
|
|
135
|
+
* step,
|
|
136
|
+
* treemap
|
|
137
|
+
* }
|
|
138
|
+
*
|
|
139
|
+
* bb.generate({
|
|
140
|
+
* ...,
|
|
141
|
+
* data: {
|
|
142
|
+
* type: bar()
|
|
143
|
+
* }
|
|
144
|
+
* });
|
|
145
|
+
*/
|
|
146
|
+
data_type: void 0,
|
|
147
|
+
/**
|
|
148
|
+
* Set chart type for each data.<br>
|
|
149
|
+
* This setting overwrites data.type setting.
|
|
150
|
+
* - **NOTE:** `radar` and `treemap` type can't be combined with other types.
|
|
151
|
+
* @name data․types
|
|
152
|
+
* @memberof Options
|
|
153
|
+
* @type {object}
|
|
154
|
+
* @default {}
|
|
155
|
+
* @example
|
|
156
|
+
* data: {
|
|
157
|
+
* types: {
|
|
158
|
+
* data1: "bar",
|
|
159
|
+
* data2: "spline"
|
|
160
|
+
* }
|
|
161
|
+
* }
|
|
162
|
+
* @example
|
|
163
|
+
* // Generate chart by importing ESM
|
|
164
|
+
* // Import types to be used only, where this will make smaller bundle size.
|
|
165
|
+
* import bb, {
|
|
166
|
+
* area,
|
|
167
|
+
* areaLineRange,
|
|
168
|
+
* areaSpline,
|
|
169
|
+
* areaSplineRange,
|
|
170
|
+
* areaStep,
|
|
171
|
+
* areaStepRange,
|
|
172
|
+
* bar,
|
|
173
|
+
* bubble,
|
|
174
|
+
* candlestick,
|
|
175
|
+
* donut,
|
|
176
|
+
* funnel,
|
|
177
|
+
* gauge,
|
|
178
|
+
* line,
|
|
179
|
+
* pie,
|
|
180
|
+
* polar,
|
|
181
|
+
* radar,
|
|
182
|
+
* scatter,
|
|
183
|
+
* spline,
|
|
184
|
+
* step,
|
|
185
|
+
* treemap
|
|
186
|
+
* }
|
|
187
|
+
*
|
|
188
|
+
* bb.generate({
|
|
189
|
+
* ...,
|
|
190
|
+
* data: {
|
|
191
|
+
* types: {
|
|
192
|
+
* data1: bar(),
|
|
193
|
+
* data1: spline()
|
|
194
|
+
* }
|
|
195
|
+
* }
|
|
196
|
+
* });
|
|
197
|
+
*/
|
|
198
|
+
data_types: {},
|
|
199
|
+
/**
|
|
200
|
+
* This option changes the order of stacking data and pieces of pie/donut.
|
|
201
|
+
* - If `null` specified, it will be the order in which the data is loaded.
|
|
202
|
+
* - If a function is specified, it will be used as [Array.sort compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters)<br><br>
|
|
203
|
+
*
|
|
204
|
+
* **Available Values:**
|
|
205
|
+
* - `desc`: In descending order
|
|
206
|
+
* - `asc`: In ascending order
|
|
207
|
+
* - `null`: It keeps the data load order
|
|
208
|
+
* - `function(data1, data2) { ... }`: Array.sort compareFunction
|
|
209
|
+
*
|
|
210
|
+
* **NOTE**: order function only works for Axis based types & Arc types, except `Radar` type.
|
|
211
|
+
* @name data․order
|
|
212
|
+
* @memberof Options
|
|
213
|
+
* @type {string|function|null}
|
|
214
|
+
* @default desc
|
|
215
|
+
* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataOrder)
|
|
216
|
+
* @example
|
|
217
|
+
* data: {
|
|
218
|
+
* // in descending order (default)
|
|
219
|
+
* order: "desc"
|
|
220
|
+
*
|
|
221
|
+
* // in ascending order
|
|
222
|
+
* order: "asc"
|
|
223
|
+
*
|
|
224
|
+
* // keeps data input order
|
|
225
|
+
* order: null
|
|
226
|
+
*
|
|
227
|
+
* // specifying sort function
|
|
228
|
+
* order: function(a, b) {
|
|
229
|
+
* // param data passed format
|
|
230
|
+
* // {
|
|
231
|
+
* // id: "data1", id_org: "data1", values: [
|
|
232
|
+
* // {x: 5, value: 250, id: "data1", index: 5, name: "data1"},
|
|
233
|
+
* // ...
|
|
234
|
+
* // ]
|
|
235
|
+
* // }
|
|
236
|
+
*
|
|
237
|
+
* const reducer = (p, c) => p + Math.abs(c.value);
|
|
238
|
+
* const aSum = a.values.reduce(reducer, 0);
|
|
239
|
+
* const bSum = b.values.reduce(reducer, 0);
|
|
240
|
+
*
|
|
241
|
+
* // ascending order
|
|
242
|
+
* return aSum - bSum;
|
|
243
|
+
*
|
|
244
|
+
* // descending order
|
|
245
|
+
* // return bSum - aSum;
|
|
246
|
+
* }
|
|
247
|
+
* }
|
|
248
|
+
*/
|
|
249
|
+
data_order: "desc",
|
|
250
|
+
/**
|
|
251
|
+
* Set groups for the data for stacking.
|
|
252
|
+
* @name data․groups
|
|
253
|
+
* @memberof Options
|
|
254
|
+
* @type {Array}
|
|
255
|
+
* @default []
|
|
256
|
+
* @example
|
|
257
|
+
* data: {
|
|
258
|
+
* groups: [
|
|
259
|
+
* ["data1", "data2"],
|
|
260
|
+
* ["data3"]
|
|
261
|
+
* ]
|
|
262
|
+
* }
|
|
263
|
+
*/
|
|
264
|
+
data_groups: [],
|
|
265
|
+
/**
|
|
266
|
+
* Set how zero value will be treated on groups.<br>
|
|
267
|
+
* Possible values:
|
|
268
|
+
* - `zero`: 0 will be positioned at the absolute axis zero point.
|
|
269
|
+
* - `positive`: 0 will be positioned at the top of a stack.
|
|
270
|
+
* - `negative`: 0 will be positioned at the bottom of a stack.
|
|
271
|
+
* @name data․groupsZeroAs
|
|
272
|
+
* @memberof Options
|
|
273
|
+
* @type {string}
|
|
274
|
+
* @default "positive"
|
|
275
|
+
* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.Groups)
|
|
276
|
+
* @example
|
|
277
|
+
* data: {
|
|
278
|
+
* groupsZeroAs: "zero" // "positive" or "negative"
|
|
279
|
+
* }
|
|
280
|
+
*/
|
|
281
|
+
data_groupsZeroAs: "positive",
|
|
282
|
+
/**
|
|
283
|
+
* Set color converter function.<br><br>
|
|
284
|
+
* This option should be a function and the specified function receives color (e.g. '#ff0000') and d that has data parameters like id, value, index, etc. And it must return a string that represents color (e.g. '#00ff00').
|
|
285
|
+
* @name data․color
|
|
286
|
+
* @memberof Options
|
|
287
|
+
* @type {function}
|
|
288
|
+
* @default undefined
|
|
289
|
+
* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataColor)
|
|
290
|
+
* @example
|
|
291
|
+
* data: {
|
|
292
|
+
* color: function(color, d) { ... }
|
|
293
|
+
* }
|
|
294
|
+
*/
|
|
295
|
+
data_color: void 0,
|
|
296
|
+
/**
|
|
297
|
+
* Set color for each data.
|
|
298
|
+
* @name data․colors
|
|
299
|
+
* @memberof Options
|
|
300
|
+
* @type {object}
|
|
301
|
+
* @default {}
|
|
302
|
+
* @example
|
|
303
|
+
* data: {
|
|
304
|
+
* colors: {
|
|
305
|
+
* data1: "#ff0000",
|
|
306
|
+
* data2: function(d) {
|
|
307
|
+
* return "#000";
|
|
308
|
+
* }
|
|
309
|
+
* ...
|
|
310
|
+
* }
|
|
311
|
+
* }
|
|
312
|
+
*/
|
|
313
|
+
data_colors: {},
|
|
314
|
+
/**
|
|
315
|
+
* Set labels options
|
|
316
|
+
* @name data․labels
|
|
317
|
+
* @memberof Options
|
|
318
|
+
* @type {object}
|
|
319
|
+
* @property {object} data Data object
|
|
320
|
+
* @property {boolean} [data.labels=false] Show or hide labels on each data point
|
|
321
|
+
* @property {boolean} [data.labels.centered=false] Centerize labels on `bar` shape. (**NOTE:** works only for 'bar' type)
|
|
322
|
+
* @property {function} [data.labels.format] Set formatter function for data labels.<br>
|
|
323
|
+
* The formatter function receives 4 arguments such as `v, id, i, texts` and it **must return a string** (`\n` character will be used as line break) that will be shown as the label.<br><br>
|
|
324
|
+
* The arguments are:<br>
|
|
325
|
+
* - `v` is the value of the data point where the label is shown.
|
|
326
|
+
* - `id` is the id of the data where the label is shown.
|
|
327
|
+
* - `i` is the index of the data series point where the label is shown.
|
|
328
|
+
* - `texts` is an array of whole corresponding data series' text labels.<br><br>
|
|
329
|
+
* Formatter function can be defined for each data by specifying as an object and D3 formatter function can be set (ex. d3.format('$'))
|
|
330
|
+
* @property {string|object|function} [data.labels.backgroundColors] Set label text background colors.<br><br>
|
|
331
|
+
* - **NOTE**: When a function is set, background colors can be specified one color per dataset.
|
|
332
|
+
* - Within the function, the last returned color for dataset will be used.
|
|
333
|
+
* - Only can control set or unset background color for each values.
|
|
334
|
+
* @property {string|object|function} [data.labels.colors] Set label text colors.
|
|
335
|
+
* @property {object|function} [data.labels.position] Set each dataset position, relative to the original.<br><br>
|
|
336
|
+
* When a function is specified, it will receive 5 arguments such as `type, v, id, i, texts` and it must return a position number.<br><br>
|
|
337
|
+
* The arguments are:<br>
|
|
338
|
+
* - `type` coordinate type string, which will be 'x' or 'y'.
|
|
339
|
+
* - `v` is the value of the data point where the label is shown.
|
|
340
|
+
* - `id` is the id of the data where the label is shown.
|
|
341
|
+
* - `i` is the index of the data series point where the label is shown.
|
|
342
|
+
* - `texts` is an array of whole corresponding data series' text labels.<br><br>
|
|
343
|
+
* @property {number} [data.labels.position.x=0] x coordinate position, relative to the original.
|
|
344
|
+
* @property {number} [data.labels.position.y=0] y coordinate position, relative to the original.
|
|
345
|
+
* @property {object} [data.labels.rotate] Rotate label text. Specify degree value in a range of `0 ~ 360`.
|
|
346
|
+
* - **NOTE:** Depending on the rotate value, the text position needs to be adjusted manually(using `data.labels.position` option) to be shown nicely.
|
|
347
|
+
* @property {boolean|object} [data.labels.border=false] Add border to data label text. NOTE: When set as `true`, styling isn't applied. Hence, you need to set it using `.bb-text-border` class.
|
|
348
|
+
* @property {number|string|object} [data.labels.border.padding="3 5"] Border padding. Can be a single number, string or object with top, bottom, left, right properties.
|
|
349
|
+
* @property {number} [data.labels.border.radius=10] Border radius value.
|
|
350
|
+
* @property {number} [data.labels.border.strokeWidth=1] Border stroke width.
|
|
351
|
+
* @property {string} [data.labels.border.stroke="#000"] Border stroke color.
|
|
352
|
+
* @property {string} [data.labels.border.fill="none"] Border fill color.
|
|
353
|
+
* @property {object|function} [data.labels.image] Set image to be displayed next to the label text.<br><br>
|
|
354
|
+
* When a function is specified, it will receive 3 arguments such as `v, id, i` and it must return an image object with `url`, `width`, `height`, and optional `pos` properties.<br><br>
|
|
355
|
+
* The arguments are:<br>
|
|
356
|
+
* - `v` is the value of the data point where the label is shown.
|
|
357
|
+
* - `id` is the id of the data where the label is shown.
|
|
358
|
+
* - `i` is the index of the data series point where the label is shown.
|
|
359
|
+
* @property {string} data.labels.image.url Image URL path. Can use placeholder `{=ID}` which will be replaced with the data ID.
|
|
360
|
+
* @property {number} data.labels.image.width Image width in pixels.
|
|
361
|
+
* @property {number} data.labels.image.height Image height in pixels.
|
|
362
|
+
* @property {object} [data.labels.image.pos] Image position relative to the label text.
|
|
363
|
+
* @property {number} [data.labels.image.pos.x=0] x coordinate position, relative to the original.
|
|
364
|
+
* @property {number} [data.labels.image.pos.y=0] y coordinate position, relative to the original.
|
|
365
|
+
* @memberof Options
|
|
366
|
+
* @type {object}
|
|
367
|
+
* @default {}
|
|
368
|
+
* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataLabel)
|
|
369
|
+
* @see [Demo: label border](https://naver.github.io/billboard.js/demo/#Data.DataLabelBorder)
|
|
370
|
+
* @see [Demo: label colors](https://naver.github.io/billboard.js/demo/#Data.DataLabelColors)
|
|
371
|
+
* @see [Demo: label format](https://naver.github.io/billboard.js/demo/#Data.DataLabelFormat)
|
|
372
|
+
* @see [Demo: label image](https://naver.github.io/billboard.js/demo/#Data.DataLabelImage)
|
|
373
|
+
* @see [Demo: label multiline](https://naver.github.io/billboard.js/demo/#Data.DataLabelMultiline)
|
|
374
|
+
* @see [Demo: label overlap](https://naver.github.io/billboard.js/demo/#Data.DataLabelOverlap)
|
|
375
|
+
* @see [Demo: label position](https://naver.github.io/billboard.js/demo/#Data.DataLabelPosition)
|
|
376
|
+
* @see [Demo: label rotate](https://naver.github.io/billboard.js/demo/#Data.DataLabelRotate)
|
|
377
|
+
* @example
|
|
378
|
+
* data: {
|
|
379
|
+
* labels: true,
|
|
380
|
+
*
|
|
381
|
+
* // or set specific options
|
|
382
|
+
* labels: {
|
|
383
|
+
* format: function(v, id, i, texts) {
|
|
384
|
+
* ...
|
|
385
|
+
* // to multiline, return with '\n' character
|
|
386
|
+
* return "Line1\nLine2";
|
|
387
|
+
* },
|
|
388
|
+
*
|
|
389
|
+
* // it's possible to set for each data
|
|
390
|
+
* format: {
|
|
391
|
+
* data1: function(v, id, i, texts) { ... },
|
|
392
|
+
* ...
|
|
393
|
+
* },
|
|
394
|
+
*
|
|
395
|
+
* // align text to center of the 'bar' shape (works only for 'bar' type)
|
|
396
|
+
* centered: true,
|
|
397
|
+
*
|
|
398
|
+
* // apply background color for label texts
|
|
399
|
+
* backgroundColors: "red",
|
|
400
|
+
*
|
|
401
|
+
* // set different background colors per dataset
|
|
402
|
+
* backgroundColors: {
|
|
403
|
+
* data1: "green",
|
|
404
|
+
* data2: "yellow"
|
|
405
|
+
* },
|
|
406
|
+
*
|
|
407
|
+
* // call back for label text background color
|
|
408
|
+
* backgroundColors: function(color, d) {
|
|
409
|
+
* // color: the default data label color string
|
|
410
|
+
* // data: ex) {x: 0, value: 200, id: "data3", index: 0}
|
|
411
|
+
* ....
|
|
412
|
+
* return d.value > 200 ? "cyan" : "red";
|
|
413
|
+
* },
|
|
414
|
+
*
|
|
415
|
+
* // apply for all label texts
|
|
416
|
+
* colors: "red",
|
|
417
|
+
*
|
|
418
|
+
* // set different colors per dataset
|
|
419
|
+
* // for not specified dataset, will have the default color value
|
|
420
|
+
* colors: {
|
|
421
|
+
* data1: "yellow",
|
|
422
|
+
* data3: "green"
|
|
423
|
+
* },
|
|
424
|
+
*
|
|
425
|
+
* // call back for label text color
|
|
426
|
+
* colors: function(color, d) {
|
|
427
|
+
* // color: the default data label color string
|
|
428
|
+
* // data: ex) {x: 0, value: 200, id: "data3", index: 0}
|
|
429
|
+
* ....
|
|
430
|
+
* return d.value > 200 ? "cyan" : color;
|
|
431
|
+
* },
|
|
432
|
+
*
|
|
433
|
+
* // return x, y coordinate position
|
|
434
|
+
* // apt to handle each text position manually
|
|
435
|
+
* position: function(type, v, id, i, texts) {
|
|
436
|
+
* ...
|
|
437
|
+
* return type == "x" ? 10 : 20;
|
|
438
|
+
* },
|
|
439
|
+
*
|
|
440
|
+
* // set x, y coordinate position
|
|
441
|
+
* position: {
|
|
442
|
+
* x: -10,
|
|
443
|
+
* y: 10
|
|
444
|
+
* },
|
|
445
|
+
*
|
|
446
|
+
* // or set x, y coordinate position by each dataset
|
|
447
|
+
* position: {
|
|
448
|
+
* data1: {x: 5, y: 5},
|
|
449
|
+
* data2: {x: 10, y: -20}
|
|
450
|
+
* },
|
|
451
|
+
*
|
|
452
|
+
* // rotate degree for label text
|
|
453
|
+
* rotate: 90,
|
|
454
|
+
*
|
|
455
|
+
* // add border to data label text
|
|
456
|
+
* // NOTE: When set as `true`, styling aren't applied. Hence, need to set using '.bb-text-border' class.
|
|
457
|
+
* // ex. ".bb-text-border { fill: red; stroke: #000; stroke-width: 2px; rx: 10px; ry: 10px; }"
|
|
458
|
+
* border: true,
|
|
459
|
+
*
|
|
460
|
+
* // or set detailed border options
|
|
461
|
+
* border: {
|
|
462
|
+
* padding: 10, // set all padding to 10
|
|
463
|
+
* padding: "5 10", // set top and bottom padding to 5, left and right padding to 10
|
|
464
|
+
* padding: { // specify each padding
|
|
465
|
+
* top: 3,
|
|
466
|
+
* bottom: 5,
|
|
467
|
+
* left: 10,
|
|
468
|
+
* right: 13
|
|
469
|
+
* },
|
|
470
|
+
* radius: 10,
|
|
471
|
+
* strokeWidth: 2,
|
|
472
|
+
* stroke: "#000",
|
|
473
|
+
* fill: "red"
|
|
474
|
+
* },
|
|
475
|
+
*
|
|
476
|
+
* // set image to be displayed next to the label text
|
|
477
|
+
* image: {
|
|
478
|
+
* url: "./sample.svg",
|
|
479
|
+
*
|
|
480
|
+
* // use placeholder to dynamically set image URL based on data ID
|
|
481
|
+
* url: "./images/{=ID}.svg", // will be replaced to "./images/data1.svg", "./images/data2.svg", etc.
|
|
482
|
+
* width: 35,
|
|
483
|
+
* height: 35,
|
|
484
|
+
* pos: {
|
|
485
|
+
* x: 0,
|
|
486
|
+
* y: 0
|
|
487
|
+
* }
|
|
488
|
+
* },
|
|
489
|
+
*
|
|
490
|
+
* // or use function to return image configuration dynamically
|
|
491
|
+
* image: function(v, id, i) {
|
|
492
|
+
* // v is the value of the data point where the label is shown.
|
|
493
|
+
* // id is the id of the data where the label is shown.
|
|
494
|
+
* // i is the index of the data series point where the label is shown.
|
|
495
|
+
*
|
|
496
|
+
* // Return different images based on value
|
|
497
|
+
* if (v > 500) {
|
|
498
|
+
* return {
|
|
499
|
+
* url: "./high-value.svg",
|
|
500
|
+
* width: 40,
|
|
501
|
+
* height: 40,
|
|
502
|
+
* pos: { x: 0, y: 0 }
|
|
503
|
+
* };
|
|
504
|
+
* } else if (v > 100) {
|
|
505
|
+
* return {
|
|
506
|
+
* url: "./medium-value.svg",
|
|
507
|
+
* width: 30,
|
|
508
|
+
* height: 30,
|
|
509
|
+
* pos: { x: 0, y: 0 }
|
|
510
|
+
* };
|
|
511
|
+
* } else if(v < 5) {
|
|
512
|
+
* // Return falsy value in case you don't want to show image
|
|
513
|
+
* return null;
|
|
514
|
+
* } else {
|
|
515
|
+
* return {
|
|
516
|
+
* url: "./low-value.svg",
|
|
517
|
+
* width: 20,
|
|
518
|
+
* height: 20,
|
|
519
|
+
* pos: { x: 0, y: 0 }
|
|
520
|
+
* };
|
|
521
|
+
* }
|
|
522
|
+
* }
|
|
523
|
+
* }
|
|
524
|
+
* }
|
|
525
|
+
*/
|
|
526
|
+
data_labels: {},
|
|
527
|
+
data_labels_backgroundColors: void 0,
|
|
528
|
+
data_labels_colors: void 0,
|
|
529
|
+
data_labels_position: {},
|
|
530
|
+
data_labels_imgUrl: void 0,
|
|
531
|
+
/**
|
|
532
|
+
* Hide each data when the chart appears.<br><br>
|
|
533
|
+
* If true is specified, all of data will be hidden. If multiple ids are specified as an array, those will be hidden.
|
|
534
|
+
* @name data․hide
|
|
535
|
+
* @memberof Options
|
|
536
|
+
* @type {boolean|Array}
|
|
537
|
+
* @default false
|
|
538
|
+
* @example
|
|
539
|
+
* data: {
|
|
540
|
+
* // all of data will be hidden
|
|
541
|
+
* hide: true
|
|
542
|
+
*
|
|
543
|
+
* // specified data will be hidden
|
|
544
|
+
* hide: ["data1", ...]
|
|
545
|
+
* }
|
|
546
|
+
*/
|
|
547
|
+
data_hide: false,
|
|
548
|
+
/**
|
|
549
|
+
* Filter values to be shown
|
|
550
|
+
* The data value is the same as the returned by `.data()`.
|
|
551
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter
|
|
552
|
+
* @name data․filter
|
|
553
|
+
* @memberof Options
|
|
554
|
+
* @type {function}
|
|
555
|
+
* @default undefined
|
|
556
|
+
* @example
|
|
557
|
+
* data: {
|
|
558
|
+
* // filter for id value
|
|
559
|
+
* filter: function(v) {
|
|
560
|
+
* // v: [{id: "data1", id_org: "data1", values: [
|
|
561
|
+
* // {x: 0, value: 130, id: "data2", index: 0}, ...]
|
|
562
|
+
* // }, ...]
|
|
563
|
+
* return v.id !== "data1";
|
|
564
|
+
* }
|
|
565
|
+
*/
|
|
566
|
+
data_filter: void 0,
|
|
567
|
+
/**
|
|
568
|
+
* Set a callback for click event on each data point.<br><br>
|
|
569
|
+
* This callback will be called when each data point is clicked and will receive `d` and element as the arguments.
|
|
570
|
+
* - `d` is the data clicked and element is the element clicked.
|
|
571
|
+
* - `element` is the current interacting svg element.
|
|
572
|
+
* - In this callback, `this` will be the Chart object.
|
|
573
|
+
* @name data․onclick
|
|
574
|
+
* @memberof Options
|
|
575
|
+
* @type {function}
|
|
576
|
+
* @default function() {}
|
|
577
|
+
* @example
|
|
578
|
+
* data: {
|
|
579
|
+
* onclick: function(d, element) {
|
|
580
|
+
* // d - ex) {x: 4, value: 150, id: "data1", index: 4, name: "data1"}
|
|
581
|
+
* // element - <circle>
|
|
582
|
+
* ...
|
|
583
|
+
* }
|
|
584
|
+
* }
|
|
585
|
+
*/
|
|
586
|
+
data_onclick: () => {},
|
|
587
|
+
/**
|
|
588
|
+
* Set a callback for mouse/touch over event on each data point.<br><br>
|
|
589
|
+
* This callback will be called when the mouse cursor or touch moves onto each data point and will receive `d` and `element` as the argument.
|
|
590
|
+
* - `d` is the data where mouse cursor moves onto.
|
|
591
|
+
* - `element` is the current interacting svg element.
|
|
592
|
+
* - In this callback, `this` will be the Chart object.
|
|
593
|
+
* @name data․onover
|
|
594
|
+
* @memberof Options
|
|
595
|
+
* @type {function}
|
|
596
|
+
* @default function() {}
|
|
597
|
+
* @example
|
|
598
|
+
* data: {
|
|
599
|
+
* onover: function(d, element) {
|
|
600
|
+
* // d - ex) {x: 4, value: 150, id: "data1", index: 4}
|
|
601
|
+
* // element - <circle>
|
|
602
|
+
* ...
|
|
603
|
+
* }
|
|
604
|
+
* }
|
|
605
|
+
*/
|
|
606
|
+
data_onover: () => {},
|
|
607
|
+
/**
|
|
608
|
+
* Set a callback for mouse/touch out event on each data point.<br><br>
|
|
609
|
+
* This callback will be called when the mouse cursor or touch moves out each data point and will receive `d` as the argument.
|
|
610
|
+
* - `d` is the data where mouse cursor moves out.
|
|
611
|
+
* - `element` is the current interacting svg element.
|
|
612
|
+
* - In this callback, `this` will be the Chart object.
|
|
613
|
+
* @name data․onout
|
|
614
|
+
* @memberof Options
|
|
615
|
+
* @type {function}
|
|
616
|
+
* @default function() {}
|
|
617
|
+
* @example
|
|
618
|
+
* data: {
|
|
619
|
+
* onout: function(d, element) {
|
|
620
|
+
* // d - ex) {x: 4, value: 150, id: "data1", index: 4}
|
|
621
|
+
* // element - <circle>
|
|
622
|
+
* ...
|
|
623
|
+
* }
|
|
624
|
+
* }
|
|
625
|
+
*/
|
|
626
|
+
data_onout: () => {},
|
|
627
|
+
/**
|
|
628
|
+
* Set a callback for when data is shown.<br>
|
|
629
|
+
* The callback will receive shown data ids in array.
|
|
630
|
+
* @name data․onshown
|
|
631
|
+
* @memberof Options
|
|
632
|
+
* @type {function}
|
|
633
|
+
* @default undefined
|
|
634
|
+
* @example
|
|
635
|
+
* data: {
|
|
636
|
+
* onshown: function(ids) {
|
|
637
|
+
* // ids - ["data1", "data2", ...]
|
|
638
|
+
* ...
|
|
639
|
+
* }
|
|
640
|
+
* }
|
|
641
|
+
*/
|
|
642
|
+
data_onshown: void 0,
|
|
643
|
+
/**
|
|
644
|
+
* Set a callback for when data is hidden.<br>
|
|
645
|
+
* The callback will receive hidden data ids in array.
|
|
646
|
+
* @name data․onhidden
|
|
647
|
+
* @memberof Options
|
|
648
|
+
* @type {function}
|
|
649
|
+
* @default undefined
|
|
650
|
+
* @example
|
|
651
|
+
* data: {
|
|
652
|
+
* onhidden: function(ids) {
|
|
653
|
+
* // ids - ["data1", "data2", ...]
|
|
654
|
+
* ...
|
|
655
|
+
* }
|
|
656
|
+
* }
|
|
657
|
+
*/
|
|
658
|
+
data_onhidden: void 0,
|
|
659
|
+
/**
|
|
660
|
+
* Set a callback for minimum data
|
|
661
|
+
* - **NOTE:** For 'area-line-range', 'area-step-range' and 'area-spline-range', `mid` data will be taken for the comparison
|
|
662
|
+
* @name data․onmin
|
|
663
|
+
* @memberof Options
|
|
664
|
+
* @type {function}
|
|
665
|
+
* @default undefined
|
|
666
|
+
* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.OnMinMaxCallback)
|
|
667
|
+
* @example
|
|
668
|
+
* onmin: function(data) {
|
|
669
|
+
* // data - ex) [{x: 3, value: 400, id: "data1", index: 3}, ... ]
|
|
670
|
+
* ...
|
|
671
|
+
* }
|
|
672
|
+
*/
|
|
673
|
+
data_onmin: void 0,
|
|
674
|
+
/**
|
|
675
|
+
* Set a callback for maximum data
|
|
676
|
+
* - **NOTE:** For 'area-line-range', 'area-step-range' and 'area-spline-range', `mid` data will be taken for the comparison
|
|
677
|
+
* @name data․onmax
|
|
678
|
+
* @memberof Options
|
|
679
|
+
* @type {function}
|
|
680
|
+
* @default undefined
|
|
681
|
+
* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.OnMinMaxCallback)
|
|
682
|
+
* @example
|
|
683
|
+
* onmax: function(data) {
|
|
684
|
+
* // data - ex) [{x: 3, value: 400, id: "data1", index: 3}, ... ]
|
|
685
|
+
* ...
|
|
686
|
+
* }
|
|
687
|
+
*/
|
|
688
|
+
data_onmax: void 0,
|
|
689
|
+
/**
|
|
690
|
+
* Load a CSV or JSON file from a URL. NOTE that this will not work if loading via the "file://" protocol as most browsers will block XMLHTTPRequests.
|
|
691
|
+
* @name data․url
|
|
692
|
+
* @memberof Options
|
|
693
|
+
* @type {string}
|
|
694
|
+
* @default undefined
|
|
695
|
+
* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.LoadData)
|
|
696
|
+
* @example
|
|
697
|
+
* data: {
|
|
698
|
+
* url: "/data/test.csv"
|
|
699
|
+
* }
|
|
700
|
+
*/
|
|
701
|
+
data_url: void 0,
|
|
702
|
+
/**
|
|
703
|
+
* XHR header value
|
|
704
|
+
* - **NOTE:** Should be used with `data.url` option
|
|
705
|
+
* @name data․headers
|
|
706
|
+
* @memberof Options
|
|
707
|
+
* @type {string}
|
|
708
|
+
* @default undefined
|
|
709
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader
|
|
710
|
+
* @example
|
|
711
|
+
* data: {
|
|
712
|
+
* url: "/data/test.csv",
|
|
713
|
+
* headers: {
|
|
714
|
+
* "Content-Type": "text/xml",
|
|
715
|
+
* ...
|
|
716
|
+
* }
|
|
717
|
+
* }
|
|
718
|
+
*/
|
|
719
|
+
data_headers: void 0,
|
|
720
|
+
/**
|
|
721
|
+
* Parse a JSON object for data. See also data.keys.
|
|
722
|
+
* @name data․json
|
|
723
|
+
* @memberof Options
|
|
724
|
+
* @type {Array}
|
|
725
|
+
* @default undefined
|
|
726
|
+
* @see [data․keys](#.data%25E2%2580%25A4keys)
|
|
727
|
+
* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.JSONData)
|
|
728
|
+
* @example
|
|
729
|
+
* data: {
|
|
730
|
+
* json: [
|
|
731
|
+
* {name: "www.site1.com", upload: 200, download: 200, total: 400},
|
|
732
|
+
* {name: "www.site2.com", upload: 100, download: 300, total: 400},
|
|
733
|
+
* {name: "www.site3.com", upload: 300, download: 200, total: 500},
|
|
734
|
+
* {name: "www.site4.com", upload: 400, download: 100, total: 500}
|
|
735
|
+
* ],
|
|
736
|
+
* keys: {
|
|
737
|
+
* // case 1: specify 'x' key for category axis
|
|
738
|
+
* x: "name", // 'name' key will be used as category x axis values
|
|
739
|
+
* value: ["upload", "download"]
|
|
740
|
+
*
|
|
741
|
+
* // case 2: without 'x' key for non-category axis
|
|
742
|
+
* value: ["upload", "download"]
|
|
743
|
+
* }
|
|
744
|
+
* }
|
|
745
|
+
*/
|
|
746
|
+
data_json: void 0,
|
|
747
|
+
/**
|
|
748
|
+
* Load data from a multidimensional array, with the first element containing the data names, the following containing related data in that order.
|
|
749
|
+
* @name data․rows
|
|
750
|
+
* @memberof Options
|
|
751
|
+
* @type {Array}
|
|
752
|
+
* @default undefined
|
|
753
|
+
* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.RowOrientedData)
|
|
754
|
+
* @example
|
|
755
|
+
* data: {
|
|
756
|
+
* rows: [
|
|
757
|
+
* ["A", "B", "C"],
|
|
758
|
+
* [90, 120, 300],
|
|
759
|
+
* [40, 160, 240],
|
|
760
|
+
* [50, 200, 290],
|
|
761
|
+
* [120, 160, 230],
|
|
762
|
+
* [80, 130, 300],
|
|
763
|
+
* [90, 220, 320]
|
|
764
|
+
* ]
|
|
765
|
+
* }
|
|
766
|
+
*
|
|
767
|
+
* // for 'bar' type, data can contain:
|
|
768
|
+
* // - an array of [start, end] data following the order
|
|
769
|
+
* data: {
|
|
770
|
+
* rows: [
|
|
771
|
+
* ["data1", "data2"],
|
|
772
|
+
* [[100, 150], 120],
|
|
773
|
+
* [[200, 300], 55],
|
|
774
|
+
* [[-400, 500], 60]
|
|
775
|
+
* ],
|
|
776
|
+
* type: "bar"
|
|
777
|
+
* }
|
|
778
|
+
*
|
|
779
|
+
* // for 'range' types('area-line-range' or 'area-step-range' or 'area-spline-range'), data should contain:
|
|
780
|
+
* // - an array of [high, mid, low] data following the order
|
|
781
|
+
* // - or an object with 'high', 'mid' and 'low' key value
|
|
782
|
+
* data: {
|
|
783
|
+
* rows: [
|
|
784
|
+
* ["data1", "data2"],
|
|
785
|
+
* [
|
|
786
|
+
* // or {high:150, mid: 140, low: 110}, 120
|
|
787
|
+
* [150, 140, 110], 120
|
|
788
|
+
* ],
|
|
789
|
+
* [[155, 130, 115], 55],
|
|
790
|
+
* [[160, 135, 120], 60]
|
|
791
|
+
* ],
|
|
792
|
+
* types: {
|
|
793
|
+
* data1: "area-line-range",
|
|
794
|
+
* data2: "line"
|
|
795
|
+
* }
|
|
796
|
+
* }
|
|
797
|
+
*
|
|
798
|
+
* // for 'bubble' type, data can contain dimension value:
|
|
799
|
+
* // - an array of [y, z] data following the order
|
|
800
|
+
* // - or an object with 'y' and 'z' key value
|
|
801
|
+
* // 'y' is for y axis coordination and 'z' is the bubble radius value
|
|
802
|
+
* data: {
|
|
803
|
+
* rows: [
|
|
804
|
+
* ["data1", "data2"],
|
|
805
|
+
* [
|
|
806
|
+
* // or {y:10, z: 140}, 120
|
|
807
|
+
* [10, 140], 120
|
|
808
|
+
* ],
|
|
809
|
+
* [[100, 30], 55],
|
|
810
|
+
* [[50, 100], 60]
|
|
811
|
+
* ],
|
|
812
|
+
* types: {
|
|
813
|
+
* data1: "bubble",
|
|
814
|
+
* data2: "line"
|
|
815
|
+
* }
|
|
816
|
+
* }
|
|
817
|
+
*
|
|
818
|
+
* // for 'candlestick' type, data should contain:
|
|
819
|
+
* // - an array of [open, high, low, close, volume(optional)] data following the order
|
|
820
|
+
* // - or an object with 'open', 'high', 'low', 'close' and 'value'(optional) key value
|
|
821
|
+
* data: {
|
|
822
|
+
* rows: [
|
|
823
|
+
* ["data1", "data2"],
|
|
824
|
+
* [
|
|
825
|
+
* // open, high, low, close, volume (optional)
|
|
826
|
+
* {open: 1300, high: 1369, low: 1200, close: 1339, volume: 100},
|
|
827
|
+
* [1000, 1100, 850, 870]
|
|
828
|
+
* ],
|
|
829
|
+
* [
|
|
830
|
+
* {open: 1348, high: 1371, low: 1271, close: 1320},
|
|
831
|
+
* [870, 1250, 830, 1200, 50]
|
|
832
|
+
* ]
|
|
833
|
+
* ],
|
|
834
|
+
* type: "candlestick"
|
|
835
|
+
* }
|
|
836
|
+
*/
|
|
837
|
+
data_rows: void 0,
|
|
838
|
+
/**
|
|
839
|
+
* Load data from a multidimensional array, with each element containing an array consisting of a datum name and associated data values.
|
|
840
|
+
* @name data․columns
|
|
841
|
+
* @memberof Options
|
|
842
|
+
* @type {Array}
|
|
843
|
+
* @default undefined
|
|
844
|
+
* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.ColumnOrientedData)
|
|
845
|
+
* @example
|
|
846
|
+
* data: {
|
|
847
|
+
* columns: [
|
|
848
|
+
* ["data1", 30, 20, 50, 40, 60, 50],
|
|
849
|
+
* ["data2", 200, 130, 90, 240, 130, 220],
|
|
850
|
+
* ["data3", 300, 200, 160, 400, 250, 250]
|
|
851
|
+
* ]
|
|
852
|
+
* }
|
|
853
|
+
*
|
|
854
|
+
* // for 'bar' type, data can contain:
|
|
855
|
+
* // - an array of [start, end] data following the order
|
|
856
|
+
* data: {
|
|
857
|
+
* columns: [
|
|
858
|
+
* ["data1", -100, 50, [100, 200], [200, 300]],
|
|
859
|
+
* ["data2", -200, 300, [-100, 100], [-50, -30]],
|
|
860
|
+
* ],
|
|
861
|
+
* type: "bar"
|
|
862
|
+
* }
|
|
863
|
+
*
|
|
864
|
+
* // for 'range' types('area-line-range' or 'area-step-range' or 'area-spline-range'), data should contain:
|
|
865
|
+
* // - an array of [high, mid, low] data following the order
|
|
866
|
+
* // - or an object with 'high', 'mid' and 'low' key value
|
|
867
|
+
* data: {
|
|
868
|
+
* columns: [
|
|
869
|
+
* ["data1",
|
|
870
|
+
* [150, 140, 110], // or {high:150, mid: 140, low: 110}
|
|
871
|
+
* [150, 140, 110],
|
|
872
|
+
* [150, 140, 110]
|
|
873
|
+
* ]
|
|
874
|
+
* ],
|
|
875
|
+
* type: "area-line-range"
|
|
876
|
+
* }
|
|
877
|
+
*
|
|
878
|
+
* // for 'bubble' type, data can contain dimension value:
|
|
879
|
+
* // - an array of [y, z] data following the order
|
|
880
|
+
* // - or an object with 'y' and 'z' key value
|
|
881
|
+
* // 'y' is for y axis coordination and 'z' is the bubble radius value
|
|
882
|
+
* data: {
|
|
883
|
+
* columns: [
|
|
884
|
+
* ["data1",
|
|
885
|
+
* [10, 140], // or {y:10, z: 140}
|
|
886
|
+
* [100, 30],
|
|
887
|
+
* [50, 100]
|
|
888
|
+
* ]
|
|
889
|
+
* ],
|
|
890
|
+
* type: "bubble"
|
|
891
|
+
* }
|
|
892
|
+
*
|
|
893
|
+
* // for 'candlestick' type, data should contain:
|
|
894
|
+
* // - an array of [open, high, low, close, volume(optional)] data following the order
|
|
895
|
+
* // - or an object with 'open', 'high', 'low', 'close' and 'value'(optional) key value
|
|
896
|
+
* data: {
|
|
897
|
+
* columns: [
|
|
898
|
+
* ["data1",
|
|
899
|
+
* [1000, 1100, 850, 870, 100], // or {open:1000, high: 1100, low: 870, volume: 100}
|
|
900
|
+
* [870, 1250, 830, 1200] // 'volume' can be omitted
|
|
901
|
+
* ]
|
|
902
|
+
* ],
|
|
903
|
+
* type: "candlestick"
|
|
904
|
+
* }
|
|
905
|
+
*/
|
|
906
|
+
data_columns: void 0,
|
|
907
|
+
/**
|
|
908
|
+
* Used if loading JSON via data.url.
|
|
909
|
+
* - **Available Values:**
|
|
910
|
+
* - json
|
|
911
|
+
* - csv
|
|
912
|
+
* - tsv
|
|
913
|
+
* @name data․mimeType
|
|
914
|
+
* @memberof Options
|
|
915
|
+
* @type {string}
|
|
916
|
+
* @default csv
|
|
917
|
+
* @example
|
|
918
|
+
* data: {
|
|
919
|
+
* mimeType: "json"
|
|
920
|
+
* }
|
|
921
|
+
*/
|
|
922
|
+
data_mimeType: "csv",
|
|
923
|
+
/**
|
|
924
|
+
* Choose which JSON object keys correspond to desired data.
|
|
925
|
+
* - **NOTE:** Only for JSON object given as array.
|
|
926
|
+
* @name data․keys
|
|
927
|
+
* @memberof Options
|
|
928
|
+
* @type {string}
|
|
929
|
+
* @default undefined
|
|
930
|
+
* @example
|
|
931
|
+
* data: {
|
|
932
|
+
* json: [
|
|
933
|
+
* {name: "www.site1.com", upload: 200, download: 200, total: 400},
|
|
934
|
+
* {name: "www.site2.com", upload: 100, download: 300, total: 400},
|
|
935
|
+
* {name: "www.site3.com", upload: 300, download: 200, total: 500},
|
|
936
|
+
* {name: "www.site4.com", upload: 400, download: 100, total: 500}
|
|
937
|
+
* ],
|
|
938
|
+
* keys: {
|
|
939
|
+
* // case 1: specify 'x' key for category axis
|
|
940
|
+
* x: "name", // 'name' key will be used as category x axis values
|
|
941
|
+
* value: ["upload", "download"]
|
|
942
|
+
*
|
|
943
|
+
* // case 2: without 'x' key for non-category axis
|
|
944
|
+
* value: ["upload", "download"]
|
|
945
|
+
* }
|
|
946
|
+
* }
|
|
947
|
+
*/
|
|
948
|
+
data_keys: void 0,
|
|
949
|
+
/**
|
|
950
|
+
* Set text label to be displayed when there's no data to show.
|
|
951
|
+
* - ex. Toggling all visible data to not be shown, unloading all current data, etc.
|
|
952
|
+
* @name data․empty․label․text
|
|
953
|
+
* @memberof Options
|
|
954
|
+
* @type {string}
|
|
955
|
+
* @default ""
|
|
956
|
+
* @example
|
|
957
|
+
* data: {
|
|
958
|
+
* empty: {
|
|
959
|
+
* label: {
|
|
960
|
+
* text: "No Data"
|
|
961
|
+
* }
|
|
962
|
+
* }
|
|
963
|
+
* }
|
|
964
|
+
*/
|
|
965
|
+
data_empty_label_text: ""
|
|
965
966
|
};
|
|
966
|
-
|
|
967
|
-
export {
|
|
967
|
+
//#endregion
|
|
968
|
+
export { data_default as default };
|