billboard.js 3.10.3 → 3.11.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 (82) hide show
  1. package/README.md +0 -1
  2. package/dist/billboard.css +5 -4
  3. package/dist/billboard.js +598 -220
  4. package/dist/billboard.min.css +2 -2
  5. package/dist/billboard.min.js +2 -2
  6. package/dist/billboard.pkgd.js +2828 -2456
  7. package/dist/billboard.pkgd.min.js +2 -4
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  9. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  10. package/dist/plugin/billboardjs-plugin-sparkline.js +31 -15
  11. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  12. package/dist/plugin/billboardjs-plugin-stanford.js +31 -15
  13. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  14. package/dist/plugin/billboardjs-plugin-tableview.js +30 -15
  15. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  16. package/dist/plugin/billboardjs-plugin-textoverlap.js +30 -15
  17. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  18. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +2222 -2214
  19. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +2 -2
  20. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +2252 -2228
  21. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +2 -2
  22. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +2253 -2229
  23. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +2 -2
  24. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +2253 -2230
  25. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +2 -2
  26. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +2259 -2238
  27. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +2 -2
  28. package/dist/theme/dark.css +7 -7
  29. package/dist/theme/dark.min.css +2 -2
  30. package/dist/theme/datalab.css +7 -7
  31. package/dist/theme/datalab.min.css +2 -2
  32. package/dist/theme/graph.css +7 -7
  33. package/dist/theme/graph.min.css +2 -2
  34. package/dist/theme/insight.css +7 -7
  35. package/dist/theme/insight.min.css +2 -2
  36. package/dist/theme/modern.css +7 -7
  37. package/dist/theme/modern.min.css +2 -2
  38. package/dist-esm/billboard.js +517 -180
  39. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  40. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +4 -4
  41. package/dist-esm/plugin/billboardjs-plugin-stanford.js +7 -9
  42. package/dist-esm/plugin/billboardjs-plugin-tableview.js +3 -4
  43. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +3 -4
  44. package/package.json +42 -46
  45. package/src/Chart/api/zoom.ts +5 -20
  46. package/src/ChartInternal/Axis/Axis.ts +5 -3
  47. package/src/ChartInternal/Axis/AxisRenderer.ts +14 -0
  48. package/src/ChartInternal/ChartInternal.ts +1 -1
  49. package/src/ChartInternal/data/data.ts +12 -5
  50. package/src/ChartInternal/data/load.ts +37 -1
  51. package/src/ChartInternal/interactions/eventrect.ts +11 -4
  52. package/src/ChartInternal/interactions/interaction.ts +2 -1
  53. package/src/ChartInternal/interactions/zoom.ts +28 -0
  54. package/src/ChartInternal/internals/domain.ts +24 -1
  55. package/src/ChartInternal/internals/legend.ts +28 -2
  56. package/src/ChartInternal/internals/scale.ts +3 -3
  57. package/src/ChartInternal/internals/size.axis.ts +8 -3
  58. package/src/ChartInternal/internals/size.ts +14 -1
  59. package/src/ChartInternal/internals/tooltip.ts +12 -6
  60. package/src/ChartInternal/internals/transform.ts +6 -2
  61. package/src/ChartInternal/internals/type.ts +1 -1
  62. package/src/ChartInternal/shape/arc.ts +110 -34
  63. package/src/ChartInternal/shape/gauge.ts +8 -4
  64. package/src/ChartInternal/shape/radar.ts +58 -45
  65. package/src/config/Options/axis/x.ts +27 -1
  66. package/src/config/Options/axis/y2.ts +13 -0
  67. package/src/config/Options/common/legend.ts +17 -0
  68. package/src/config/Options/common/tooltip.ts +1 -0
  69. package/src/config/Options/shape/arc.ts +40 -3
  70. package/src/config/Options/shape/gauge.ts +23 -2
  71. package/src/config/Options/shape/pie.ts +2 -2
  72. package/src/config/classes.ts +1 -0
  73. package/src/module/Cache.ts +1 -0
  74. package/src/module/util.ts +16 -2
  75. package/src/scss/billboard.scss +2 -1
  76. package/src/scss/theme/dark.scss +2 -1
  77. package/src/scss/theme/datalab.scss +2 -1
  78. package/src/scss/theme/graph.scss +2 -1
  79. package/src/scss/theme/insight.scss +2 -1
  80. package/src/scss/theme/modern.scss +2 -1
  81. package/types/options.d.ts +28 -4
  82. package/types/options.shape.d.ts +44 -0
@@ -86,6 +86,38 @@ export interface ArcOptions {
86
86
  len?: number;
87
87
  }
88
88
  };
89
+
90
+ /**
91
+ * Set range text options.
92
+ */
93
+ rangeText?: {
94
+ /**
95
+ * Set range text values to be shown around Arc.
96
+ * - When `unit: 'absolute'`: Given values are treated as absolute values.
97
+ * - When `unit: '%'`: Given values are treated as percentages.
98
+ */
99
+ values?: number[];
100
+
101
+ /**
102
+ * Specify the range text unit.
103
+ */
104
+ unit?: "absolute" | "%";
105
+
106
+ /**
107
+ * Set if range text shown will be fixed w/o data toggle update. Only available for gauge chart.
108
+ */
109
+ fixed?: boolean;
110
+
111
+ /**
112
+ * Set format function for the range text.
113
+ */
114
+ format?: (v: number) => number;
115
+
116
+ /**
117
+ * Set position function or object for the range text.
118
+ */
119
+ position?: ((v: number) => {x?: number; y?: number})|{x?: number, y?: number};
120
+ }
89
121
  }
90
122
 
91
123
  export interface AreaOptions {
@@ -341,6 +373,11 @@ export interface GaugeOptions {
341
373
  */
342
374
  extents?(this: Chart, value: number, isMax: boolean): string | number;
343
375
 
376
+ /**
377
+ * Set ratio of labels position.
378
+ */
379
+ ratio?: ((this: Chart, d: DataItem, radius: number, h: number) => void) | number
380
+
344
381
  /**
345
382
  * Set threshold ratio to show/hide labels.
346
383
  */
@@ -367,6 +404,13 @@ export interface GaugeOptions {
367
404
  */
368
405
  type?: GaugeTypes;
369
406
 
407
+ /**
408
+ * Enforce to given min/max value.
409
+ * - When `gauge.min=50` and given value is `30`, gauge will render as empty value.
410
+ * - When `gauge.max=100` and given value is `120`, gauge will render till 100, not surpassing max value.
411
+ */
412
+ enforceMinMax?: boolean;
413
+
370
414
  /**
371
415
  * Set min value of the gauge.
372
416
  */