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.
Files changed (177) hide show
  1. package/README.md +1 -5
  2. package/dist/billboard.css +13 -1
  3. package/dist/billboard.js +19672 -24210
  4. package/dist/billboard.min.css +2 -2
  5. package/dist/billboard.min.js +26 -3
  6. package/dist/billboard.pkgd.js +24515 -30430
  7. package/dist/billboard.pkgd.min.js +33 -3
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.js +77 -175
  9. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -3
  10. package/dist/plugin/billboardjs-plugin-sparkline.js +429 -1134
  11. package/dist/plugin/billboardjs-plugin-sparkline.min.js +4 -3
  12. package/dist/plugin/billboardjs-plugin-stanford.js +666 -1524
  13. package/dist/plugin/billboardjs-plugin-stanford.min.js +15 -3
  14. package/dist/plugin/billboardjs-plugin-tableview.js +503 -1175
  15. package/dist/plugin/billboardjs-plugin-tableview.min.js +30 -3
  16. package/dist/plugin/billboardjs-plugin-textoverlap.js +351 -1055
  17. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +4 -3
  18. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +1387 -1854
  19. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +5 -3
  20. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +2760 -3959
  21. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +7 -3
  22. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +3504 -5057
  23. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +18 -3
  24. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +2906 -4072
  25. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +33 -3
  26. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +3076 -4506
  27. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +7 -3
  28. package/dist/theme/dark.css +12 -1
  29. package/dist/theme/dark.min.css +2 -2
  30. package/dist/theme/datalab.css +12 -1
  31. package/dist/theme/datalab.min.css +2 -2
  32. package/dist/theme/graph.css +12 -1
  33. package/dist/theme/graph.min.css +2 -2
  34. package/dist/theme/insight.css +12 -1
  35. package/dist/theme/insight.min.css +2 -2
  36. package/dist/theme/modern.css +12 -1
  37. package/dist/theme/modern.min.css +3 -4
  38. package/dist-esm/billboard.js +9297 -8527
  39. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +20 -27
  40. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +155 -149
  41. package/dist-esm/plugin/billboardjs-plugin-stanford.js +302 -289
  42. package/dist-esm/plugin/billboardjs-plugin-tableview.js +236 -236
  43. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +41 -43
  44. package/package.json +29 -49
  45. package/src/Chart/api/axis.ts +6 -13
  46. package/src/Chart/api/chart.ts +12 -11
  47. package/src/Chart/api/data.ts +8 -7
  48. package/src/Chart/api/export.ts +28 -21
  49. package/src/Chart/api/flow.ts +4 -2
  50. package/src/Chart/api/grid.ts +1 -5
  51. package/src/Chart/api/load.ts +2 -2
  52. package/src/Chart/api/regions.ts +29 -5
  53. package/src/Chart/api/selection.ts +2 -2
  54. package/src/Chart/api/show.ts +2 -3
  55. package/src/Chart/api/subchart.ts +2 -2
  56. package/src/Chart/api/tooltip.ts +8 -9
  57. package/src/Chart/api/x.ts +2 -2
  58. package/src/Chart/api/zoom.ts +2 -2
  59. package/src/ChartInternal/Axis/Axis.ts +119 -44
  60. package/src/ChartInternal/Axis/AxisRenderer.ts +53 -38
  61. package/src/ChartInternal/Axis/AxisRendererHelper.ts +2 -2
  62. package/src/ChartInternal/ChartInternal.ts +87 -55
  63. package/src/ChartInternal/data/IData.ts +31 -31
  64. package/src/ChartInternal/data/convert.helper.ts +66 -68
  65. package/src/ChartInternal/data/convert.ts +11 -11
  66. package/src/ChartInternal/data/data.ts +51 -27
  67. package/src/ChartInternal/data/load.ts +7 -6
  68. package/src/ChartInternal/interactions/drag.ts +2 -1
  69. package/src/ChartInternal/interactions/eventrect.ts +84 -32
  70. package/src/ChartInternal/interactions/flow.ts +14 -4
  71. package/src/ChartInternal/interactions/interaction.ts +51 -22
  72. package/src/ChartInternal/interactions/subchart.ts +27 -25
  73. package/src/ChartInternal/interactions/zoom.ts +29 -18
  74. package/src/ChartInternal/internals/category.ts +1 -1
  75. package/src/ChartInternal/internals/class.ts +6 -6
  76. package/src/ChartInternal/internals/clip.ts +8 -4
  77. package/src/ChartInternal/internals/color.ts +70 -42
  78. package/src/ChartInternal/internals/domain.ts +59 -28
  79. package/src/ChartInternal/internals/format.ts +5 -5
  80. package/src/ChartInternal/internals/grid.ts +131 -47
  81. package/src/ChartInternal/internals/legend.ts +93 -61
  82. package/src/ChartInternal/internals/redraw.ts +6 -2
  83. package/src/ChartInternal/internals/region.ts +5 -3
  84. package/src/ChartInternal/internals/scale.ts +28 -15
  85. package/src/ChartInternal/internals/selection.ts +14 -13
  86. package/src/ChartInternal/internals/size.axis.ts +18 -10
  87. package/src/ChartInternal/internals/size.ts +98 -67
  88. package/src/ChartInternal/internals/style.ts +21 -19
  89. package/src/ChartInternal/internals/text.ts +79 -43
  90. package/src/ChartInternal/internals/title.ts +2 -2
  91. package/src/ChartInternal/internals/tooltip.ts +78 -32
  92. package/src/ChartInternal/internals/transform.ts +4 -4
  93. package/src/ChartInternal/internals/type.ts +17 -12
  94. package/src/ChartInternal/shape/arc.ts +78 -44
  95. package/src/ChartInternal/shape/area.ts +19 -22
  96. package/src/ChartInternal/shape/bar.ts +41 -31
  97. package/src/ChartInternal/shape/bubble.ts +5 -5
  98. package/src/ChartInternal/shape/candlestick.ts +15 -13
  99. package/src/ChartInternal/shape/funnel.ts +317 -0
  100. package/src/ChartInternal/shape/gauge.ts +16 -9
  101. package/src/ChartInternal/shape/line.ts +62 -46
  102. package/src/ChartInternal/shape/point.common.ts +1 -4
  103. package/src/ChartInternal/shape/point.ts +54 -34
  104. package/src/ChartInternal/shape/polar.ts +4 -2
  105. package/src/ChartInternal/shape/radar.ts +40 -22
  106. package/src/ChartInternal/shape/shape.ts +84 -58
  107. package/src/ChartInternal/shape/treemap.ts +31 -20
  108. package/src/Plugin/bubblecompare/index.ts +1 -3
  109. package/src/Plugin/sparkline/index.ts +3 -4
  110. package/src/Plugin/stanford/ColorScale.ts +3 -2
  111. package/src/Plugin/stanford/Elements.ts +15 -6
  112. package/src/Plugin/stanford/Options.ts +5 -5
  113. package/src/Plugin/stanford/index.ts +13 -9
  114. package/src/Plugin/tableview/Options.ts +1 -1
  115. package/src/Plugin/tableview/const.ts +1 -4
  116. package/src/Plugin/tableview/index.ts +11 -9
  117. package/src/Plugin/textoverlap/index.ts +4 -6
  118. package/src/config/Options/Options.ts +3 -3
  119. package/src/config/Options/axis/axis.ts +36 -0
  120. package/src/config/Options/axis/x.ts +34 -14
  121. package/src/config/Options/axis/y.ts +13 -13
  122. package/src/config/Options/axis/y2.ts +23 -10
  123. package/src/config/Options/common/color.ts +4 -4
  124. package/src/config/Options/common/grid.ts +4 -4
  125. package/src/config/Options/common/legend.ts +12 -13
  126. package/src/config/Options/common/main.ts +23 -23
  127. package/src/config/Options/common/point.ts +17 -18
  128. package/src/config/Options/common/title.ts +2 -2
  129. package/src/config/Options/common/tooltip.ts +13 -11
  130. package/src/config/Options/data/axis.ts +2 -2
  131. package/src/config/Options/data/data.ts +48 -45
  132. package/src/config/Options/interaction/interaction.ts +1 -1
  133. package/src/config/Options/interaction/subchart.ts +2 -2
  134. package/src/config/Options/interaction/zoom.ts +9 -9
  135. package/src/config/Options/shape/arc.ts +10 -13
  136. package/src/config/Options/shape/area.ts +5 -7
  137. package/src/config/Options/shape/bar.ts +8 -10
  138. package/src/config/Options/shape/bubble.ts +1 -1
  139. package/src/config/Options/shape/candlestick.ts +2 -2
  140. package/src/config/Options/shape/donut.ts +4 -4
  141. package/src/config/Options/shape/funnel.ts +38 -0
  142. package/src/config/Options/shape/gauge.ts +6 -6
  143. package/src/config/Options/shape/line.ts +3 -3
  144. package/src/config/Options/shape/pie.ts +5 -5
  145. package/src/config/Options/shape/polar.ts +3 -3
  146. package/src/config/Options/shape/radar.ts +2 -2
  147. package/src/config/Options/shape/scatter.ts +1 -1
  148. package/src/config/Options/shape/treemap.ts +1 -1
  149. package/src/config/Store/Element.ts +8 -5
  150. package/src/config/Store/State.ts +20 -13
  151. package/src/config/classes.ts +14 -4
  152. package/src/config/config.ts +1 -1
  153. package/src/config/const.ts +2 -0
  154. package/src/config/resolver/axis.ts +4 -4
  155. package/src/config/resolver/interaction.ts +3 -7
  156. package/src/config/resolver/shape.ts +17 -12
  157. package/src/core.ts +2 -3
  158. package/src/index.esm.ts +3 -6
  159. package/src/index.ts +2 -2
  160. package/src/module/Cache.ts +2 -3
  161. package/src/module/browser.ts +15 -10
  162. package/src/module/error.ts +9 -8
  163. package/src/module/generator.ts +3 -5
  164. package/src/module/util.ts +62 -39
  165. package/src/module/worker.ts +14 -11
  166. package/src/scss/billboard.scss +18 -0
  167. package/src/scss/theme/dark.scss +17 -0
  168. package/src/scss/theme/datalab.scss +17 -0
  169. package/src/scss/theme/graph.scss +17 -0
  170. package/src/scss/theme/insight.scss +17 -0
  171. package/src/scss/theme/modern.scss +17 -0
  172. package/types/axis.d.ts +17 -0
  173. package/types/bb.d.ts +1 -0
  174. package/types/index.d.ts +1 -0
  175. package/types/options.d.ts +9 -0
  176. package/types/options.shape.d.ts +26 -1
  177. package/types/types.d.ts +1 -0
@@ -4,10 +4,7 @@
4
4
  */
5
5
  import type {d3Selection} from "billboard.js/types/types";
6
6
  import {Delaunay as d3Delaunay} from "d3-delaunay";
7
- import {
8
- polygonCentroid as d3PolygonCentroid,
9
- polygonArea as d3PolygonArea
10
- } from "d3-polygon";
7
+ import {polygonArea as d3PolygonArea, polygonCentroid as d3PolygonCentroid} from "d3-polygon";
11
8
  import {loadConfig} from "../../config/config";
12
9
  import Plugin from "../Plugin";
13
10
  import Options from "./Options";
@@ -46,7 +43,7 @@ import Options from "./Options";
46
43
  * ]
47
44
  * });
48
45
  * @example
49
- * import {bb} from "billboard.js";
46
+ * import {bb} from "billboard.js";
50
47
  * import TextOverlap from "billboard.js/dist/billboardjs-plugin-textoverlap";
51
48
  *
52
49
  * bb.generate({
@@ -124,7 +121,8 @@ export default class TextOverlap extends Plugin {
124
121
  const yTranslate = angle === -1 ? -extent : extent + 5;
125
122
 
126
123
  const txtAnchor = Math.abs(angle) === 1 ?
127
- "middle" : (angle === 0 ? "start" : "end");
124
+ "middle" :
125
+ (angle === 0 ? "start" : "end");
128
126
 
129
127
  this.style.display = polygonArea < area ? "none" : "";
130
128
  this.setAttribute("text-anchor", txtAnchor);
@@ -3,14 +3,14 @@
3
3
  * billboard.js project is licensed under the MIT license
4
4
  */
5
5
  // common
6
- import main from "./common/main";
7
6
  import boost from "./common/boost";
8
- import data from "./data/data";
9
7
  import color from "./common/color";
10
- import interaction from "./interaction/interaction";
11
8
  import legend from "./common/legend";
9
+ import main from "./common/main";
12
10
  import title from "./common/title";
13
11
  import tooltip from "./common/tooltip";
12
+ import data from "./data/data";
13
+ import interaction from "./interaction/interaction";
14
14
 
15
15
  import {deepClone} from "../../module/util";
16
16
 
@@ -22,6 +22,42 @@ export default {
22
22
  * }
23
23
  */
24
24
  axis_rotated: false,
25
+
26
+ /**
27
+ * Set axis tooltip.
28
+ * - **NOTE:**
29
+ * - When enabled, will disable default focus grid line.
30
+ * - For `timeseries` x Axis, tootlip will be formatted using x Axis' tick format.
31
+ * - For `category` x Axis, tootlip will be displaying scales' value text.
32
+ * @name axis․tooltip
33
+ * @memberof Options
34
+ * @type {boolean}
35
+ * @default false
36
+ * @property {object} axis Axis object
37
+ * @property {boolean} [axis.tooltip=false] Show tooltip or not.
38
+ * @property {string|object} [axis.tooltip.backgroundColor] Set axis tooltip text background colors.
39
+ * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.AxisTooltip)
40
+ * @example
41
+ * axis: {
42
+ * tooltip: true, // default background color is
43
+ *
44
+ * // set backgound color for axis tooltip texts
45
+ * tooltip: {
46
+ * backgroundColor: "red",
47
+ *
48
+ * // set differenct backround colors per axes
49
+ * // NOTE: In this case, only specified axes tooltip will appear.
50
+ * backgroundColor: {
51
+ * x: "green",
52
+ * y: "yellow",
53
+ * y2: "red"
54
+ * }
55
+ * }
56
+ * }
57
+ */
58
+ axis_tooltip: <boolean | {
59
+ backgroundColor?: string | {x?: string, y?: string, y2?: string}
60
+ }>false,
25
61
  ...x,
26
62
  ...y,
27
63
  ...y2
@@ -34,6 +34,28 @@ export default {
34
34
  */
35
35
  axis_x_show: true,
36
36
 
37
+ /**
38
+ * Force the x axis to interact as single rather than multiple x axes.
39
+ * - **NOTE:** The tooltip event will be triggered nearing each data points(for multiple xs) rather than x axis based(as single x does) in below condition:
40
+ * - for `bubble` & `scatter` type
41
+ * - when `data.xs` is set
42
+ * - when `tooltip.grouped=false` is set
43
+ * - `tooltip.grouped` options will take precedence over `axis.forceSingleX` option.
44
+ * @name axis․x․forceAsSingle
45
+ * @memberof Options
46
+ * @type {boolean}
47
+ * @default false
48
+ * @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.ForceAsSingle)
49
+ * @example
50
+ * axis: {
51
+ * x: {
52
+ * // will work as single x axis
53
+ * forceAsSingle: true
54
+ * }
55
+ * }
56
+ */
57
+ axis_x_forceAsSingle: false,
58
+
37
59
  /**
38
60
  * Set type of x axis.<br><br>
39
61
  * **Available Values:**
@@ -47,7 +69,6 @@ export default {
47
69
  * - the x values specified by [`data.x`](#.data%25E2%2580%25A4x)(or by any equivalent option), must be exclusively-positive.
48
70
  * - x axis min value should be >= 0.
49
71
  * - for 'category' type, `data.xs` option isn't supported.
50
- *
51
72
  * @name axis․x․type
52
73
  * @memberof Options
53
74
  * @type {string}
@@ -63,7 +84,7 @@ export default {
63
84
  * }
64
85
  * }
65
86
  */
66
- axis_x_type: <"category"|"indexed"|"log"|"timeseries"> "indexed",
87
+ axis_x_type: <"category" | "indexed" | "log" | "timeseries">"indexed",
67
88
 
68
89
  /**
69
90
  * Set how to treat the timezone of x values.<br>
@@ -95,7 +116,7 @@ export default {
95
116
  * }
96
117
  * }
97
118
  */
98
- axis_x_categories: <string[]> [],
119
+ axis_x_categories: <string[]>[],
99
120
 
100
121
  /**
101
122
  * centerize ticks on category axis.
@@ -141,7 +162,7 @@ export default {
141
162
  * }
142
163
  * }
143
164
  */
144
- axis_x_tick_format: <Function|string|undefined> undefined,
165
+ axis_x_tick_format: <Function | string | undefined>undefined,
145
166
 
146
167
  /**
147
168
  * Setting for culling ticks.
@@ -219,7 +240,7 @@ export default {
219
240
  * }
220
241
  * }
221
242
  */
222
- axis_x_tick_count: <number|undefined>undefined,
243
+ axis_x_tick_count: <number | undefined>undefined,
223
244
 
224
245
  /**
225
246
  * Show or hide x axis tick line.
@@ -283,7 +304,7 @@ export default {
283
304
  * }
284
305
  * }
285
306
  */
286
- axis_x_tick_text_inner: <{first?: boolean, last?: boolean}|boolean> false,
307
+ axis_x_tick_text_inner: <{first?: boolean, last?: boolean} | boolean>false,
287
308
 
288
309
  /**
289
310
  * Set the x Axis tick text's position relatively its original position
@@ -350,7 +371,7 @@ export default {
350
371
  * }
351
372
  * }
352
373
  */
353
- axis_x_tick_values: <(string|Date|number)[]|(()=> number[])|null> null,
374
+ axis_x_tick_values: <(string | Date | number)[] | (() => number[]) | null>null,
354
375
 
355
376
  /**
356
377
  * Rotate x axis tick text if there is not enough space for 'category' and 'timeseries' type axis.
@@ -449,7 +470,6 @@ export default {
449
470
  */
450
471
  axis_x_tick_multiline: true,
451
472
 
452
-
453
473
  /**
454
474
  * Set tick width
455
475
  * - **NOTE:**
@@ -467,7 +487,7 @@ export default {
467
487
  * }
468
488
  * }
469
489
  */
470
- axis_x_tick_width: <number|null> null,
490
+ axis_x_tick_width: <number | null>null,
471
491
 
472
492
  /**
473
493
  * Set to display system tooltip(via `<title>` element) for tick text
@@ -510,7 +530,7 @@ export default {
510
530
  * }
511
531
  * }
512
532
  */
513
- axis_x_max: <number|undefined> undefined,
533
+ axis_x_max: <number | undefined>undefined,
514
534
 
515
535
  /**
516
536
  * Set min value of x axis range.
@@ -535,7 +555,7 @@ export default {
535
555
  * }
536
556
  * }
537
557
  */
538
- axis_x_min: <number|undefined> undefined,
558
+ axis_x_min: <number | undefined>undefined,
539
559
 
540
560
  /**
541
561
  * Change the direction of x axis.<br><br>
@@ -596,7 +616,7 @@ export default {
596
616
  * }
597
617
  * }
598
618
  */
599
- axis_x_padding: <number|{left?: number; right?: number;}> {},
619
+ axis_x_padding: <number | {left?: number, right?: number}>{},
600
620
 
601
621
  /**
602
622
  * Set height of x axis.<br><br>
@@ -612,7 +632,7 @@ export default {
612
632
  * }
613
633
  * }
614
634
  */
615
- axis_x_height: <number|undefined> undefined,
635
+ axis_x_height: <number | undefined>undefined,
616
636
 
617
637
  /**
618
638
  * Set default extent for subchart and zoom. This can be an array or function that returns an array.
@@ -642,7 +662,7 @@ export default {
642
662
  * }
643
663
  * }
644
664
  */
645
- axis_x_extent: <(number|string)[]|Function|undefined> undefined,
665
+ axis_x_extent: <(number | string)[] | Function | undefined>undefined,
646
666
 
647
667
  /**
648
668
  * Set label on x axis.<br><br>
@@ -59,7 +59,7 @@ export default {
59
59
  * }
60
60
  * }
61
61
  */
62
- axis_y_type: <"indexed"|"log"|"timeseries"> "indexed",
62
+ axis_y_type: <"indexed" | "log" | "timeseries">"indexed",
63
63
 
64
64
  /**
65
65
  * Set max value of y axis.
@@ -75,7 +75,7 @@ export default {
75
75
  * }
76
76
  * }
77
77
  */
78
- axis_y_max: <number|undefined> undefined,
78
+ axis_y_max: <number | undefined>undefined,
79
79
 
80
80
  /**
81
81
  * Set min value of y axis.
@@ -92,7 +92,7 @@ export default {
92
92
  * }
93
93
  * }
94
94
  */
95
- axis_y_min: <number|undefined> undefined,
95
+ axis_y_min: <number | undefined>undefined,
96
96
 
97
97
  /**
98
98
  * Change the direction of y axis.<br><br>
@@ -124,7 +124,7 @@ export default {
124
124
  * }
125
125
  * }
126
126
  */
127
- axis_y_center: <number|undefined> undefined,
127
+ axis_y_center: <number | undefined>undefined,
128
128
 
129
129
  /**
130
130
  * Show y axis inside of the chart.
@@ -165,7 +165,7 @@ export default {
165
165
  * }
166
166
  * }
167
167
  */
168
- axis_y_label: <string|object> {},
168
+ axis_y_label: <string | object>{},
169
169
 
170
170
  /**
171
171
  * Set formatter for y axis tick text.<br><br>
@@ -185,7 +185,7 @@ export default {
185
185
  * }
186
186
  * }
187
187
  */
188
- axis_y_tick_format: <Function|undefined> undefined,
188
+ axis_y_tick_format: <Function | undefined>undefined,
189
189
 
190
190
  /**
191
191
  * Setting for culling ticks.
@@ -283,7 +283,7 @@ export default {
283
283
  * }
284
284
  * }
285
285
  */
286
- axis_y_tick_values: <number[]|(()=> number[])|null> null,
286
+ axis_y_tick_values: <number[] | (() => number[]) | null>null,
287
287
 
288
288
  /**
289
289
  * Rotate y axis tick text.
@@ -320,7 +320,7 @@ export default {
320
320
  * }
321
321
  * }
322
322
  */
323
- axis_y_tick_count: <number|undefined> undefined,
323
+ axis_y_tick_count: <number | undefined>undefined,
324
324
 
325
325
  /**
326
326
  * Show or hide y axis tick line.
@@ -358,7 +358,7 @@ export default {
358
358
  * }
359
359
  * }
360
360
  */
361
- axis_y_tick_stepSize: <number|null> null,
361
+ axis_y_tick_stepSize: <number | null>null,
362
362
 
363
363
  /**
364
364
  * Show or hide y axis tick text.
@@ -425,7 +425,7 @@ export default {
425
425
  * }
426
426
  */
427
427
  // @TODO: not fully implemented yet
428
- axis_y_tick_time_value: <Function|undefined> undefined,
428
+ axis_y_tick_time_value: <Function | undefined>undefined,
429
429
 
430
430
  /**
431
431
  * Set padding for y axis.<br><br>
@@ -452,7 +452,7 @@ export default {
452
452
  * }
453
453
  * }
454
454
  */
455
- axis_y_padding: <number|{top?: number; bottom?: number;}> {},
455
+ axis_y_padding: <number | {top?: number, bottom?: number}>{},
456
456
 
457
457
  /**
458
458
  * Set default range of y axis.<br><br>
@@ -468,7 +468,7 @@ export default {
468
468
  * }
469
469
  * }
470
470
  */
471
- axis_y_default: <number[]|undefined> undefined,
471
+ axis_y_default: <number[] | undefined>undefined,
472
472
 
473
473
  /**
474
474
  * Set additional axes for y Axis.
@@ -507,5 +507,5 @@ export default {
507
507
  * ]
508
508
  * }
509
509
  */
510
- axis_y_axes: <object[]> []
510
+ axis_y_axes: <object[]>[]
511
511
  };
@@ -6,6 +6,19 @@
6
6
  * y2 Axis config options
7
7
  */
8
8
  export default {
9
+ /**
10
+ * Set clip-path attribute for y2 axis element
11
+ * - **NOTE**: `clip-path` attribute for y2 Axis is set only when `axis.y2.inner` option is true.
12
+ * @name axis․y2․clipPath
13
+ * @memberof Options
14
+ * @type {boolean}
15
+ * @default true
16
+ * @example
17
+ * // don't set 'clip-path' attribute
18
+ * clipPath: false
19
+ */
20
+ axis_y2_clipPath: true,
21
+
9
22
  /**
10
23
  * Show or hide y2 axis.
11
24
  * - **NOTE**:
@@ -49,7 +62,7 @@ export default {
49
62
  * }
50
63
  * }
51
64
  */
52
- axis_y2_type: <"indexed"|"log"|"timeseries"> "indexed",
65
+ axis_y2_type: <"indexed" | "log" | "timeseries">"indexed",
53
66
 
54
67
  /**
55
68
  * Set max value of y2 axis.
@@ -64,7 +77,7 @@ export default {
64
77
  * }
65
78
  * }
66
79
  */
67
- axis_y2_max: <number|undefined> undefined,
80
+ axis_y2_max: <number | undefined>undefined,
68
81
 
69
82
  /**
70
83
  * Set min value of y2 axis.
@@ -79,7 +92,7 @@ export default {
79
92
  * }
80
93
  * }
81
94
  */
82
- axis_y2_min: <number|undefined> undefined,
95
+ axis_y2_min: <number | undefined>undefined,
83
96
 
84
97
  /**
85
98
  * Change the direction of y2 axis.<br><br>
@@ -111,7 +124,7 @@ export default {
111
124
  * }
112
125
  * }
113
126
  */
114
- axis_y2_center: <number|undefined> undefined,
127
+ axis_y2_center: <number | undefined>undefined,
115
128
 
116
129
  /**
117
130
  * Show y2 axis inside of the chart.
@@ -152,7 +165,7 @@ export default {
152
165
  * }
153
166
  * }
154
167
  */
155
- axis_y2_label: <string|object> {},
168
+ axis_y2_label: <string | object>{},
156
169
 
157
170
  /**
158
171
  * Set formatter for y2 axis tick text.<br><br>
@@ -171,7 +184,7 @@ export default {
171
184
  * }
172
185
  * }
173
186
  */
174
- axis_y2_tick_format: <Function|undefined> undefined,
187
+ axis_y2_tick_format: <Function | undefined>undefined,
175
188
 
176
189
  /**
177
190
  * Setting for culling ticks.
@@ -269,7 +282,7 @@ export default {
269
282
  * }
270
283
  * }
271
284
  */
272
- axis_y2_tick_values: <number[]|(()=> number[])|null> null,
285
+ axis_y2_tick_values: <number[] | (() => number[]) | null>null,
273
286
 
274
287
  /**
275
288
  * Rotate y2 axis tick text.
@@ -306,7 +319,7 @@ export default {
306
319
  * }
307
320
  * }
308
321
  */
309
- axis_y2_tick_count: <number|undefined> undefined,
322
+ axis_y2_tick_count: <number | undefined>undefined,
310
323
 
311
324
  /**
312
325
  * Show or hide y2 axis tick line.
@@ -344,7 +357,7 @@ export default {
344
357
  * }
345
358
  * }
346
359
  */
347
- axis_y2_tick_stepSize: <number|null> null,
360
+ axis_y2_tick_stepSize: <number | null>null,
348
361
 
349
362
  /**
350
363
  * Show or hide y2 axis tick text.
@@ -412,7 +425,7 @@ export default {
412
425
  * padding: 10
413
426
  * }
414
427
  */
415
- axis_y2_padding: <number|{top?: number; bottom?: number;}> {},
428
+ axis_y2_padding: <number | {top?: number, bottom?: number}>{},
416
429
 
417
430
  /**
418
431
  * Set default range of y2 axis.<br><br>
@@ -80,8 +80,8 @@ export default {
80
80
  * }
81
81
  * }
82
82
  */
83
- color_pattern: <(string|null)[]> [],
84
- color_tiles: <(() => [])|undefined> undefined,
85
- color_threshold: <{unit?: string; values?: number[]; max: number;}> {},
86
- color_onover: <string|object|undefined> undefined
83
+ color_pattern: <(string | null)[]>[],
84
+ color_tiles: <(() => []) | undefined>undefined,
85
+ color_threshold: <{unit?: string, values?: number[], max: number}>{},
86
+ color_onover: <string | object | undefined>undefined
87
87
  };
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * grid config options
7
7
  */
8
- type Lines = {value?: number; text?: string; class?: string; position?: string}[];
8
+ type Lines = {value?: number, text?: string, class?: string, position?: string}[];
9
9
 
10
10
  export default {
11
11
  /**
@@ -68,10 +68,10 @@ export default {
68
68
  */
69
69
  grid_x_show: false,
70
70
  grid_x_type: "tick",
71
- grid_x_lines: <Lines> [],
71
+ grid_x_lines: <Lines>[],
72
72
  grid_y_show: false,
73
- grid_y_lines: <Lines> [],
74
- grid_y_ticks: <number|undefined> undefined,
73
+ grid_y_lines: <Lines>[],
74
+ grid_y_ticks: <number | undefined>undefined,
75
75
  grid_focus_edge: false,
76
76
  grid_focus_show: true,
77
77
  grid_focus_y: false,
@@ -147,28 +147,27 @@ export default {
147
147
  * usePoint: true
148
148
  * }
149
149
  */
150
- legend_contents_bindto: <string|HTMLElement|undefined> undefined,
151
- legend_contents_template: <string|(() => string)|undefined> "<span style='color:#fff;padding:5px;background-color:{=COLOR}'>{=TITLE}</span>",
150
+ legend_contents_bindto: <string | HTMLElement | undefined>undefined,
151
+ legend_contents_template: <string | (() => string)
152
+ | undefined>"<span style='color:#fff;padding:5px;background-color:{=COLOR}'>{=TITLE}</span>",
152
153
  legend_equally: false,
153
154
  legend_hide: false,
154
- legend_inset_anchor: <"top-left"|"top-right"|"bottom-left"|"bottom-right"> "top-left",
155
+ legend_inset_anchor: <"top-left" | "top-right" | "bottom-left" | "bottom-right">"top-left",
155
156
  legend_inset_x: 10,
156
157
  legend_inset_y: 0,
157
- legend_inset_step: <number|undefined> undefined,
158
- legend_item_interaction: <boolean|{
159
- dblclick?: boolean;
160
- }> true,
158
+ legend_inset_step: <number | undefined>undefined,
159
+ legend_item_interaction: <boolean | {dblclick?: boolean}>true,
161
160
  legend_item_dblclick: false,
162
- legend_item_onclick: <Function|undefined> undefined,
163
- legend_item_onover: <Function|undefined> undefined,
164
- legend_item_onout: <Function|undefined> undefined,
161
+ legend_item_onclick: <Function | undefined>undefined,
162
+ legend_item_onover: <Function | undefined>undefined,
163
+ legend_item_onout: <Function | undefined>undefined,
165
164
  legend_item_tile_width: 10,
166
165
  legend_item_tile_height: 10,
167
166
  legend_item_tile_r: 5,
168
- legend_item_tile_type: <"rectangle"|"circle"> "rectangle",
169
- legend_format: <Function|undefined> undefined,
167
+ legend_item_tile_type: <"rectangle" | "circle">"rectangle",
168
+ legend_format: <Function | undefined>undefined,
170
169
  legend_padding: 0,
171
- legend_position: <"bottom"|"right"|"inset"> "bottom",
170
+ legend_position: <"bottom" | "right" | "inset">"bottom",
172
171
  legend_show: true,
173
172
  legend_tooltip: false,
174
173
  legend_usePoint: false