billboard.js 3.11.3 → 3.12.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 +1 -5
- package/dist/billboard.css +13 -1
- package/dist/billboard.js +19672 -24210
- package/dist/billboard.min.css +2 -2
- package/dist/billboard.min.js +26 -3
- package/dist/billboard.pkgd.js +24515 -30430
- package/dist/billboard.pkgd.min.js +33 -3
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +77 -175
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -3
- package/dist/plugin/billboardjs-plugin-sparkline.js +429 -1134
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +4 -3
- package/dist/plugin/billboardjs-plugin-stanford.js +666 -1524
- package/dist/plugin/billboardjs-plugin-stanford.min.js +15 -3
- package/dist/plugin/billboardjs-plugin-tableview.js +503 -1175
- package/dist/plugin/billboardjs-plugin-tableview.min.js +30 -3
- package/dist/plugin/billboardjs-plugin-textoverlap.js +351 -1055
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +4 -3
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +1387 -1854
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +5 -3
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +2760 -3959
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +7 -3
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +3504 -5057
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +18 -3
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +2906 -4072
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +33 -3
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +3076 -4506
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +7 -3
- package/dist/theme/dark.css +12 -1
- package/dist/theme/dark.min.css +2 -2
- package/dist/theme/datalab.css +12 -1
- package/dist/theme/datalab.min.css +2 -2
- package/dist/theme/graph.css +12 -1
- package/dist/theme/graph.min.css +2 -2
- package/dist/theme/insight.css +12 -1
- package/dist/theme/insight.min.css +2 -2
- package/dist/theme/modern.css +12 -1
- package/dist/theme/modern.min.css +3 -4
- package/dist-esm/billboard.js +9297 -8527
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +20 -27
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +155 -149
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +302 -289
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +236 -236
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +41 -43
- package/package.json +29 -49
- package/src/Chart/api/axis.ts +6 -13
- package/src/Chart/api/chart.ts +12 -11
- package/src/Chart/api/data.ts +8 -7
- package/src/Chart/api/export.ts +28 -21
- package/src/Chart/api/flow.ts +4 -2
- package/src/Chart/api/grid.ts +1 -5
- package/src/Chart/api/load.ts +2 -2
- package/src/Chart/api/regions.ts +29 -5
- package/src/Chart/api/selection.ts +2 -2
- package/src/Chart/api/show.ts +2 -3
- package/src/Chart/api/subchart.ts +2 -2
- package/src/Chart/api/tooltip.ts +8 -9
- package/src/Chart/api/x.ts +2 -2
- package/src/Chart/api/zoom.ts +2 -2
- package/src/ChartInternal/Axis/Axis.ts +119 -44
- package/src/ChartInternal/Axis/AxisRenderer.ts +53 -38
- package/src/ChartInternal/Axis/AxisRendererHelper.ts +2 -2
- package/src/ChartInternal/ChartInternal.ts +87 -55
- package/src/ChartInternal/data/IData.ts +31 -31
- package/src/ChartInternal/data/convert.helper.ts +66 -68
- package/src/ChartInternal/data/convert.ts +11 -11
- package/src/ChartInternal/data/data.ts +51 -27
- package/src/ChartInternal/data/load.ts +7 -6
- package/src/ChartInternal/interactions/drag.ts +2 -1
- package/src/ChartInternal/interactions/eventrect.ts +84 -32
- package/src/ChartInternal/interactions/flow.ts +14 -4
- package/src/ChartInternal/interactions/interaction.ts +51 -22
- package/src/ChartInternal/interactions/subchart.ts +27 -25
- package/src/ChartInternal/interactions/zoom.ts +29 -18
- package/src/ChartInternal/internals/category.ts +1 -1
- package/src/ChartInternal/internals/class.ts +6 -6
- package/src/ChartInternal/internals/clip.ts +8 -4
- package/src/ChartInternal/internals/color.ts +70 -42
- package/src/ChartInternal/internals/domain.ts +59 -28
- package/src/ChartInternal/internals/format.ts +5 -5
- package/src/ChartInternal/internals/grid.ts +131 -47
- package/src/ChartInternal/internals/legend.ts +93 -61
- package/src/ChartInternal/internals/redraw.ts +6 -2
- package/src/ChartInternal/internals/region.ts +5 -3
- package/src/ChartInternal/internals/scale.ts +28 -15
- package/src/ChartInternal/internals/selection.ts +14 -13
- package/src/ChartInternal/internals/size.axis.ts +18 -10
- package/src/ChartInternal/internals/size.ts +98 -67
- package/src/ChartInternal/internals/style.ts +21 -19
- package/src/ChartInternal/internals/text.ts +79 -43
- package/src/ChartInternal/internals/title.ts +2 -2
- package/src/ChartInternal/internals/tooltip.ts +78 -32
- package/src/ChartInternal/internals/transform.ts +4 -4
- package/src/ChartInternal/internals/type.ts +17 -12
- package/src/ChartInternal/shape/arc.ts +78 -44
- package/src/ChartInternal/shape/area.ts +19 -22
- package/src/ChartInternal/shape/bar.ts +41 -31
- package/src/ChartInternal/shape/bubble.ts +5 -5
- package/src/ChartInternal/shape/candlestick.ts +15 -13
- package/src/ChartInternal/shape/funnel.ts +317 -0
- package/src/ChartInternal/shape/gauge.ts +16 -9
- package/src/ChartInternal/shape/line.ts +62 -46
- package/src/ChartInternal/shape/point.common.ts +1 -4
- package/src/ChartInternal/shape/point.ts +54 -34
- package/src/ChartInternal/shape/polar.ts +4 -2
- package/src/ChartInternal/shape/radar.ts +40 -22
- package/src/ChartInternal/shape/shape.ts +84 -58
- package/src/ChartInternal/shape/treemap.ts +31 -20
- package/src/Plugin/bubblecompare/index.ts +1 -3
- package/src/Plugin/sparkline/index.ts +3 -4
- package/src/Plugin/stanford/ColorScale.ts +3 -2
- package/src/Plugin/stanford/Elements.ts +15 -6
- package/src/Plugin/stanford/Options.ts +5 -5
- package/src/Plugin/stanford/index.ts +13 -9
- package/src/Plugin/tableview/Options.ts +1 -1
- package/src/Plugin/tableview/const.ts +1 -4
- package/src/Plugin/tableview/index.ts +11 -9
- package/src/Plugin/textoverlap/index.ts +4 -6
- package/src/config/Options/Options.ts +3 -3
- package/src/config/Options/axis/axis.ts +36 -0
- package/src/config/Options/axis/x.ts +34 -14
- package/src/config/Options/axis/y.ts +13 -13
- package/src/config/Options/axis/y2.ts +23 -10
- package/src/config/Options/common/color.ts +4 -4
- package/src/config/Options/common/grid.ts +4 -4
- package/src/config/Options/common/legend.ts +12 -13
- package/src/config/Options/common/main.ts +23 -23
- package/src/config/Options/common/point.ts +17 -18
- package/src/config/Options/common/title.ts +2 -2
- package/src/config/Options/common/tooltip.ts +13 -11
- package/src/config/Options/data/axis.ts +2 -2
- package/src/config/Options/data/data.ts +48 -45
- package/src/config/Options/interaction/interaction.ts +1 -1
- package/src/config/Options/interaction/subchart.ts +2 -2
- package/src/config/Options/interaction/zoom.ts +9 -9
- package/src/config/Options/shape/arc.ts +10 -13
- package/src/config/Options/shape/area.ts +5 -7
- package/src/config/Options/shape/bar.ts +8 -10
- package/src/config/Options/shape/bubble.ts +1 -1
- package/src/config/Options/shape/candlestick.ts +2 -2
- package/src/config/Options/shape/donut.ts +4 -4
- package/src/config/Options/shape/funnel.ts +38 -0
- package/src/config/Options/shape/gauge.ts +6 -6
- package/src/config/Options/shape/line.ts +3 -3
- package/src/config/Options/shape/pie.ts +5 -5
- package/src/config/Options/shape/polar.ts +3 -3
- package/src/config/Options/shape/radar.ts +2 -2
- package/src/config/Options/shape/scatter.ts +1 -1
- package/src/config/Options/shape/treemap.ts +1 -1
- package/src/config/Store/Element.ts +8 -5
- package/src/config/Store/State.ts +20 -13
- package/src/config/classes.ts +14 -4
- package/src/config/config.ts +1 -1
- package/src/config/const.ts +2 -0
- package/src/config/resolver/axis.ts +4 -4
- package/src/config/resolver/interaction.ts +3 -7
- package/src/config/resolver/shape.ts +17 -12
- package/src/core.ts +2 -3
- package/src/index.esm.ts +3 -6
- package/src/index.ts +2 -2
- package/src/module/Cache.ts +2 -3
- package/src/module/browser.ts +15 -10
- package/src/module/error.ts +9 -8
- package/src/module/generator.ts +3 -5
- package/src/module/util.ts +62 -39
- package/src/module/worker.ts +14 -11
- package/src/scss/billboard.scss +18 -0
- package/src/scss/theme/dark.scss +17 -0
- package/src/scss/theme/datalab.scss +17 -0
- package/src/scss/theme/graph.scss +17 -0
- package/src/scss/theme/insight.scss +17 -0
- package/src/scss/theme/modern.scss +17 -0
- package/types/axis.d.ts +17 -0
- package/types/bb.d.ts +1 -0
- package/types/index.d.ts +1 -0
- package/types/options.d.ts +9 -0
- package/types/options.shape.d.ts +26 -1
- package/types/types.d.ts +1 -0
|
@@ -34,7 +34,7 @@ export default {
|
|
|
34
34
|
* classname: "bill-board" // ex) <div id='chart' class='bill-board'>
|
|
35
35
|
* }
|
|
36
36
|
*/
|
|
37
|
-
bindto: <string|{element: string
|
|
37
|
+
bindto: <string | {element: string, classname?: string}>"#chart",
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* Set chart background.
|
|
@@ -55,7 +55,7 @@ export default {
|
|
|
55
55
|
* imgUrl: "https://naver.github.io/billboard.js/img/logo/billboard.js.svg",
|
|
56
56
|
* }
|
|
57
57
|
*/
|
|
58
|
-
background: <{class?: string
|
|
58
|
+
background: <{class?: string, color?: string, imgUrl?: string}>{},
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* Set 'clip-path' attribute for chart element
|
|
@@ -85,7 +85,7 @@ export default {
|
|
|
85
85
|
* classname: "test_class"
|
|
86
86
|
* }
|
|
87
87
|
*/
|
|
88
|
-
svg_classname: <string|undefined>
|
|
88
|
+
svg_classname: <string | undefined>undefined,
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
91
|
* The desired size of the chart element.
|
|
@@ -103,8 +103,8 @@ export default {
|
|
|
103
103
|
* height: 480
|
|
104
104
|
* }
|
|
105
105
|
*/
|
|
106
|
-
size_width: <number|undefined>
|
|
107
|
-
size_height: <number|undefined>
|
|
106
|
+
size_width: <number | undefined>undefined,
|
|
107
|
+
size_height: <number | undefined>undefined,
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
110
|
* The padding of the chart element.
|
|
@@ -150,11 +150,11 @@ export default {
|
|
|
150
150
|
* }
|
|
151
151
|
*/
|
|
152
152
|
padding: true,
|
|
153
|
-
padding_mode: <"fit"|undefined>
|
|
154
|
-
padding_left: <number|undefined>
|
|
155
|
-
padding_right: <number|undefined>
|
|
156
|
-
padding_top: <number|undefined>
|
|
157
|
-
padding_bottom: <number|undefined>
|
|
153
|
+
padding_mode: <"fit" | undefined>undefined,
|
|
154
|
+
padding_left: <number | undefined>undefined,
|
|
155
|
+
padding_right: <number | undefined>undefined,
|
|
156
|
+
padding_top: <number | undefined>undefined,
|
|
157
|
+
padding_bottom: <number | undefined>undefined,
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
160
|
* Set chart resize options
|
|
@@ -199,7 +199,7 @@ export default {
|
|
|
199
199
|
* ...
|
|
200
200
|
* }
|
|
201
201
|
*/
|
|
202
|
-
onclick: <(() => void)|undefined>
|
|
202
|
+
onclick: <(() => void) | undefined>undefined,
|
|
203
203
|
|
|
204
204
|
/**
|
|
205
205
|
* Set a callback to execute when mouse/touch enters the chart.
|
|
@@ -214,7 +214,7 @@ export default {
|
|
|
214
214
|
* ...
|
|
215
215
|
* }
|
|
216
216
|
*/
|
|
217
|
-
onover: <(() => void)|undefined>
|
|
217
|
+
onover: <(() => void) | undefined>undefined,
|
|
218
218
|
|
|
219
219
|
/**
|
|
220
220
|
* Set a callback to execute when mouse/touch leaves the chart.
|
|
@@ -229,7 +229,7 @@ export default {
|
|
|
229
229
|
* ...
|
|
230
230
|
* }
|
|
231
231
|
*/
|
|
232
|
-
onout: <(() => void)|undefined>
|
|
232
|
+
onout: <(() => void) | undefined>undefined,
|
|
233
233
|
|
|
234
234
|
/**
|
|
235
235
|
* Set a callback to execute when user resizes the screen.
|
|
@@ -243,7 +243,7 @@ export default {
|
|
|
243
243
|
* ...
|
|
244
244
|
* }
|
|
245
245
|
*/
|
|
246
|
-
onresize: <(() => void)|undefined>
|
|
246
|
+
onresize: <(() => void) | undefined>undefined,
|
|
247
247
|
|
|
248
248
|
/**
|
|
249
249
|
* Set a callback to execute when screen resize finished.
|
|
@@ -257,7 +257,7 @@ export default {
|
|
|
257
257
|
* ...
|
|
258
258
|
* }
|
|
259
259
|
*/
|
|
260
|
-
onresized: <(() => void)|undefined>
|
|
260
|
+
onresized: <(() => void) | undefined>undefined,
|
|
261
261
|
|
|
262
262
|
/**
|
|
263
263
|
* Set a callback to execute before the chart is initialized
|
|
@@ -271,7 +271,7 @@ export default {
|
|
|
271
271
|
* ...
|
|
272
272
|
* }
|
|
273
273
|
*/
|
|
274
|
-
onbeforeinit: <(() => void)|undefined>
|
|
274
|
+
onbeforeinit: <(() => void) | undefined>undefined,
|
|
275
275
|
|
|
276
276
|
/**
|
|
277
277
|
* Set a callback to execute when the chart is initialized.
|
|
@@ -285,7 +285,7 @@ export default {
|
|
|
285
285
|
* ...
|
|
286
286
|
* }
|
|
287
287
|
*/
|
|
288
|
-
oninit: <(() => void)|undefined>
|
|
288
|
+
oninit: <(() => void) | undefined>undefined,
|
|
289
289
|
|
|
290
290
|
/**
|
|
291
291
|
* Set a callback to execute after the chart is initialized
|
|
@@ -299,7 +299,7 @@ export default {
|
|
|
299
299
|
* ...
|
|
300
300
|
* }
|
|
301
301
|
*/
|
|
302
|
-
onafterinit: <(() => void)|undefined>
|
|
302
|
+
onafterinit: <(() => void) | undefined>undefined,
|
|
303
303
|
|
|
304
304
|
/**
|
|
305
305
|
* Set a callback which is executed when the chart is rendered. Basically, this callback will be called in each time when the chart is redrawed.
|
|
@@ -313,7 +313,7 @@ export default {
|
|
|
313
313
|
* ...
|
|
314
314
|
* }
|
|
315
315
|
*/
|
|
316
|
-
onrendered: <(() => void)|undefined>
|
|
316
|
+
onrendered: <(() => void) | undefined>undefined,
|
|
317
317
|
|
|
318
318
|
/**
|
|
319
319
|
* Set duration of transition (in milliseconds) for chart animation.<br><br>
|
|
@@ -360,7 +360,7 @@ export default {
|
|
|
360
360
|
* }
|
|
361
361
|
*
|
|
362
362
|
* @example
|
|
363
|
-
*
|
|
363
|
+
* // <!-- render.lazy will detect visibility defined -->
|
|
364
364
|
* // (a) <div id='chart' class='hide'></div>
|
|
365
365
|
* // (b) <div id='chart' style='display:none'></div>
|
|
366
366
|
*
|
|
@@ -373,7 +373,7 @@ export default {
|
|
|
373
373
|
* document.getElementById('chart').style.display = 'block'; // (b)
|
|
374
374
|
*
|
|
375
375
|
* @example
|
|
376
|
-
*
|
|
376
|
+
* // chart won't be rendered and not observing bind element's visiblity changes
|
|
377
377
|
* var chart = bb.generate({
|
|
378
378
|
* render: {
|
|
379
379
|
* lazy: true,
|
|
@@ -384,7 +384,7 @@ export default {
|
|
|
384
384
|
* // call at any point when you want to render
|
|
385
385
|
* chart.flush();
|
|
386
386
|
*/
|
|
387
|
-
render: <{lazy?: boolean
|
|
387
|
+
render: <{lazy?: boolean, observe?: boolean}>{},
|
|
388
388
|
|
|
389
389
|
/**
|
|
390
390
|
* Show rectangles inside the chart.<br><br>
|
|
@@ -416,5 +416,5 @@ export default {
|
|
|
416
416
|
* }
|
|
417
417
|
* ]
|
|
418
418
|
*/
|
|
419
|
-
regions: <RegionsType[]>
|
|
419
|
+
regions: <RegionsType[]>[]
|
|
420
420
|
};
|
|
@@ -30,8 +30,8 @@ export default {
|
|
|
30
30
|
* @property {boolean} [point.focus.only=false] Show point only when is focused.
|
|
31
31
|
* @property {number|null} [point.opacity=undefined] Set point opacity value.
|
|
32
32
|
* - **NOTE:**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
33
|
+
* - `null` will make to not set inline 'opacity' css prop.
|
|
34
|
+
* - when no value(or undefined) is set, it defaults to set opacity value according its chart types.
|
|
35
35
|
* @property {number|string|Function} [point.sensitivity=10] The senstivity value for interaction boundary.
|
|
36
36
|
* - **Available Values:**
|
|
37
37
|
* - {number}: Absolute sensitivity value which is the distance from the data point in pixel.
|
|
@@ -131,11 +131,11 @@ export default {
|
|
|
131
131
|
*
|
|
132
132
|
* // callback for each point to determine the sensitivity
|
|
133
133
|
* sensitivity: function(d) {
|
|
134
|
-
*
|
|
135
|
-
*
|
|
134
|
+
* // ex. of argument d:
|
|
135
|
+
* // ==> {x: 2, value: 55, id: 'data3', index: 2, r: 19.820624179302296}
|
|
136
136
|
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
137
|
+
* // returning d.r, will make sensitivity same as point's radius value.
|
|
138
|
+
* return d.r;
|
|
139
139
|
* }
|
|
140
140
|
*
|
|
141
141
|
* // valid values are "circle" or "rectangle"
|
|
@@ -151,19 +151,18 @@ export default {
|
|
|
151
151
|
*/
|
|
152
152
|
point_show: true,
|
|
153
153
|
point_r: 2.5,
|
|
154
|
-
point_radialGradient: <
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
point_sensitivity: <number|"radius"|((d: IDataPoint) => number)> 10,
|
|
154
|
+
point_radialGradient: <boolean | {
|
|
155
|
+
cx?: number,
|
|
156
|
+
cy?: number,
|
|
157
|
+
r?: number,
|
|
158
|
+
stops?: [number, string | null | Function, number]
|
|
159
|
+
}>false,
|
|
160
|
+
point_sensitivity: <number | "radius" | ((d: IDataPoint) => number)>10,
|
|
162
161
|
point_focus_expand_enabled: true,
|
|
163
|
-
point_focus_expand_r: <number|undefined>
|
|
162
|
+
point_focus_expand_r: <number | undefined>undefined,
|
|
164
163
|
point_focus_only: false,
|
|
165
|
-
point_opacity: <number|null|undefined>
|
|
166
|
-
point_pattern: <string[]>
|
|
167
|
-
point_select_r: <number|undefined>
|
|
164
|
+
point_opacity: <number | null | undefined>undefined,
|
|
165
|
+
point_pattern: <string[]>[],
|
|
166
|
+
point_select_r: <number | undefined>undefined,
|
|
168
167
|
point_type: "circle"
|
|
169
168
|
};
|
|
@@ -35,12 +35,12 @@ export default {
|
|
|
35
35
|
* position: "center"
|
|
36
36
|
* }
|
|
37
37
|
*/
|
|
38
|
-
title_text: <string|undefined>
|
|
38
|
+
title_text: <string | undefined>undefined,
|
|
39
39
|
title_padding: {
|
|
40
40
|
top: 0,
|
|
41
41
|
right: 0,
|
|
42
42
|
bottom: 0,
|
|
43
43
|
left: 0
|
|
44
44
|
},
|
|
45
|
-
title_position: <"center"|"right"|"left">
|
|
45
|
+
title_position: <"center" | "right" | "left">"center"
|
|
46
46
|
};
|
|
@@ -44,9 +44,9 @@ export default {
|
|
|
44
44
|
* - if `axis.x.tick.format` option will be used if set.
|
|
45
45
|
* - otherwise, will return function based on tick format type(category, timeseries).
|
|
46
46
|
* - defaultValueFormat:
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
47
|
+
* - for Arc type (except gauge, radar), the function will return value from `(ratio * 100).toFixed(1)`.
|
|
48
|
+
* - for Axis based types, will be used `axis.[y|y2].tick.format` option value if is set.
|
|
49
|
+
* - otherwise, will parse value and return as number.
|
|
50
50
|
* @property {string|HTMLElement} [tooltip.contents.bindto=undefined] Set CSS selector or element reference to bind tooltip.
|
|
51
51
|
* - **NOTE:** When is specified, will not be updating tooltip's position.
|
|
52
52
|
* @property {string} [tooltip.contents.template=undefined] Set tooltip's template.<br><br>
|
|
@@ -231,13 +231,15 @@ export default {
|
|
|
231
231
|
tooltip_show: true,
|
|
232
232
|
tooltip_doNotHide: false,
|
|
233
233
|
tooltip_grouped: true,
|
|
234
|
-
tooltip_format_title: <(() => string)|undefined>
|
|
235
|
-
tooltip_format_name: <(() => string)|undefined>
|
|
236
|
-
tooltip_format_value: <(() => number)|undefined>
|
|
237
|
-
tooltip_position: <(() => {top: number
|
|
238
|
-
tooltip_contents: <
|
|
239
|
-
|
|
240
|
-
|
|
234
|
+
tooltip_format_title: <(() => string) | undefined>undefined,
|
|
235
|
+
tooltip_format_name: <(() => string) | undefined>undefined,
|
|
236
|
+
tooltip_format_value: <(() => number) | undefined>undefined,
|
|
237
|
+
tooltip_position: <(() => {top: number, left: number}) | undefined>undefined,
|
|
238
|
+
tooltip_contents: <(() => string) | {
|
|
239
|
+
bindto: string,
|
|
240
|
+
template: string,
|
|
241
|
+
text?: {[key: string]: string[]}
|
|
242
|
+
}>{},
|
|
241
243
|
tooltip_init_show: false,
|
|
242
244
|
tooltip_init_x: 0,
|
|
243
245
|
tooltip_init_position: undefined,
|
|
@@ -247,5 +249,5 @@ export default {
|
|
|
247
249
|
tooltip_onhide: () => {},
|
|
248
250
|
tooltip_onshown: () => {},
|
|
249
251
|
tooltip_onhidden: () => {},
|
|
250
|
-
tooltip_order: <string|Function|null>
|
|
252
|
+
tooltip_order: <string | Function | null>null
|
|
251
253
|
};
|
|
@@ -100,7 +100,7 @@ export default {
|
|
|
100
100
|
* }
|
|
101
101
|
* }
|
|
102
102
|
*/
|
|
103
|
-
data_axes: <{[key: string]: string}>
|
|
103
|
+
data_axes: <{[key: string]: string}>{},
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
106
|
* Define regions for each data.<br>
|
|
@@ -130,7 +130,7 @@ export default {
|
|
|
130
130
|
* }
|
|
131
131
|
* }
|
|
132
132
|
*/
|
|
133
|
-
data_regions: <DataRegionsType>
|
|
133
|
+
data_regions: <DataRegionsType>{},
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
136
|
* Set the stacking to be normalized
|
|
@@ -20,7 +20,7 @@ export default {
|
|
|
20
20
|
* x: "date"
|
|
21
21
|
* }
|
|
22
22
|
*/
|
|
23
|
-
data_x: <string|undefined>
|
|
23
|
+
data_x: <string | undefined>undefined,
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Converts data id value
|
|
@@ -59,7 +59,7 @@ export default {
|
|
|
59
59
|
* }
|
|
60
60
|
* }
|
|
61
61
|
*/
|
|
62
|
-
data_names: <{[key: string]: string|null}>
|
|
62
|
+
data_names: <{[key: string]: string | null}>{},
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* Set custom data class.<br><br>
|
|
@@ -76,7 +76,7 @@ export default {
|
|
|
76
76
|
* }
|
|
77
77
|
* }
|
|
78
78
|
*/
|
|
79
|
-
data_classes: <{[key: string]: string}>
|
|
79
|
+
data_classes: <{[key: string]: string}>{},
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
* Set chart type at once.<br><br>
|
|
@@ -91,6 +91,7 @@ export default {
|
|
|
91
91
|
* - bubble
|
|
92
92
|
* - candlestick
|
|
93
93
|
* - donut
|
|
94
|
+
* - funnel
|
|
94
95
|
* - gauge
|
|
95
96
|
* - line
|
|
96
97
|
* - pie
|
|
@@ -121,6 +122,7 @@ export default {
|
|
|
121
122
|
* bubble,
|
|
122
123
|
* candlestick,
|
|
123
124
|
* donut,
|
|
125
|
+
* funnel,
|
|
124
126
|
* gauge,
|
|
125
127
|
* line,
|
|
126
128
|
* pie,
|
|
@@ -139,7 +141,7 @@ export default {
|
|
|
139
141
|
* }
|
|
140
142
|
* });
|
|
141
143
|
*/
|
|
142
|
-
data_type: <ChartTypes|undefined>
|
|
144
|
+
data_type: <ChartTypes | undefined>undefined,
|
|
143
145
|
|
|
144
146
|
/**
|
|
145
147
|
* Set chart type for each data.<br>
|
|
@@ -169,6 +171,7 @@ export default {
|
|
|
169
171
|
* bubble,
|
|
170
172
|
* candlestick,
|
|
171
173
|
* donut,
|
|
174
|
+
* funnel,
|
|
172
175
|
* gauge,
|
|
173
176
|
* line,
|
|
174
177
|
* pie,
|
|
@@ -190,7 +193,7 @@ export default {
|
|
|
190
193
|
* }
|
|
191
194
|
* });
|
|
192
195
|
*/
|
|
193
|
-
data_types: <{[key: string]: ChartTypes}>
|
|
196
|
+
data_types: <{[key: string]: ChartTypes}>{},
|
|
194
197
|
|
|
195
198
|
/**
|
|
196
199
|
* This option changes the order of stacking data and pieces of pie/donut.
|
|
@@ -242,7 +245,7 @@ export default {
|
|
|
242
245
|
* }
|
|
243
246
|
* }
|
|
244
247
|
*/
|
|
245
|
-
data_order: <"desc"|"asc"|Function|null>
|
|
248
|
+
data_order: <"desc" | "asc" | Function | null>"desc",
|
|
246
249
|
|
|
247
250
|
/**
|
|
248
251
|
* Set groups for the data for stacking.
|
|
@@ -258,7 +261,7 @@ export default {
|
|
|
258
261
|
* ]
|
|
259
262
|
* }
|
|
260
263
|
*/
|
|
261
|
-
data_groups: <string[][]>
|
|
264
|
+
data_groups: <string[][]>[],
|
|
262
265
|
|
|
263
266
|
/**
|
|
264
267
|
* Set how zero value will be treated on groups.<br>
|
|
@@ -276,7 +279,7 @@ export default {
|
|
|
276
279
|
* groupsZeroAs: "zero" // "positive" or "negative"
|
|
277
280
|
* }
|
|
278
281
|
*/
|
|
279
|
-
data_groupsZeroAs: <"zero" | "positive" | "negative">
|
|
282
|
+
data_groupsZeroAs: <"zero" | "positive" | "negative">"positive",
|
|
280
283
|
|
|
281
284
|
/**
|
|
282
285
|
* Set color converter function.<br><br>
|
|
@@ -291,7 +294,7 @@ export default {
|
|
|
291
294
|
* color: function(color, d) { ... }
|
|
292
295
|
* }
|
|
293
296
|
*/
|
|
294
|
-
data_color: <Function|undefined>
|
|
297
|
+
data_color: <Function | undefined>undefined,
|
|
295
298
|
|
|
296
299
|
/**
|
|
297
300
|
* Set color for each data.
|
|
@@ -310,7 +313,7 @@ export default {
|
|
|
310
313
|
* }
|
|
311
314
|
* }
|
|
312
315
|
*/
|
|
313
|
-
data_colors: <{[key: string]: string|(() => string)
|
|
316
|
+
data_colors: <{[key: string]: string | (() => string)}>{},
|
|
314
317
|
|
|
315
318
|
/**
|
|
316
319
|
* Set labels options
|
|
@@ -419,23 +422,23 @@ export default {
|
|
|
419
422
|
* data2: {x: 10, y: -20}
|
|
420
423
|
* },
|
|
421
424
|
*
|
|
422
|
-
*
|
|
425
|
+
* // rotate degree for label text
|
|
423
426
|
* rotate: 90
|
|
424
427
|
* }
|
|
425
428
|
* }
|
|
426
429
|
*/
|
|
427
|
-
data_labels:
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
data_labels_backgroundColors: <string|{[key: string]: string}|undefined>
|
|
438
|
-
data_labels_colors: <string|object|Function|undefined>
|
|
430
|
+
data_labels: <boolean | {
|
|
431
|
+
centered?: boolean,
|
|
432
|
+
format?: (v: number, id: string, i: number, texts: d3Selection) => number,
|
|
433
|
+
colors?: string | {[key: string]: string},
|
|
434
|
+
position?: (type: "x" | "y", v: number, id: string, i: number, texts: d3Selection) =>
|
|
435
|
+
| number
|
|
436
|
+
| {[key: string]: number}
|
|
437
|
+
| {[key: string]: {x?: number, y?: number}},
|
|
438
|
+
rotate?: number
|
|
439
|
+
}>{},
|
|
440
|
+
data_labels_backgroundColors: <string | {[key: string]: string} | undefined>undefined,
|
|
441
|
+
data_labels_colors: <string | object | Function | undefined>undefined,
|
|
439
442
|
data_labels_position: {},
|
|
440
443
|
|
|
441
444
|
/**
|
|
@@ -454,7 +457,7 @@ export default {
|
|
|
454
457
|
* hide: ["data1", ...]
|
|
455
458
|
* }
|
|
456
459
|
*/
|
|
457
|
-
data_hide: <string[]|boolean>
|
|
460
|
+
data_hide: <string[] | boolean>false,
|
|
458
461
|
|
|
459
462
|
/**
|
|
460
463
|
* Filter values to be shown
|
|
@@ -474,7 +477,7 @@ export default {
|
|
|
474
477
|
* return v.id !== "data1";
|
|
475
478
|
* }
|
|
476
479
|
*/
|
|
477
|
-
data_filter: <(() => boolean)|undefined>
|
|
480
|
+
data_filter: <(() => boolean) | undefined>undefined,
|
|
478
481
|
|
|
479
482
|
/**
|
|
480
483
|
* Set a callback for click event on each data point.<br><br>
|
|
@@ -554,7 +557,7 @@ export default {
|
|
|
554
557
|
* }
|
|
555
558
|
* }
|
|
556
559
|
*/
|
|
557
|
-
data_onshown: <Function|undefined>
|
|
560
|
+
data_onshown: <Function | undefined>undefined,
|
|
558
561
|
|
|
559
562
|
/**
|
|
560
563
|
* Set a callback for when data is hidden.<br>
|
|
@@ -571,7 +574,7 @@ export default {
|
|
|
571
574
|
* }
|
|
572
575
|
* }
|
|
573
576
|
*/
|
|
574
|
-
data_onhidden: <Function|undefined>
|
|
577
|
+
data_onhidden: <Function | undefined>undefined,
|
|
575
578
|
|
|
576
579
|
/**
|
|
577
580
|
* Set a callback for minimum data
|
|
@@ -587,7 +590,7 @@ export default {
|
|
|
587
590
|
* ...
|
|
588
591
|
* }
|
|
589
592
|
*/
|
|
590
|
-
data_onmin: <Function|undefined>
|
|
593
|
+
data_onmin: <Function | undefined>undefined,
|
|
591
594
|
|
|
592
595
|
/**
|
|
593
596
|
* Set a callback for maximum data
|
|
@@ -603,7 +606,7 @@ export default {
|
|
|
603
606
|
* ...
|
|
604
607
|
* }
|
|
605
608
|
*/
|
|
606
|
-
data_onmax: <Function|undefined>
|
|
609
|
+
data_onmax: <Function | undefined>undefined,
|
|
607
610
|
|
|
608
611
|
/**
|
|
609
612
|
* Load a CSV or JSON file from a URL. NOTE that this will not work if loading via the "file://" protocol as the most browsers will block XMLHTTPRequests.
|
|
@@ -617,7 +620,7 @@ export default {
|
|
|
617
620
|
* url: "/data/test.csv"
|
|
618
621
|
* }
|
|
619
622
|
*/
|
|
620
|
-
data_url: <string|undefined>
|
|
623
|
+
data_url: <string | undefined>undefined,
|
|
621
624
|
|
|
622
625
|
/**
|
|
623
626
|
* XHR header value
|
|
@@ -636,7 +639,7 @@ export default {
|
|
|
636
639
|
* }
|
|
637
640
|
* }
|
|
638
641
|
*/
|
|
639
|
-
data_headers: <object|undefined>
|
|
642
|
+
data_headers: <object | undefined>undefined,
|
|
640
643
|
|
|
641
644
|
/**
|
|
642
645
|
* Parse a JSON object for data. See also data.keys.
|
|
@@ -664,7 +667,7 @@ export default {
|
|
|
664
667
|
* }
|
|
665
668
|
* }
|
|
666
669
|
*/
|
|
667
|
-
data_json: <object[]|undefined>
|
|
670
|
+
data_json: <object[] | undefined>undefined,
|
|
668
671
|
|
|
669
672
|
/**
|
|
670
673
|
* Load data from a multidimensional array, with the first element containing the data names, the following containing related data in that order.
|
|
@@ -743,20 +746,20 @@ export default {
|
|
|
743
746
|
* data: {
|
|
744
747
|
* rows: [
|
|
745
748
|
* ["data1", "data2"],
|
|
746
|
-
*
|
|
747
|
-
*
|
|
748
|
-
*
|
|
749
|
-
*
|
|
750
|
-
*
|
|
751
|
-
*
|
|
752
|
-
*
|
|
753
|
-
*
|
|
754
|
-
*
|
|
749
|
+
* [
|
|
750
|
+
* // open, high, low, close, volume (optional)
|
|
751
|
+
* {open: 1300, high: 1369, low: 1200, close: 1339, volume: 100},
|
|
752
|
+
* [1000, 1100, 850, 870]
|
|
753
|
+
* ],
|
|
754
|
+
* [
|
|
755
|
+
* {open: 1348, high: 1371, low: 1271, close: 1320},
|
|
756
|
+
* [870, 1250, 830, 1200, 50]
|
|
757
|
+
* ]
|
|
755
758
|
* ],
|
|
756
759
|
* type: "candlestick"
|
|
757
760
|
* }
|
|
758
761
|
*/
|
|
759
|
-
data_rows: <(string|number)[][]|undefined>
|
|
762
|
+
data_rows: <(string | number)[][] | undefined>undefined,
|
|
760
763
|
|
|
761
764
|
/**
|
|
762
765
|
* Load data from a multidimensional array, with each element containing an array consisting of a datum name and associated data values.
|
|
@@ -826,7 +829,7 @@ export default {
|
|
|
826
829
|
* type: "candlestick"
|
|
827
830
|
* }
|
|
828
831
|
*/
|
|
829
|
-
data_columns: <(string|number)[][]|undefined>
|
|
832
|
+
data_columns: <(string | number)[][] | undefined>undefined,
|
|
830
833
|
|
|
831
834
|
/**
|
|
832
835
|
* Used if loading JSON via data.url.
|
|
@@ -843,7 +846,7 @@ export default {
|
|
|
843
846
|
* mimeType: "json"
|
|
844
847
|
* }
|
|
845
848
|
*/
|
|
846
|
-
data_mimeType: <"csv"|"json"|"tsv">
|
|
849
|
+
data_mimeType: <"csv" | "json" | "tsv">"csv",
|
|
847
850
|
|
|
848
851
|
/**
|
|
849
852
|
* Choose which JSON object keys correspond to desired data.
|
|
@@ -870,7 +873,7 @@ export default {
|
|
|
870
873
|
* }
|
|
871
874
|
* }
|
|
872
875
|
*/
|
|
873
|
-
data_keys: <{x?: string
|
|
876
|
+
data_keys: <{x?: string, value?: string[]} | undefined>undefined,
|
|
874
877
|
|
|
875
878
|
/**
|
|
876
879
|
* Set text label to be displayed when there's no data to show.
|
|
@@ -41,5 +41,5 @@ export default {
|
|
|
41
41
|
interaction_enabled: true,
|
|
42
42
|
interaction_brighten: true,
|
|
43
43
|
interaction_inputType_mouse: true,
|
|
44
|
-
interaction_inputType_touch: <boolean|{preventDefault?: boolean|number}>
|
|
44
|
+
interaction_inputType_touch: <boolean | {preventDefault?: boolean | number}>{}
|
|
45
45
|
};
|
|
@@ -65,8 +65,8 @@ export default {
|
|
|
65
65
|
subchart_size_height: 60,
|
|
66
66
|
subchart_axis_x_show: true,
|
|
67
67
|
subchart_axis_x_tick_show: true,
|
|
68
|
-
subchart_axis_x_tick_format: <Function|string|undefined>
|
|
68
|
+
subchart_axis_x_tick_format: <Function | string | undefined>undefined,
|
|
69
69
|
subchart_axis_x_tick_text_show: true,
|
|
70
|
-
subchart_init_range: <undefined|[number, number]>
|
|
70
|
+
subchart_init_range: <undefined | [number, number]>undefined,
|
|
71
71
|
subchart_onbrush: () => {}
|
|
72
72
|
};
|
|
@@ -72,15 +72,15 @@ export default {
|
|
|
72
72
|
* ...
|
|
73
73
|
* }
|
|
74
74
|
*/
|
|
75
|
-
zoom_enabled: <boolean>
|
|
76
|
-
zoom_type: <"wheel" | "drag">
|
|
77
|
-
zoom_extent: <number[]|undefined>
|
|
75
|
+
zoom_enabled: <boolean>false,
|
|
76
|
+
zoom_type: <"wheel" | "drag">"wheel",
|
|
77
|
+
zoom_extent: <number[] | undefined>undefined,
|
|
78
78
|
zoom_privileged: false,
|
|
79
79
|
zoom_rescale: false,
|
|
80
|
-
zoom_onzoom: <Function|undefined>
|
|
81
|
-
zoom_onzoomstart: <Function|undefined>
|
|
82
|
-
zoom_onzoomend: <Function|undefined>
|
|
83
|
-
zoom_resetButton: <{text: string
|
|
84
|
-
zoom_x_min: <Number|Date|undefined>
|
|
85
|
-
zoom_x_max: <Number|Date|undefined>
|
|
80
|
+
zoom_onzoom: <Function | undefined>undefined,
|
|
81
|
+
zoom_onzoomstart: <Function | undefined>undefined,
|
|
82
|
+
zoom_onzoomend: <Function | undefined>undefined,
|
|
83
|
+
zoom_resetButton: <{text: string} | boolean>true,
|
|
84
|
+
zoom_x_min: <Number | Date | undefined>undefined,
|
|
85
|
+
zoom_x_max: <Number | Date | undefined>undefined
|
|
86
86
|
};
|
|
@@ -127,13 +127,11 @@ export default {
|
|
|
127
127
|
* }
|
|
128
128
|
* }
|
|
129
129
|
*/
|
|
130
|
-
arc_cornerRadius: <
|
|
131
|
-
number|((id: string, value: number) => number)
|
|
132
|
-
> 0,
|
|
130
|
+
arc_cornerRadius: <number | ((id: string, value: number) => number)>0,
|
|
133
131
|
arc_cornerRadius_ratio: 0,
|
|
134
132
|
arc_needle_show: false,
|
|
135
|
-
arc_needle_color: <string|undefined>
|
|
136
|
-
arc_needle_value: <number|undefined>
|
|
133
|
+
arc_needle_color: <string | undefined>undefined,
|
|
134
|
+
arc_needle_value: <number | undefined>undefined,
|
|
137
135
|
arc_needle_path: undefined,
|
|
138
136
|
arc_needle_length: 100,
|
|
139
137
|
arc_needle_top_rx: 0,
|
|
@@ -143,14 +141,13 @@ export default {
|
|
|
143
141
|
arc_needle_bottom_ry: 1,
|
|
144
142
|
arc_needle_bottom_width: 15,
|
|
145
143
|
arc_needle_bottom_len: 0,
|
|
146
|
-
arc_rangeText_values: <number[]|undefined>
|
|
147
|
-
arc_rangeText_unit: <"absolute"|"%">
|
|
144
|
+
arc_rangeText_values: <number[] | undefined>undefined,
|
|
145
|
+
arc_rangeText_unit: <"absolute" | "%">"absolute",
|
|
148
146
|
arc_rangeText_fixed: false,
|
|
149
|
-
arc_rangeText_format: <
|
|
150
|
-
((v: number) => number)|undefined
|
|
151
|
-
> undefined,
|
|
147
|
+
arc_rangeText_format: <((v: number) => number) | undefined>undefined,
|
|
152
148
|
arc_rangeText_position: <
|
|
153
|
-
((v: number) => {x?: number
|
|
154
|
-
{x?: number, y?: number}
|
|
155
|
-
|
|
149
|
+
| ((v: number) => {x?: number, y?: number})
|
|
150
|
+
| {x?: number, y?: number}
|
|
151
|
+
| undefined
|
|
152
|
+
>undefined
|
|
156
153
|
};
|