billboard.js 3.5.1 → 3.6.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 (58) hide show
  1. package/README.md +11 -1
  2. package/dist/billboard.css +1 -1
  3. package/dist/billboard.js +87 -35
  4. package/dist/billboard.min.css +1 -1
  5. package/dist/billboard.min.js +2 -2
  6. package/dist/billboard.pkgd.js +2343 -2107
  7. package/dist/billboard.pkgd.min.js +3 -3
  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 +7 -3
  11. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  12. package/dist/plugin/billboardjs-plugin-stanford.js +7 -3
  13. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  14. package/dist/plugin/billboardjs-plugin-tableview.js +7 -3
  15. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  16. package/dist/plugin/billboardjs-plugin-textoverlap.js +7 -3
  17. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  18. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +2258 -2074
  19. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +2264 -2076
  20. package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +2265 -2077
  21. package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +2266 -2078
  22. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +2267 -2079
  23. package/dist/theme/datalab.css +1 -1
  24. package/dist/theme/datalab.min.css +1 -1
  25. package/dist/theme/graph.css +1 -1
  26. package/dist/theme/graph.min.css +1 -1
  27. package/dist/theme/insight.css +1 -1
  28. package/dist/theme/insight.min.css +1 -1
  29. package/dist-esm/billboard.js +90 -35
  30. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  31. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +6 -2
  32. package/dist-esm/plugin/billboardjs-plugin-stanford.js +6 -2
  33. package/dist-esm/plugin/billboardjs-plugin-tableview.js +6 -2
  34. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +6 -2
  35. package/package.json +32 -30
  36. package/src/Chart/api/chart.ts +11 -3
  37. package/src/Chart/api/group.ts +1 -1
  38. package/src/ChartInternal/Axis/AxisRenderer.ts +2 -2
  39. package/src/ChartInternal/ChartInternal.ts +5 -4
  40. package/src/ChartInternal/data/convert.ts +1 -1
  41. package/src/ChartInternal/internals/color.ts +4 -1
  42. package/src/ChartInternal/internals/grid.ts +0 -1
  43. package/src/ChartInternal/internals/legend.ts +3 -2
  44. package/src/ChartInternal/shape/arc.ts +1 -1
  45. package/src/ChartInternal/shape/bar.ts +2 -1
  46. package/src/ChartInternal/shape/candlestick.ts +4 -3
  47. package/src/ChartInternal/shape/line.ts +5 -1
  48. package/src/ChartInternal/shape/shape.ts +36 -15
  49. package/src/config/Options/common/grid.ts +2 -2
  50. package/src/config/Options/common/legend.ts +3 -2
  51. package/src/config/Options/data/data.ts +18 -0
  52. package/src/config/Options/shape/bar.ts +6 -0
  53. package/src/config/Store/State.ts +1 -0
  54. package/src/config/config.ts +7 -1
  55. package/types/axis.d.ts +17 -2
  56. package/types/chart.d.ts +3 -1
  57. package/types/index.d.ts +1 -0
  58. package/types/options.d.ts +14 -0
package/types/axis.d.ts CHANGED
@@ -180,6 +180,21 @@ export interface yAxisConfiguration extends yAxisConfigurationBase {
180
180
  * Set clip-path attribute for y axis element.
181
181
  */
182
182
  clipPath?: boolean;
183
+
184
+ /**
185
+ * Set type of y axis.<br><br>
186
+ * **Available Values:**
187
+ * - indexed
188
+ * - log
189
+ * - timeseries
190
+ *
191
+ * **NOTE:**
192
+ * - **log** type:
193
+ * - the bound data values must be exclusively-positive.
194
+ * - y axis min value should be >= 0.
195
+ * - `data.groups`(stacked data) option aren't supported.
196
+ */
197
+ type?: "indexed" | "log" | "timeseries";
183
198
  }
184
199
 
185
200
  export interface XTickConfiguration {
@@ -305,7 +320,7 @@ export interface XTickConfiguration {
305
320
  * - axis min value should be >= 0.
306
321
  * - `data.groups`(stacked data) option aren't supported.
307
322
  */
308
- type?: "indexed" | "log" | "timeseries";
323
+ type?: "category" | "indexed" | "log" | "timeseries";
309
324
  }
310
325
 
311
326
  export interface YTickConfiguration {
@@ -337,7 +352,7 @@ export interface YTickConfiguration {
337
352
  * Set formatter for y axis tick text.
338
353
  * This option accepts d3.format object as well as a function you define.
339
354
  */
340
- format?(this: Chart, x: number | Date): string | number;
355
+ format?: ((this: Chart, x: number) => string | number) | ((this: Chart, x: Date) => string | number);
341
356
 
342
357
  /**
343
358
  * Setting for culling ticks.
package/types/chart.d.ts CHANGED
@@ -515,11 +515,13 @@ export interface Chart {
515
515
 
516
516
  /**
517
517
  * Get or set single config option value.
518
+ * - **NOTE:**
519
+ * - without parameter, will return all specified generation options object only. (will exclude any other options not specified at the initialization)
518
520
  * @param optionName The option key name.
519
521
  * @param value The value accepted for indicated option.
520
522
  * @param redraw Set to redraw with the new option changes. (NOTE: Doesn't guarantee work in all circumstances. It can be applied for limited options only)
521
523
  */
522
- config(optionName: string, value?: any, redraw?: boolean): any;
524
+ config(optionName?: string, value?: any, redraw?: boolean): any;
523
525
  }
524
526
 
525
527
  export interface GridOperations {
package/types/index.d.ts CHANGED
@@ -22,6 +22,7 @@ export {
22
22
  gauge,
23
23
  line,
24
24
  pie,
25
+ polar,
25
26
  radar,
26
27
  scatter,
27
28
  spline,
@@ -321,6 +321,11 @@ export interface ChartOptions {
321
321
  removeNull?: boolean;
322
322
  }
323
323
 
324
+ /**
325
+ * Bars will be rendered at same position, which will be overlapped each other. (for non-grouped bars only)
326
+ */
327
+ orverlap?: boolean;
328
+
324
329
  /**
325
330
  * The padding pixel value between each bar.
326
331
  */
@@ -1564,6 +1569,15 @@ export interface Data {
1564
1569
  */
1565
1570
  groups?: string[][];
1566
1571
 
1572
+ /**
1573
+ * Set how zero value will be treated on groups.<br>
1574
+ * Possible values:
1575
+ * - `zero`: 0 will be positioned at absolute axis zero point.
1576
+ * - `positive`: 0 will be positioned at the top of a stack.
1577
+ * - `negative`: 0 will be positioned at the bottom of a stack.
1578
+ */
1579
+ groupsZeroAs?: "positive" | "negative" | "zero";
1580
+
1567
1581
  /**
1568
1582
  * Set y axis the data related to. y and y2 can be used.
1569
1583
  * - **NOTE:** If all data is related to one of the axes, the domain of axis without related data will be replaced by the domain from the axis with related data