billboard.js 3.7.4 → 3.7.5

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 (40) hide show
  1. package/dist/billboard.css +1 -1
  2. package/dist/billboard.js +57 -40
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +2 -2
  5. package/dist/billboard.pkgd.js +1751 -1327
  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 +4 -3
  10. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  11. package/dist/plugin/billboardjs-plugin-stanford.js +4 -3
  12. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-tableview.js +4 -3
  14. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  15. package/dist/plugin/billboardjs-plugin-textoverlap.js +4 -3
  16. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  17. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +1696 -1289
  18. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +1699 -1291
  19. package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +1700 -1292
  20. package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +1701 -1293
  21. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +1702 -1294
  22. package/dist/theme/datalab.css +1 -1
  23. package/dist/theme/datalab.min.css +1 -1
  24. package/dist/theme/graph.css +1 -1
  25. package/dist/theme/graph.min.css +1 -1
  26. package/dist/theme/insight.css +1 -1
  27. package/dist/theme/insight.min.css +1 -1
  28. package/dist-esm/billboard.js +25 -12
  29. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  30. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -2
  31. package/dist-esm/plugin/billboardjs-plugin-stanford.js +2 -2
  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 +19 -19
  35. package/src/ChartInternal/data/IData.ts +1 -1
  36. package/src/ChartInternal/data/data.ts +3 -4
  37. package/src/ChartInternal/interactions/eventrect.ts +4 -0
  38. package/src/ChartInternal/shape/bar.ts +2 -3
  39. package/src/config/Options/data/axis.ts +10 -1
  40. package/src/module/util.ts +5 -2
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.7.4
8
+ * @version 3.7.5
9
9
  */
10
10
  /*-- Datalab Theme --*/
11
11
  /*-- Default color pattern --*/
@@ -5,5 +5,5 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.7.4
8
+ * @version 3.7.5
9
9
  */.bb-color-pattern{background-image:url(#2ac4b3;#feaf29;#ff617b;#73a2ef;#b180d0;#3064cf;#d0a45f;#8aaec7;#ef65a2;#8aaec7;)}.bb svg{font-family:Sans Pro,Arial,sans-serif,nanumgothic,Dotum;font-size:11px;line-height:1}.bb line,.bb path{fill:none;stroke:#000}.bb .bb-button,.bb text{-webkit-font-smoothing:antialiased;fill:#555;font-size:11px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bb-axis{stroke-width:.7px}.bb-axis-y text,.bb-axis-y2 text{fill:#737373}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:rgba(39,201,3,.05)}.tick._active_ text{fill:#00c83c!important}.bb-grid{pointer-events:none}.bb-grid line{stroke:#f1f1f1}.bb-xgrid-focus line,.bb-ygrid-focus line{stroke:#ddd}.bb-text.bb-empty{fill:#767676}.bb-line{stroke-width:.7px}.bb-circle{fill:#fff!important}.bb-circle._expanded_{stroke-width:2px}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:1px}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.3!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4;fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-brush .extent,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{user-select:none}.bb-legend-item line.bb-legend-item-tile{stroke-linecap:round;stroke-width:8px;stroke-dasharray:1 20;transform:translate(7px,1px)}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1;opacity:.75}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#000;stroke-width:1px}.bb-tooltip-container{font-family:Sans Pro,Arial,sans-serif,nanumgothic,Dotum;user-select:none;z-index:10}.bb-tooltip{-webkit-font-smoothing:antialiased;background-color:#fff;border:1px solid #999;border-collapse:separate;border-radius:2px;border-spacing:0;empty-cells:show;font-size:11px;text-align:left}.bb-tooltip th{background-color:#0b00b1;border-bottom:2px solid #ff2d2d;color:#fffdfd;font-size:13px;padding:2px 8px;text-align:left}.bb-tooltip td{padding:4px 6px}.bb-tooltip td:first-child{padding-left:8px}.bb-tooltip td:last-child{padding-right:8px}.bb-tooltip td>span,.bb-tooltip td>svg{border:1px solid #000;border-radius:3px;display:inline-block;height:8px;margin-right:6px;vertical-align:middle;width:8px}.bb-tooltip td.value{border-left:1px solid transparent;text-align:right}.bb-tooltip .bb-tooltip-title{color:#aaa;display:inline-block;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:0}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{color:#444;font-size:11px;font-weight:400;line-height:13px;padding:4px 0 3px;text-align:left}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-size:11px;font-weight:800;padding-left:5px}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:none}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:18px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{fill:#000;font-size:18px!important;font-weight:600}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-arc .bb-gauge-value{fill:#3b6969}.bb-chart-arc path{stroke:#000;stroke-width:.5px}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:14px}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:.7px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;cursor:pointer;padding:5px}
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.7.4
8
+ * @version 3.7.5
9
9
  */
10
10
  /*-- Graph Theme --*/
11
11
  /*-- Default color pattern --*/
@@ -5,5 +5,5 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.7.4
8
+ * @version 3.7.5
9
9
  */.bb-color-pattern{background-image:url(#65CFC2;#D0A45F;#64A4F5;#EF65A2;#A377FE;#8AAEC7;#FF7E5A;#898EFE;#FFAC35;#70B0FF;)}.bb svg{font-family:Helvetica,Apple SD Gothic Neo,Arial,sans-serif,nanumgothic,Dotum;font-size:12px;line-height:1}.bb line,.bb path{fill:none;stroke:#8c8c8c}.bb .bb-button,.bb text{fill:#555;font-size:12px;letter-spacing:-.3px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bb-axis,.bb-bars path,.bb-event-rect,.bb-legend-item-title,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-axis-y text,.bb-axis-y2 text{fill:#8c8c8c}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:rgba(39,201,3,.05)}.tick._active_ text{fill:#00c83c!important}.bb-grid{pointer-events:none}.bb-grid line{stroke:#f1f1f1}.bb-xgrid-focus line,.bb-ygrid-focus line{stroke:#ffb6b6;stroke-dasharray:3px}.bb-text.bb-empty{fill:#767676}.bb-line{stroke-width:1px}.bb-circle._expanded_,rect.bb-circle._expanded_,use.bb-circle._expanded_{stroke-width:2px}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.3!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4;fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-brush .extent,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1px;opacity:.75}.bb-legend-item line{stroke-dasharray:1px}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{font-family:Helvetica,Apple SD Gothic Neo,Arial,sans-serif,nanumgothic,Dotum;user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border:1px solid #999;border-collapse:separate;border-radius:2px;border-spacing:0;box-shadow:.5px .5px 1px #999;empty-cells:show;font-size:12px;text-align:left;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bb-tooltip th{background-color:#efefef;border-bottom:1px dotted #000;color:#000;font-size:12px;padding:4px 8px;text-align:center}.bb-tooltip tr:last-child td{border-bottom:none}.bb-tooltip td{background-color:#fff;border-bottom:1px solid #eee;padding:3px 6px}.bb-tooltip td:first-child{border-right:1px solid #eee;padding-left:5px}.bb-tooltip td:last-child{padding-right:5px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;height:12px;margin-right:6px;vertical-align:middle;width:5px}.bb-tooltip td.value{border-left:1px solid transparent;text-align:right}.bb-tooltip .bb-tooltip-title{color:#aaa;display:inline-block;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:1px;font-size:12px}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{color:#444;font-weight:400;line-height:13px;padding:4px 0 3px;text-align:left}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-weight:800;padding-left:5px}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:#fff}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{fill:#8c8c8c;font-size:16px!important;font-style:italic}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-arc .bb-gauge-value{fill:#8c8c8c;font-style:italic}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px;font-weight:700}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#8c8c8c;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#8c8c8c}.bb-chart-radars .bb-axis line{stroke:#8c8c8c;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em;font-weight:700}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;box-shadow:1px 1px 2px #ccc;cursor:pointer;opacity:.8;padding:5px}
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.7.4
8
+ * @version 3.7.5
9
9
  */
10
10
  /*-- Insight Theme --*/
11
11
  /*-- Default color pattern --*/
@@ -5,5 +5,5 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.7.4
8
+ * @version 3.7.5
9
9
  */.bb-color-pattern{background-image:url(#00c73c;#fa7171;#2ad0ff;#7294ce;#e3e448;#cc7e6e;#fb6ccf;#c98dff;#4aea99;#bbbbbb;)}.bb svg{font-family:sans-serif,Arial,nanumgothic,Dotum;font-size:12px;line-height:1}.bb line,.bb path{fill:none;stroke:#c4c4c4}.bb .bb-button,.bb text{fill:#555;font-size:11px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bb-axis,.bb-bars path,.bb-event-rect,.bb-legend-item-title,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-axis-y text,.bb-axis-y2 text{fill:#737373}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:rgba(39,201,3,.05)}.tick._active_ text{fill:#00c83c!important}.bb-grid{pointer-events:none}.bb-grid line{stroke:#f1f1f1}.bb-xgrid-focus line,.bb-ygrid-focus line{stroke:#ddd}.bb-text.bb-empty{fill:#767676}.bb-line{stroke-width:1px}.bb-circle._expanded_{fill:#fff!important;stroke-width:2px;stroke:red}rect.bb-circle._expanded_,use.bb-circle._expanded_{stroke-width:1px}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.3!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4;fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-brush .extent,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1;opacity:.75}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{font-family:sans-serif,Arial,nanumgothic,Dotum;user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border:1px solid #999;border-collapse:separate;border-spacing:0;empty-cells:show;font-size:11px;text-align:left}.bb-tooltip th{border-bottom:1px solid #eee;font-size:12px;padding:4px 8px;text-align:left}.bb-tooltip td{background-color:#fff;padding:4px 6px}.bb-tooltip td:first-child{padding-left:8px}.bb-tooltip td:last-child{padding-right:8px}.bb-tooltip td>span,.bb-tooltip td>svg{border-radius:5px;display:inline-block;height:10px;margin-right:6px;vertical-align:middle;width:10px}.bb-tooltip td.value{border-left:1px solid transparent}.bb-tooltip .bb-tooltip-title{color:#aaa;display:inline-block;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:0}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{color:#444;font-size:11px;font-weight:400;line-height:13px;padding:4px 0 3px;text-align:left}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-size:12px;font-weight:800;padding-left:5px}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:none}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{fill:#000;font-size:16px!important;font-weight:600}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-arc .bb-gauge-value{fill:#000}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;cursor:pointer;padding:5px}
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.7.4
8
+ * @version 3.7.5
9
9
  */
10
10
  import { timeParse, utcParse, timeFormat, utcFormat } from 'd3-time-format';
11
11
  import { pointer, select, namespaces, selectAll } from 'd3-selection';
@@ -405,7 +405,10 @@ function getRandom(asStr, min, max) {
405
405
  if (asStr === void 0) { asStr = true; }
406
406
  if (min === void 0) { min = 0; }
407
407
  if (max === void 0) { max = 10000; }
408
- var rand = Math.floor(Math.random() * (max - min) + min);
408
+ var crpt = win.crypto || win.msCrypto;
409
+ var rand = crpt ?
410
+ min + crpt.getRandomValues(new Uint32Array(1))[0] % (max - min + 1) :
411
+ Math.floor(Math.random() * (max - min) + min);
409
412
  return asStr ? String(rand) : rand;
410
413
  }
411
414
  /**
@@ -3766,7 +3769,6 @@ var data$1 = {
3766
3769
  },
3767
3770
  isMultipleX: function () {
3768
3771
  return notEmpty(this.config.data_xs) ||
3769
- !this.config.data_xSort ||
3770
3772
  this.hasType("bubble") ||
3771
3773
  this.hasType("scatter");
3772
3774
  },
@@ -3999,7 +4001,7 @@ var data$1 = {
3999
4001
  .map(function (x, index) { return ({ x: x, index: index }); });
4000
4002
  }
4001
4003
  else if (length) {
4002
- target = target[0].values;
4004
+ target = target[0].values.concat();
4003
4005
  }
4004
4006
  return target;
4005
4007
  },
@@ -4487,7 +4489,7 @@ var data$1 = {
4487
4489
  isBubbleZType: function (d) {
4488
4490
  var $$ = this;
4489
4491
  return $$.isBubbleType(d) && ((isObject(d.value) && ("z" in d.value || "y" in d.value)) ||
4490
- (isArray(d.value) && d.value.length === 2));
4492
+ (isArray(d.value) && d.value.length >= 2));
4491
4493
  },
4492
4494
  /**
4493
4495
  * Determine if bar has ranged data
@@ -4498,7 +4500,7 @@ var data$1 = {
4498
4500
  isBarRangeType: function (d) {
4499
4501
  var $$ = this;
4500
4502
  var value = d.value;
4501
- return $$.isBarType(d) && isArray(value) && value.length === 2 && value.every(function (v) { return isNumber(v); });
4503
+ return $$.isBarType(d) && isArray(value) && value.length >= 2 && value.every(function (v) { return isNumber(v); });
4502
4504
  },
4503
4505
  /**
4504
4506
  * Get data object by id
@@ -13158,6 +13160,9 @@ var eventrect = {
13158
13160
  if (!isMultipleX) {
13159
13161
  // Set data and update eventReceiver.data
13160
13162
  var xAxisTickValues = $$.getMaxDataCountTarget();
13163
+ if (!config.data_xSort) {
13164
+ xAxisTickValues.sort(function (a, b) { return a.x - b.x; });
13165
+ }
13161
13166
  // update data's index value to be alinged with the x Axis
13162
13167
  $$.updateDataIndexByX(xAxisTickValues);
13163
13168
  $$.updateXs(xAxisTickValues);
@@ -14614,13 +14619,22 @@ var optDataAxis = {
14614
14619
  data_xLocaltime: true,
14615
14620
  /**
14616
14621
  * Sort on x axis.
14622
+ * - **NOTE:** This option works for lineish(area/line/spline/step) types only.
14617
14623
  * @name data․xSort
14618
14624
  * @memberof Options
14619
14625
  * @type {boolean}
14620
14626
  * @default true
14627
+ * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataXSort)
14621
14628
  * @example
14622
14629
  * data: {
14623
- * xSort: false
14630
+ * xSort: false,
14631
+ * x: "x",
14632
+ * columns: [
14633
+ * // The line graph will start to be drawn following the x axis sequence
14634
+ * // Below data, wil start drawing x=1: 200, x=2: 300, x=3: 100
14635
+ * ["x", 3, 1, 2],
14636
+ * ["data1", 100, 200, 300]
14637
+ * ]
14624
14638
  * }
14625
14639
  */
14626
14640
  data_xSort: true,
@@ -17473,12 +17487,11 @@ var shapeBar = {
17473
17487
  var pathRadius = ["", ""];
17474
17488
  var radius = 0;
17475
17489
  var isGrouped = $$.isGrouped(d.id);
17476
- // const hasRadius = d.value !== 0 && getRadius;
17477
17490
  var isRadiusData = getRadius && isGrouped ? $$.isStackingRadiusData(d) : false;
17478
- if (getRadius && (!isGrouped || isRadiusData)) {
17491
+ if (getRadius) {
17479
17492
  var index = isRotated ? indexY : indexX;
17480
17493
  var barW = points[2][index] - points[0][index];
17481
- radius = getRadius(barW);
17494
+ radius = !isGrouped || isRadiusData ? getRadius(barW) : 0;
17482
17495
  var arc = "a".concat(radius, ",").concat(radius, " ").concat(isNegative ? "1 0 0" : "0 0 1", " ");
17483
17496
  pathRadius[+!isRotated] = "".concat(arc).concat(radius, ",").concat(radius);
17484
17497
  pathRadius[+isRotated] = "".concat(arc).concat([-radius, radius][isRotated ? "sort" : "reverse"]());
@@ -22116,7 +22129,7 @@ var zoomModule = function () {
22116
22129
  var defaults = {};
22117
22130
  /**
22118
22131
  * @namespace bb
22119
- * @version 3.7.4
22132
+ * @version 3.7.5
22120
22133
  */
22121
22134
  var bb = {
22122
22135
  /**
@@ -22126,7 +22139,7 @@ var bb = {
22126
22139
  * bb.version; // "1.0.0"
22127
22140
  * @memberof bb
22128
22141
  */
22129
- version: "3.7.4",
22142
+ version: "3.7.5",
22130
22143
  /**
22131
22144
  * Generate chart
22132
22145
  * - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when:
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.7.4
8
+ * @version 3.7.5
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -104,7 +104,7 @@ var Plugin = /** @class */ (function () {
104
104
  delete _this[key];
105
105
  });
106
106
  };
107
- Plugin.version = "3.7.4";
107
+ Plugin.version = "3.7.5";
108
108
  return Plugin;
109
109
  }());
110
110
  var Plugin$1 = Plugin;
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.7.4
8
+ * @version 3.7.5
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -278,7 +278,7 @@ var Plugin = /** @class */ (function () {
278
278
  delete _this[key];
279
279
  });
280
280
  };
281
- Plugin.version = "3.7.4";
281
+ Plugin.version = "3.7.5";
282
282
  return Plugin;
283
283
  }());
284
284
  var Plugin$1 = Plugin;
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.7.4
8
+ * @version 3.7.5
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -486,7 +486,7 @@ var Plugin = /** @class */ (function () {
486
486
  delete _this[key];
487
487
  });
488
488
  };
489
- Plugin.version = "3.7.4";
489
+ Plugin.version = "3.7.5";
490
490
  return Plugin;
491
491
  }());
492
492
  var Plugin$1 = Plugin;
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.7.4
8
+ * @version 3.7.5
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -121,7 +121,7 @@ var Plugin = /** @class */ (function () {
121
121
  delete _this[key];
122
122
  });
123
123
  };
124
- Plugin.version = "3.7.4";
124
+ Plugin.version = "3.7.5";
125
125
  return Plugin;
126
126
  }());
127
127
  var Plugin$1 = Plugin;
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.7.4
8
+ * @version 3.7.5
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -263,7 +263,7 @@ var Plugin = /** @class */ (function () {
263
263
  delete _this[key];
264
264
  });
265
265
  };
266
- Plugin.version = "3.7.4";
266
+ Plugin.version = "3.7.5";
267
267
  return Plugin;
268
268
  }());
269
269
  var Plugin$1 = Plugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "billboard.js",
3
- "version": "3.7.4",
3
+ "version": "3.7.5",
4
4
  "description": "Re-usable easy interface JavaScript chart library, based on D3 v4+",
5
5
  "homepage": "https://naver.github.io/billboard.js/",
6
6
  "main": "dist/billboard.js",
@@ -101,16 +101,16 @@
101
101
  "d3-zoom": "^3.0.0"
102
102
  },
103
103
  "devDependencies": {
104
- "@babel/core": "^7.20.12",
104
+ "@babel/core": "^7.21.0",
105
105
  "@babel/eslint-parser": "^7.19.1",
106
106
  "@babel/plugin-proposal-class-properties": "^7.18.6",
107
107
  "@babel/plugin-proposal-object-rest-spread": "^7.20.7",
108
- "@babel/plugin-transform-runtime": "^7.19.1",
108
+ "@babel/plugin-transform-runtime": "^7.21.0",
109
109
  "@babel/preset-env": "^7.20.2",
110
- "@babel/preset-typescript": "^7.18.6",
111
- "@babel/runtime": "^7.20.13",
112
- "@commitlint/cli": "17.4.2",
113
- "@commitlint/config-conventional": "^17.4.2",
110
+ "@babel/preset-typescript": "^7.21.0",
111
+ "@babel/runtime": "^7.21.0",
112
+ "@commitlint/cli": "17.4.4",
113
+ "@commitlint/config-conventional": "^17.4.4",
114
114
  "@rollup/plugin-babel": "^6.0.3",
115
115
  "@rollup/plugin-node-resolve": "^15.0.0",
116
116
  "@rollup/plugin-replace": "^5.0.2",
@@ -125,8 +125,8 @@
125
125
  "@types/d3": "^7.4.0",
126
126
  "@types/mocha": "^10.0.1",
127
127
  "@types/sinon": "^10.0.13",
128
- "@typescript-eslint/eslint-plugin": "^5.49.0",
129
- "@typescript-eslint/parser": "^5.49.0",
128
+ "@typescript-eslint/eslint-plugin": "^5.54.0",
129
+ "@typescript-eslint/parser": "^5.54.0",
130
130
  "babel-helper-modules": "^6.0.0",
131
131
  "babel-loader": "^9.1.2",
132
132
  "babel-plugin-add-module-exports": "^1.0.4",
@@ -142,7 +142,7 @@
142
142
  "chai": "^4.3.7",
143
143
  "clean-webpack-plugin": "^4.0.0",
144
144
  "cloc": "^2.11.0",
145
- "core-js": "^3.27.2",
145
+ "core-js": "^3.29.0",
146
146
  "coveralls": "^3.1.1",
147
147
  "cross-env": "^7.0.3",
148
148
  "css-loader": "^6.7.3",
@@ -153,17 +153,17 @@
153
153
  "d3-polygon": "^3.0.1",
154
154
  "docdash": "^2.0.1",
155
155
  "dtslint": "^4.2.1",
156
- "eslint": "^8.33.0",
156
+ "eslint": "^8.35.0",
157
157
  "eslint-config-naver": "^2.1.0",
158
158
  "eslint-plugin-import": "^2.27.5",
159
- "eslint-plugin-jsdoc": "^39.7.4",
160
- "eslint-webpack-plugin": "^3.2.0",
159
+ "eslint-plugin-jsdoc": "^40.0.1",
160
+ "eslint-webpack-plugin": "^4.0.0",
161
161
  "exports-loader": "^4.0.0",
162
162
  "hammer-simulator": "0.0.1",
163
163
  "husky": "^8.0.3",
164
164
  "istanbul-instrumenter-loader": "^3.0.1",
165
165
  "istanbul-lib-instrument": "^5.2.1",
166
- "jsdoc": "^4.0.0",
166
+ "jsdoc": "^4.0.2",
167
167
  "karma": "^6.4.1",
168
168
  "karma-chai": "^0.1.0",
169
169
  "karma-chrome-launcher": "^3.1.1",
@@ -172,18 +172,18 @@
172
172
  "karma-mocha-reporter": "^2.2.3",
173
173
  "karma-scss-preprocessor": "^4.0.0",
174
174
  "karma-sinon": "^1.0.5",
175
- "karma-sourcemap-loader": "^0.3.8",
175
+ "karma-sourcemap-loader": "^0.4.0",
176
176
  "karma-webpack": "^5.0.0",
177
- "lint-staged": "^13.1.0",
177
+ "lint-staged": "^13.1.2",
178
178
  "lite-fixture": "^1.0.2",
179
179
  "mini-css-extract-plugin": "^2.7.2",
180
180
  "mocha": "^10.2.0",
181
181
  "node-sass": "^8.0.0",
182
182
  "regenerator-runtime": "^0.13.11",
183
- "rollup": "^3.12.0",
183
+ "rollup": "^3.18.0",
184
184
  "rollup-plugin-delete": "^2.0.0",
185
185
  "sass-loader": "^13.2.0",
186
- "semantic-release": "^20.1.0",
186
+ "semantic-release": "^20.1.1",
187
187
  "simulant": "^0.2.2",
188
188
  "sinon": "^15.0.1",
189
189
  "string-replace-loader": "^3.1.0",
@@ -193,7 +193,7 @@
193
193
  "tslib": "^2.5.0",
194
194
  "typescript": "4.9.5",
195
195
  "webpack": "^5.75.0",
196
- "webpack-bundle-analyzer": "^4.7.0",
196
+ "webpack-bundle-analyzer": "^4.8.0",
197
197
  "webpack-clean": "^1.2.5",
198
198
  "webpack-cli": "^5.0.1",
199
199
  "webpack-common-shake": "^2.1.0",
@@ -19,7 +19,7 @@ export interface ITreemapData {
19
19
  }
20
20
 
21
21
  export interface IDataRow extends TDataRow {
22
- x: number;
22
+ x: number | string | Date;
23
23
  }
24
24
  export interface IArcDataRow extends TDataRow {
25
25
  ratio: number;
@@ -122,7 +122,6 @@ export default {
122
122
 
123
123
  isMultipleX(): boolean {
124
124
  return notEmpty(this.config.data_xs) ||
125
- !this.config.data_xSort ||
126
125
  this.hasType("bubble") ||
127
126
  this.hasType("scatter");
128
127
  },
@@ -407,7 +406,7 @@ export default {
407
406
  target = sortValue(getUnique(target))
408
407
  .map((x, index) => ({x, index}));
409
408
  } else if (length) {
410
- target = target[0].values;
409
+ target = target[0].values.concat();
411
410
  }
412
411
 
413
412
  return target;
@@ -1007,7 +1006,7 @@ export default {
1007
1006
 
1008
1007
  return $$.isBubbleType(d) && (
1009
1008
  (isObject(d.value) && ("z" in d.value || "y" in d.value)) ||
1010
- (isArray(d.value) && d.value.length === 2)
1009
+ (isArray(d.value) && d.value.length >= 2)
1011
1010
  );
1012
1011
  },
1013
1012
 
@@ -1021,7 +1020,7 @@ export default {
1021
1020
  const $$ = this;
1022
1021
  const {value} = d;
1023
1022
 
1024
- return $$.isBarType(d) && isArray(value) && value.length === 2 && value.every(v => isNumber(v));
1023
+ return $$.isBarType(d) && isArray(value) && value.length >= 2 && value.every(v => isNumber(v));
1025
1024
  },
1026
1025
 
1027
1026
  /**
@@ -66,6 +66,10 @@ export default {
66
66
  // Set data and update eventReceiver.data
67
67
  const xAxisTickValues = $$.getMaxDataCountTarget();
68
68
 
69
+ if (!config.data_xSort) {
70
+ xAxisTickValues.sort((a, b) => a.x - b.x);
71
+ }
72
+
69
73
  // update data's index value to be alinged with the x Axis
70
74
  $$.updateDataIndexByX(xAxisTickValues);
71
75
  $$.updateXs(xAxisTickValues);
@@ -180,14 +180,13 @@ export default {
180
180
  let radius = 0;
181
181
 
182
182
  const isGrouped = $$.isGrouped(d.id);
183
- // const hasRadius = d.value !== 0 && getRadius;
184
183
  const isRadiusData = getRadius && isGrouped ? $$.isStackingRadiusData(d) : false;
185
184
 
186
- if (getRadius && (!isGrouped || isRadiusData)) {
185
+ if (getRadius) {
187
186
  const index = isRotated ? indexY : indexX;
188
187
  const barW = points[2][index] - points[0][index];
189
188
 
190
- radius = getRadius(barW);
189
+ radius = !isGrouped || isRadiusData ? getRadius(barW) : 0;
191
190
 
192
191
  const arc = `a${radius},${radius} ${isNegative ? `1 0 0` : `0 0 1`} `;
193
192
 
@@ -63,13 +63,22 @@ export default {
63
63
 
64
64
  /**
65
65
  * Sort on x axis.
66
+ * - **NOTE:** This option works for lineish(area/line/spline/step) types only.
66
67
  * @name data․xSort
67
68
  * @memberof Options
68
69
  * @type {boolean}
69
70
  * @default true
71
+ * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataXSort)
70
72
  * @example
71
73
  * data: {
72
- * xSort: false
74
+ * xSort: false,
75
+ * x: "x",
76
+ * columns: [
77
+ * // The line graph will start to be drawn following the x axis sequence
78
+ * // Below data, wil start drawing x=1: 200, x=2: 300, x=3: 100
79
+ * ["x", 3, 1, 2],
80
+ * ["data1", 100, 200, 300]
81
+ * ]
73
82
  * }
74
83
  */
75
84
  data_xSort: true,
@@ -320,8 +320,11 @@ function getBoundingRect(node): {
320
320
  * @returns {number|string}
321
321
  * @private
322
322
  */
323
- function getRandom(asStr: boolean = true, min = 0, max = 10000): number | string {
324
- const rand = Math.floor(Math.random() * (max - min) + min);
323
+ function getRandom(asStr = true, min = 0, max = 10000) {
324
+ const crpt = window.crypto || window.msCrypto;
325
+ const rand = crpt ?
326
+ min + crpt.getRandomValues(new Uint32Array(1))[0] % (max - min + 1) :
327
+ Math.floor(Math.random() * (max - min) + min);
325
328
 
326
329
  return asStr ? String(rand) : rand;
327
330
  }