billboard.js 3.3.1 → 3.4.0-next.1

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 (64) hide show
  1. package/dist/billboard.css +19 -14
  2. package/dist/billboard.js +397 -74
  3. package/dist/billboard.min.css +2 -2
  4. package/dist/billboard.min.js +2 -2
  5. package/dist/billboard.pkgd.js +865 -414
  6. package/dist/billboard.pkgd.min.js +2 -2
  7. package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  9. package/dist/plugin/billboardjs-plugin-sparkline.js +46 -16
  10. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  11. package/dist/plugin/billboardjs-plugin-stanford.js +46 -16
  12. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-tableview.js +41 -13
  14. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  15. package/dist/plugin/billboardjs-plugin-textoverlap.js +41 -13
  16. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  17. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +470 -342
  18. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +515 -357
  19. package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +516 -358
  20. package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +512 -356
  21. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +513 -357
  22. package/dist/theme/datalab.css +24 -20
  23. package/dist/theme/datalab.min.css +2 -2
  24. package/dist/theme/graph.css +24 -20
  25. package/dist/theme/graph.min.css +2 -2
  26. package/dist/theme/insight.css +24 -20
  27. package/dist/theme/insight.min.css +2 -2
  28. package/dist-esm/billboard.js +356 -72
  29. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  30. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +3 -5
  31. package/dist-esm/plugin/billboardjs-plugin-stanford.js +3 -5
  32. package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
  33. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
  34. package/package.json +30 -30
  35. package/src/Chart/api/chart.ts +1 -1
  36. package/src/Chart/api/focus.ts +3 -2
  37. package/src/Chart/api/subchart.ts +8 -8
  38. package/src/ChartInternal/Axis/Axis.ts +10 -7
  39. package/src/ChartInternal/ChartInternal.ts +25 -14
  40. package/src/ChartInternal/data/data.ts +1 -1
  41. package/src/ChartInternal/internals/color.ts +4 -3
  42. package/src/ChartInternal/internals/format.ts +13 -4
  43. package/src/ChartInternal/internals/redraw.ts +6 -2
  44. package/src/ChartInternal/internals/text.ts +1 -1
  45. package/src/ChartInternal/internals/transform.ts +4 -1
  46. package/src/ChartInternal/internals/type.ts +5 -0
  47. package/src/ChartInternal/shape/arc.ts +41 -17
  48. package/src/ChartInternal/shape/polar.ts +132 -0
  49. package/src/ChartInternal/shape/radar.ts +4 -4
  50. package/src/config/Options/common/tooltip.ts +10 -1
  51. package/src/config/Options/data/data.ts +3 -0
  52. package/src/config/Options/shape/polar.ts +81 -0
  53. package/src/config/classes.ts +6 -3
  54. package/src/config/const.ts +3 -0
  55. package/src/config/resolver/shape.ts +4 -0
  56. package/src/core.ts +1 -0
  57. package/src/index.esm.ts +1 -0
  58. package/src/module/util.ts +30 -10
  59. package/src/scss/billboard.scss +13 -0
  60. package/src/scss/theme/datalab.scss +13 -0
  61. package/src/scss/theme/graph.scss +13 -0
  62. package/src/scss/theme/insight.scss +13 -0
  63. package/types/bb.d.ts +1 -0
  64. package/types/options.d.ts +72 -0
@@ -312,6 +312,19 @@ text.bb-chart-arcs-gauge-title {
312
312
  fill: #eaeaea;
313
313
  stroke-width: 0;
314
314
  }
315
+
316
+ /*-- Polar --*/
317
+ .bb-levels {
318
+ circle {
319
+ fill: none;
320
+ stroke: #848282;
321
+ stroke-width: .5px;
322
+ }
323
+
324
+ text {
325
+ fill: #848282;
326
+ }
327
+ }
315
328
  }
316
329
 
317
330
  .bb-chart-arc {
package/types/bb.d.ts CHANGED
@@ -45,6 +45,7 @@ export function donut(): "donut";
45
45
  export function gauge(): "gauge";
46
46
  export function line(): "line";
47
47
  export function pie(): "pie";
48
+ export function polar(): "polar";
48
49
  export function radar(): "radar";
49
50
  export function scatter(): "scatter";
50
51
  export function spline(): "spline";
@@ -461,6 +461,78 @@ export interface ChartOptions {
461
461
  }
462
462
  };
463
463
 
464
+ polar?: {
465
+ label?: {
466
+ /**
467
+ * Show or hide label on each polar piece.
468
+ */
469
+ show?: boolean;
470
+
471
+ /**
472
+ * Set threshold ratio to show/hide labels.
473
+ */
474
+ threshold?: number;
475
+
476
+ /**
477
+ * Set formatter for the label on each polar piece.
478
+ */
479
+ format?(this: Chart, value: number, ratio: number, id: string): string;
480
+
481
+ /**
482
+ * Set ratio of labels position.
483
+ */
484
+ ratio?: ((this: Chart, d: DataItem, radius: number, h: number) => void) | number
485
+ };
486
+ level?: {
487
+ /**
488
+ * Set the level depth.
489
+ */
490
+ depth?: number;
491
+
492
+ /**
493
+ * Set level max value.
494
+ */
495
+ max?: number;
496
+
497
+ /**
498
+ * Show or hide level.
499
+ */
500
+ show?: boolean;
501
+
502
+ text?: {
503
+ /**
504
+ * Set label text's background color.
505
+ */
506
+ backgroundColor?: string;
507
+
508
+ /**
509
+ * Set format function for the level value.
510
+ */
511
+ format?: (this: Chart, x: string) => string;
512
+
513
+ /**
514
+ * Show or hide level text.
515
+ */
516
+ show?: boolean;
517
+ }
518
+ };
519
+
520
+ /**
521
+ * Set padding between data.
522
+ */
523
+ padAngle?: number;
524
+
525
+ /**
526
+ * Sets the gap between pie arcs.
527
+ */
528
+ padding?: number;
529
+
530
+ /**
531
+ * Set starting angle where data draws.
532
+ */
533
+ startAngle?: number;
534
+ };
535
+
464
536
  pie?: {
465
537
  label?: {
466
538
  /**