billboard.js 3.4.0-next.1 → 3.4.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 (47) hide show
  1. package/README.md +7 -3
  2. package/dist/billboard.css +1 -1
  3. package/dist/billboard.js +167 -58
  4. package/dist/billboard.min.css +1 -1
  5. package/dist/billboard.min.js +2 -2
  6. package/dist/billboard.pkgd.js +237 -81
  7. package/dist/billboard.pkgd.min.js +2 -2
  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 +12 -7
  11. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  12. package/dist/plugin/billboardjs-plugin-stanford.js +12 -7
  13. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  14. package/dist/plugin/billboardjs-plugin-tableview.js +12 -7
  15. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  16. package/dist/plugin/billboardjs-plugin-textoverlap.js +12 -7
  17. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  18. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +2 -2
  19. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +58 -21
  20. package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +80 -28
  21. package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +58 -21
  22. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +58 -21
  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 +142 -52
  30. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  31. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -2
  32. package/dist-esm/plugin/billboardjs-plugin-stanford.js +7 -4
  33. package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
  34. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
  35. package/package.json +17 -17
  36. package/src/Chart/api/axis.ts +90 -25
  37. package/src/ChartInternal/ChartInternal.ts +25 -11
  38. package/src/ChartInternal/interactions/flow.ts +1 -1
  39. package/src/ChartInternal/shape/arc.ts +1 -1
  40. package/src/ChartInternal/shape/bar.ts +1 -1
  41. package/src/ChartInternal/shape/point.ts +8 -3
  42. package/src/config/Options/common/main.ts +19 -2
  43. package/src/module/generator.ts +19 -5
  44. package/src/module/util.ts +6 -3
  45. package/types/chart.d.ts +8 -8
  46. package/types/options.d.ts +7 -2
  47. package/types/types.d.ts +2 -0
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.4.0-next.1
8
+ * @version 3.4.1
9
9
  */
10
10
  import { timeParse, utcParse, timeFormat, utcFormat } from 'd3-time-format';
11
11
  import { pointer, select, namespaces, selectAll } from 'd3-selection';
@@ -739,13 +739,16 @@ function tplProcess(tpl, data) {
739
739
  * @private
740
740
  */
741
741
  function parseDate(date) {
742
+ var _a;
742
743
  var parsedDate;
743
744
  if (date instanceof Date) {
744
745
  parsedDate = date;
745
746
  }
746
747
  else if (isString(date)) {
747
- var _a = this, config = _a.config, format = _a.format;
748
- parsedDate = format.dataTime(config.data_xFormat)(date);
748
+ var _b = this, config = _b.config, format = _b.format;
749
+ // if fails to parse, try by new Date()
750
+ // https://github.com/naver/billboard.js/issues/1714
751
+ parsedDate = (_a = format.dataTime(config.data_xFormat)(date)) !== null && _a !== void 0 ? _a : new Date(date);
749
752
  }
750
753
  else if (isNumber(date) && !isNaN(date)) {
751
754
  parsedDate = new Date(+date);
@@ -762,7 +765,7 @@ function parseDate(date) {
762
765
  * @private
763
766
  */
764
767
  function isTabVisible() {
765
- return !doc.hidden;
768
+ return (doc === null || doc === void 0 ? void 0 : doc.hidden) === false || (doc === null || doc === void 0 ? void 0 : doc.visibilityState) === "visible";
766
769
  }
767
770
  /**
768
771
  * Get the current input type
@@ -802,7 +805,8 @@ function convertInputType(mouse, touch) {
802
805
  // Demo: https://patrickhlauke.github.io/touch/pointer-hover-any-pointer-any-hover/
803
806
  var hasMouse = mouse && ["any-hover:hover", "any-pointer:fine"]
804
807
  .some(function (v) { return matchMedia === null || matchMedia === void 0 ? void 0 : matchMedia("(".concat(v, ")")).matches; });
805
- return (hasMouse && "mouse") || (hasTouch && "touch") || null;
808
+ // fallback to 'mouse' if no input type is detected.
809
+ return (hasMouse && "mouse") || (hasTouch && "touch") || "mouse";
806
810
  }
807
811
 
808
812
  /**
@@ -1371,6 +1375,20 @@ var main = {
1371
1375
  * }
1372
1376
  */
1373
1377
  resize_auto: true,
1378
+ /**
1379
+ * Set a callback to execute when the chart is clicked.
1380
+ * @name onclick
1381
+ * @memberof Options
1382
+ * @type {Function}
1383
+ * @default undefined
1384
+ * @example
1385
+ * onclick: function(event) {
1386
+ * this; // chart instance itself
1387
+ * event; // native event object
1388
+ * ...
1389
+ * }
1390
+ */
1391
+ onclick: undefined,
1374
1392
  /**
1375
1393
  * Set a callback to execute when mouse/touch enters the chart.
1376
1394
  * @name onover
@@ -1378,8 +1396,9 @@ var main = {
1378
1396
  * @type {Function}
1379
1397
  * @default undefined
1380
1398
  * @example
1381
- * onover: function() {
1399
+ * onover: function(event) {
1382
1400
  * this; // chart instance itself
1401
+ * event; // native event object
1383
1402
  * ...
1384
1403
  * }
1385
1404
  */
@@ -1391,8 +1410,9 @@ var main = {
1391
1410
  * @type {Function}
1392
1411
  * @default undefined
1393
1412
  * @example
1394
- * onout: function() {
1413
+ * onout: function(event) {
1395
1414
  * this; // chart instance itself
1415
+ * event; // native event object
1396
1416
  * ...
1397
1417
  * }
1398
1418
  */
@@ -3003,10 +3023,6 @@ var Cache = /** @class */ (function () {
3003
3023
  return Cache;
3004
3024
  }());
3005
3025
 
3006
- /**
3007
- * Copyright (c) 2017 ~ present NAVER Corp.
3008
- * billboard.js project is licensed under the MIT license
3009
- */
3010
3026
  var setTimeout$1 = win.setTimeout, clearTimeout$1 = win.clearTimeout;
3011
3027
  /**
3012
3028
  * Generate resize queue function
@@ -3040,19 +3056,28 @@ function generateResize() {
3040
3056
  */
3041
3057
  function generateWait() {
3042
3058
  var transitionsToWait = [];
3043
- var f = function (t, callback) {
3059
+ // 'f' is called as selection.call(f, ...);
3060
+ var f = function (selection, callback) {
3044
3061
  var timer;
3045
- // eslint-disable-next-line
3062
+ /**
3063
+ * Check if transition is complete
3064
+ * @private
3065
+ */
3046
3066
  function loop() {
3047
3067
  var _a;
3048
3068
  var done = 0;
3049
- for (var i = 0, t_1; (t_1 = transitionsToWait[i]); i++) {
3050
- if (t_1 === true || ((_a = t_1.empty) === null || _a === void 0 ? void 0 : _a.call(t_1))) {
3069
+ for (var i = 0, t = void 0; (t = transitionsToWait[i]); i++) {
3070
+ if (t === true || ((_a = t.empty) === null || _a === void 0 ? void 0 : _a.call(t))) {
3051
3071
  done++;
3052
3072
  continue;
3053
3073
  }
3074
+ // when tab isn't visible exit loop
3075
+ if (isTabVisible() === false) {
3076
+ done = transitionsToWait.length;
3077
+ break;
3078
+ }
3054
3079
  try {
3055
- t_1.transition();
3080
+ t.transition();
3056
3081
  }
3057
3082
  catch (e) {
3058
3083
  done++;
@@ -8346,7 +8371,7 @@ var ChartInternal = /** @class */ (function () {
8346
8371
  };
8347
8372
  ChartInternal.prototype.initParams = function () {
8348
8373
  var $$ = this;
8349
- var _a = $$, config = _a.config, format = _a.format, state = _a.state;
8374
+ var config = $$.config, format = $$.format, state = $$.state;
8350
8375
  var isRotated = config.axis_rotated;
8351
8376
  // datetime to be used for uniqueness
8352
8377
  state.datetimeId = "bb-".concat(+new Date() * getRandom());
@@ -8439,8 +8464,11 @@ var ChartInternal = /** @class */ (function () {
8439
8464
  .style("display", "block");
8440
8465
  if (hasInteraction && state.inputType) {
8441
8466
  var isTouch = state.inputType === "touch";
8442
- $el.svg.on(isTouch ? "touchstart" : "mouseenter", function () { return callFn(config.onover, $$.api); })
8443
- .on(isTouch ? "touchend" : "mouseleave", function () { return callFn(config.onout, $$.api); });
8467
+ var onclick_1 = config.onclick, onover = config.onover, onout = config.onout;
8468
+ $el.svg
8469
+ .on("click", (onclick_1 === null || onclick_1 === void 0 ? void 0 : onclick_1.bind($$.api)) || null)
8470
+ .on(isTouch ? "touchstart" : "mouseenter", (onover === null || onover === void 0 ? void 0 : onover.bind($$.api)) || null)
8471
+ .on(isTouch ? "touchend" : "mouseleave", (onout === null || onout === void 0 ? void 0 : onout.bind($$.api)) || null);
8444
8472
  }
8445
8473
  config.svg_classname && $el.svg.attr("class", config.svg_classname);
8446
8474
  // Define defs
@@ -8642,21 +8670,28 @@ var ChartInternal = /** @class */ (function () {
8642
8670
  }
8643
8671
  helper(type_1);
8644
8672
  }
8645
- // circle
8646
- if ($$.hasType("bubble") || $$.hasType("scatter")) {
8673
+ // Point types
8674
+ var hasPointType = $$.hasType("bubble") || $$.hasType("scatter");
8675
+ if (hasPointType) {
8647
8676
  (_a = $$.updateTargetForCircle) === null || _a === void 0 ? void 0 : _a.call($$);
8648
8677
  }
8649
8678
  // Fade-in each chart
8650
- $$.showTargets();
8679
+ $$.filterTargetsToShowAtInit(hasPointType);
8651
8680
  };
8652
8681
  /**
8653
- * Display targeted elements
8682
+ * Display targeted elements at initialization
8683
+ * @param {boolean} hasPointType whether has point type(bubble, scatter) or not
8654
8684
  * @private
8655
8685
  */
8656
- ChartInternal.prototype.showTargets = function () {
8686
+ ChartInternal.prototype.filterTargetsToShowAtInit = function (hasPointType) {
8687
+ if (hasPointType === void 0) { hasPointType = false; }
8657
8688
  var $$ = this;
8658
8689
  var svg = $$.$el.svg, $T = $$.$T;
8659
- $T(svg.selectAll(".".concat($COMMON.target))
8690
+ var selector = ".".concat($COMMON.target);
8691
+ if (hasPointType) {
8692
+ selector += ", .".concat($CIRCLE.chartCircles, " > .").concat($CIRCLE.circles);
8693
+ }
8694
+ $T(svg.selectAll(selector)
8660
8695
  .filter(function (d) { return $$.isTargetToShow(d.id); })).style("opacity", null);
8661
8696
  };
8662
8697
  ChartInternal.prototype.getWithOption = function (options) {
@@ -8687,8 +8722,9 @@ var ChartInternal = /** @class */ (function () {
8687
8722
  ChartInternal.prototype.initialOpacity = function (d) {
8688
8723
  var $$ = this;
8689
8724
  var withoutFadeIn = $$.state.withoutFadeIn;
8690
- return $$.getBaseValue(d) !== null &&
8725
+ var r = $$.getBaseValue(d) !== null &&
8691
8726
  withoutFadeIn[d.id] ? null : "0";
8727
+ return r;
8692
8728
  };
8693
8729
  ChartInternal.prototype.bindResize = function () {
8694
8730
  var $$ = this;
@@ -10008,18 +10044,23 @@ extend(Chart.prototype, [
10008
10044
  */
10009
10045
  function setMinMax($$, type, value) {
10010
10046
  var config = $$.config;
10011
- var axisX = "axis_x_".concat(type);
10012
- var axisY = "axis_y_".concat(type);
10013
- var axisY2 = "axis_y2_".concat(type);
10047
+ var helper = function (key, value) {
10048
+ var v = isNumber(value) ? value : (value === false ? undefined : null);
10049
+ if (v !== null) {
10050
+ config["axis_".concat(key, "_").concat(type)] = v;
10051
+ }
10052
+ };
10014
10053
  if (isDefined(value)) {
10015
10054
  if (isObjectType(value)) {
10016
- isValue(value.x) && (config[axisX] = value.x);
10017
- isValue(value.y) && (config[axisY] = value.y);
10018
- isValue(value.y2) && (config[axisY2] = value.y2);
10055
+ Object.keys(value).forEach(function (key) {
10056
+ helper(key, value[key]);
10057
+ });
10019
10058
  }
10020
- else {
10021
- config[axisY] = value;
10022
- config[axisY2] = value;
10059
+ else if (isNumber(value) || value === false) {
10060
+ // shorthand values affects only y and y2.
10061
+ ["y", "y2"].forEach(function (key) {
10062
+ helper(key, value);
10063
+ });
10023
10064
  }
10024
10065
  $$.redraw({
10025
10066
  withUpdateOrgXDomain: true,
@@ -10096,8 +10137,9 @@ var axis$1 = {
10096
10137
  * @instance
10097
10138
  * @memberof Chart
10098
10139
  * @param {object} min If min is given, specified axis' min value will be updated.<br>
10099
- * If no argument is given, the min values set on generating option for each axis will be returned.
10100
- * If not set any min values on generation, it will return `undefined`.
10140
+ * If no argument is given, the min values set on generating option for each axis will be returned.
10141
+ * If not set any min values on generation, it will return `undefined`.<br>
10142
+ * To unset specific axis max, set `false` to each of them.
10101
10143
  * @returns {object|undefined}
10102
10144
  * @example
10103
10145
  * // Update axis' min
@@ -10106,10 +10148,21 @@ var axis$1 = {
10106
10148
  * y: 1000,
10107
10149
  * y2: 100
10108
10150
  * });
10151
+ *
10152
+ * // To unset specific axis min, set false to each of them.
10153
+ * chart.axis.min({
10154
+ * x: false,
10155
+ * y: false,
10156
+ * y2: false
10157
+ * });
10158
+ *
10159
+ * // shorthand (only affects y and y2 axis)
10160
+ * chart.axis.min(-50);
10161
+ * chart.axis.min(false);
10109
10162
  */
10110
10163
  min: function (min) {
10111
10164
  var $$ = this.internal;
10112
- return isValue(min) ?
10165
+ return isValue(min) || min === false ?
10113
10166
  setMinMax($$, "min", min) :
10114
10167
  getMinMax($$, "min");
10115
10168
  },
@@ -10119,8 +10172,9 @@ var axis$1 = {
10119
10172
  * @instance
10120
10173
  * @memberof Chart
10121
10174
  * @param {object} max If max is given, specified axis' max value will be updated.<br>
10122
- * If no argument is given, the max values set on generating option for each axis will be returned.
10123
- * If not set any max values on generation, it will return `undefined`.
10175
+ * If no argument is given, the max values set on generating option for each axis will be returned.
10176
+ * If not set any max values on generation, it will return `undefined`.<br>
10177
+ * To unset specific axis max, set `false` to each of them.
10124
10178
  * @returns {object|undefined}
10125
10179
  * @example
10126
10180
  * // Update axis' label
@@ -10129,10 +10183,21 @@ var axis$1 = {
10129
10183
  * y: 1000,
10130
10184
  * y2: 10000
10131
10185
  * });
10186
+ *
10187
+ * // To unset specific axis max, set false to each of them.
10188
+ * chart.axis.max({
10189
+ * x: false,
10190
+ * y: false,
10191
+ * y2: false
10192
+ * });
10193
+ *
10194
+ * // shorthand (only affects y and y2 axis)
10195
+ * chart.axis.max(10);
10196
+ * chart.axis.max(false);
10132
10197
  */
10133
10198
  max: function (max) {
10134
10199
  var $$ = this.internal;
10135
- return arguments.length ?
10200
+ return isValue(max) || max === false ?
10136
10201
  setMinMax($$, "max", max) :
10137
10202
  getMinMax($$, "max");
10138
10203
  },
@@ -10141,7 +10206,9 @@ var axis$1 = {
10141
10206
  * @function axis․range
10142
10207
  * @instance
10143
10208
  * @memberof Chart
10144
- * @param {object} range If range is given, specified axis' min and max value will be updated. If no argument is given, the current min and max values for each axis will be returned.
10209
+ * @param {object} range If range is given, specified axis' min and max value will be updated.
10210
+ * If no argument is given, the current min and max values for each axis will be returned.<br>
10211
+ * To unset specific axis max, set `false` to each of them.
10145
10212
  * @returns {object|undefined}
10146
10213
  * @example
10147
10214
  * // Update axis' label
@@ -10157,12 +10224,31 @@ var axis$1 = {
10157
10224
  * y2: 10000
10158
10225
  * },
10159
10226
  * });
10227
+ *
10228
+ * // To unset specific axis max, set false to each of them.
10229
+ * chart.axis.range({
10230
+ * min: {
10231
+ * x: false,
10232
+ * y: false,
10233
+ * y2: false
10234
+ * },
10235
+ * max: {
10236
+ * x: false,
10237
+ * y: false,
10238
+ * y2: false
10239
+ * },
10240
+ * });
10241
+ *
10242
+ * // shorthand (only affects y and y2 axis)
10243
+ * chart.axis.range({ min: -50, max: 1000 });
10244
+ * chart.axis.range({ min: false, max: false });
10160
10245
  */
10161
10246
  range: function (range) {
10162
10247
  var axis = this.axis;
10163
10248
  if (arguments.length) {
10164
- isDefined(range.max) && axis.max(range.max);
10165
- isDefined(range.min) && axis.min(range.min);
10249
+ var min = range.min, max = range.max;
10250
+ isDefined(max) && axis.max(max);
10251
+ isDefined(min) && axis.min(min);
10166
10252
  }
10167
10253
  else {
10168
10254
  return {
@@ -12774,7 +12860,7 @@ var flow = {
12774
12860
  else {
12775
12861
  translateX = $$.axis.isTimeSeries() ?
12776
12862
  x(orgDomain[0]) - x(domain[0]) :
12777
- x(flowStart.x) - x(flowEnd.x);
12863
+ x((flowStart === null || flowStart === void 0 ? void 0 : flowStart.x) || 0) - x(flowEnd.x);
12778
12864
  }
12779
12865
  var scaleX = (diffDomain(orgDomain) / diffDomain(domain));
12780
12866
  return "translate(".concat(translateX, ",0) scale(").concat(scaleX, ",1)");
@@ -15622,7 +15708,7 @@ var shapeArc = {
15622
15708
  },
15623
15709
  /**
15624
15710
  * Set transform attributes to arc label text
15625
- * @param {Object} d Data object
15711
+ * @param {object} d Data object
15626
15712
  * @returns {string} Translate attribute string
15627
15713
  * @private
15628
15714
  */
@@ -16424,7 +16510,7 @@ var shapeBar = {
16424
16510
  },
16425
16511
  /**
16426
16512
  * Determine if given stacking bar data is radius type
16427
- * @param {Object} d Data row
16513
+ * @param {object} d Data row
16428
16514
  * @returns {boolean}
16429
16515
  */
16430
16516
  isStackingRadiusData: function (d) {
@@ -17182,8 +17268,7 @@ var shapePoint = {
17182
17268
  var mainCircle = $el.main.select(".".concat($CIRCLE.chartCircles))
17183
17269
  .style("pointer-events", "none")
17184
17270
  .selectAll(".".concat($CIRCLE.circles))
17185
- .data(targets)
17186
- .attr("class", classCircles);
17271
+ .data(targets);
17187
17272
  mainCircle.exit().remove();
17188
17273
  enterNode = mainCircle.enter();
17189
17274
  }
@@ -17192,7 +17277,12 @@ var shapePoint = {
17192
17277
  .attr("class", function (d) { return $$.generateClass($SELECT.selectedCircles, d.id); });
17193
17278
  enterNode.append("g")
17194
17279
  .attr("class", classCircles)
17195
- .style("cursor", function (d) { return (isFunction(isSelectable) && isSelectable(d) ? "pointer" : null); });
17280
+ .style("cursor", function (d) { return (isFunction(isSelectable) && isSelectable(d) ? "pointer" : null); })
17281
+ .style("opacity", function () {
17282
+ var parent = select(this.parentNode);
17283
+ // if the parent node is .bb-chart-circles (bubble, scatter), initialize <g bb-circles> with opacity "0"
17284
+ return parent.attr("class").indexOf($CIRCLE.chartCircles) > -1 ? "0" : null;
17285
+ });
17196
17286
  // Update date for selected circles
17197
17287
  selectionEnabled && targets.forEach(function (t) {
17198
17288
  $el.main.selectAll(".".concat($SELECT.selectedCircles).concat($$.getTargetSelectorSuffix(t.id)))
@@ -20648,7 +20738,7 @@ var zoomModule = function () {
20648
20738
  var defaults = {};
20649
20739
  /**
20650
20740
  * @namespace bb
20651
- * @version 3.4.0-next.1
20741
+ * @version 3.4.1
20652
20742
  */
20653
20743
  var bb = {
20654
20744
  /**
@@ -20658,7 +20748,7 @@ var bb = {
20658
20748
  * bb.version; // "1.0.0"
20659
20749
  * @memberof bb
20660
20750
  */
20661
- version: "3.4.0-next.1",
20751
+ version: "3.4.1",
20662
20752
  /**
20663
20753
  * Generate chart
20664
20754
  * - **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.4.0-next.1
8
+ * @version 3.4.1
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -142,7 +142,7 @@ var Plugin = /*#__PURE__*/function () {
142
142
  return Plugin;
143
143
  }();
144
144
 
145
- Plugin.version = "#3.4.0-next.1#";
145
+ Plugin.version = "#3.4.1#";
146
146
 
147
147
  /**
148
148
  * Bubble compare diagram plugin.<br>
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.4.0-next.1
8
+ * @version 3.4.1
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -317,7 +317,7 @@ var Plugin = /*#__PURE__*/function () {
317
317
  return Plugin;
318
318
  }();
319
319
 
320
- Plugin.version = "#3.4.0-next.1#";
320
+ Plugin.version = "#3.4.1#";
321
321
 
322
322
  /**
323
323
  * Copyright (c) 2021 ~ present NAVER Corp.
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.4.0-next.1
8
+ * @version 3.4.1
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -375,13 +375,16 @@ var getRange = function (start, end, step) {
375
375
  * @private
376
376
  */
377
377
  function parseDate(date) {
378
+ var _a;
378
379
  var parsedDate;
379
380
  if (date instanceof Date) {
380
381
  parsedDate = date;
381
382
  }
382
383
  else if (isString(date)) {
383
- var _a = this, config = _a.config, format = _a.format;
384
- parsedDate = format.dataTime(config.data_xFormat)(date);
384
+ var _b = this, config = _b.config, format = _b.format;
385
+ // if fails to parse, try by new Date()
386
+ // https://github.com/naver/billboard.js/issues/1714
387
+ parsedDate = (_a = format.dataTime(config.data_xFormat)(date)) !== null && _a !== void 0 ? _a : new Date(date);
385
388
  }
386
389
  else if (isNumber(date) && !isNaN(date)) {
387
390
  parsedDate = new Date(+date);
@@ -517,7 +520,7 @@ var Plugin = /*#__PURE__*/function () {
517
520
  return Plugin;
518
521
  }();
519
522
 
520
- Plugin.version = "#3.4.0-next.1#";
523
+ Plugin.version = "#3.4.1#";
521
524
 
522
525
  /**
523
526
  * Copyright (c) 2017 ~ present NAVER Corp.
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.4.0-next.1
8
+ * @version 3.4.1
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -165,7 +165,7 @@ var Plugin = /*#__PURE__*/function () {
165
165
  return Plugin;
166
166
  }();
167
167
 
168
- Plugin.version = "#3.4.0-next.1#";
168
+ Plugin.version = "#3.4.1#";
169
169
 
170
170
  /**
171
171
  * Copyright (c) 2021 ~ present NAVER Corp.
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.4.0-next.1
8
+ * @version 3.4.1
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -296,7 +296,7 @@ var Plugin = /*#__PURE__*/function () {
296
296
  return Plugin;
297
297
  }();
298
298
 
299
- Plugin.version = "#3.4.0-next.1#";
299
+ Plugin.version = "#3.4.1#";
300
300
 
301
301
  /**
302
302
  * Copyright (c) 2017 ~ present NAVER Corp.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "billboard.js",
3
- "version": "3.4.0-next.1",
3
+ "version": "3.4.1",
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",
@@ -95,34 +95,34 @@
95
95
  "d3-zoom": "^3.0.0"
96
96
  },
97
97
  "devDependencies": {
98
- "@babel/core": "^7.17.7",
98
+ "@babel/core": "^7.17.9",
99
99
  "@babel/eslint-parser": "^7.17.0",
100
100
  "@babel/plugin-proposal-class-properties": "^7.16.7",
101
101
  "@babel/plugin-proposal-object-rest-spread": "^7.17.3",
102
102
  "@babel/plugin-transform-runtime": "^7.17.0",
103
103
  "@babel/preset-env": "^7.16.8",
104
104
  "@babel/preset-typescript": "^7.16.7",
105
- "@babel/runtime": "^7.17.7",
105
+ "@babel/runtime": "^7.17.9",
106
106
  "@commitlint/cli": "^15.0.0",
107
107
  "@commitlint/config-conventional": "^16.2.1",
108
108
  "@rollup/plugin-babel": "^5.3.1",
109
- "@rollup/plugin-node-resolve": "^13.1.3",
109
+ "@rollup/plugin-node-resolve": "^13.2.0",
110
110
  "@rollup/plugin-replace": "^4.0.0",
111
- "@rollup/plugin-typescript": "^8.3.1",
111
+ "@rollup/plugin-typescript": "^8.3.2",
112
112
  "@semantic-release/changelog": "^6.0.1",
113
113
  "@semantic-release/commit-analyzer": "^9.0.2",
114
114
  "@semantic-release/exec": "^6.0.3",
115
115
  "@semantic-release/git": "^10.0.1",
116
116
  "@semantic-release/npm": "^9.0.1",
117
117
  "@semantic-release/release-notes-generator": "^10.0.3",
118
- "@types/chai": "^4.3.0",
118
+ "@types/chai": "^4.3.1",
119
119
  "@types/d3": "^7.1.0",
120
120
  "@types/mocha": "^9.0.0",
121
121
  "@types/sinon": "^10.0.11",
122
- "@typescript-eslint/eslint-plugin": "^5.15.0",
123
- "@typescript-eslint/parser": "^5.15.0",
122
+ "@typescript-eslint/eslint-plugin": "^5.19.0",
123
+ "@typescript-eslint/parser": "^5.19.0",
124
124
  "babel-helper-modules": "^6.0.0",
125
- "babel-loader": "^8.2.3",
125
+ "babel-loader": "^8.2.4",
126
126
  "babel-plugin-add-module-exports": "^1.0.4",
127
127
  "babel-plugin-minify-constant-folding": "^0.5.0",
128
128
  "babel-plugin-minify-dead-code-elimination": "^0.5.1",
@@ -141,16 +141,16 @@
141
141
  "cross-env": "^7.0.3",
142
142
  "css-loader": "^6.7.1",
143
143
  "css-minimizer-webpack-plugin": "^3.3.1",
144
- "d3-color": "^3.0.1",
144
+ "d3-color": "^3.1.0",
145
145
  "d3-delaunay": "^6.0.2",
146
146
  "d3-format": "^3.1.0",
147
147
  "d3-polygon": "^3.0.1",
148
148
  "docdash": "^1.2.0",
149
149
  "dtslint": "^4.2.1",
150
- "eslint": "^8.11.0",
150
+ "eslint": "^8.13.0",
151
151
  "eslint-config-naver": "^2.1.0",
152
- "eslint-plugin-import": "^2.25.4",
153
- "eslint-plugin-jsdoc": "^38.0.4",
152
+ "eslint-plugin-import": "^2.26.0",
153
+ "eslint-plugin-jsdoc": "^39.2.1",
154
154
  "eslint-webpack-plugin": "^3.1.1",
155
155
  "exports-loader": "^3.1.0",
156
156
  "hammer-simulator": "0.0.1",
@@ -158,7 +158,7 @@
158
158
  "istanbul-instrumenter-loader": "^3.0.1",
159
159
  "istanbul-lib-instrument": "^5.1.0",
160
160
  "jsdoc": "^3.6.10",
161
- "karma": "^6.3.17",
161
+ "karma": "^6.3.18",
162
162
  "karma-chai": "^0.1.0",
163
163
  "karma-chrome-launcher": "^3.1.1",
164
164
  "karma-coverage-istanbul-reporter": "^3.0.3",
@@ -183,13 +183,13 @@
183
183
  "style-loader": "^3.3.1",
184
184
  "terser-webpack-plugin": "^5.3.1",
185
185
  "tslib": "^2.3.1",
186
- "typescript": "^4.6.2",
187
- "webpack": "^5.70.0",
186
+ "typescript": "^4.6.3",
187
+ "webpack": "^5.72.0",
188
188
  "webpack-bundle-analyzer": "^4.5.0",
189
189
  "webpack-clean": "^1.2.5",
190
190
  "webpack-cli": "^4.9.1",
191
191
  "webpack-common-shake": "^2.1.0",
192
- "webpack-dev-server": "^4.7.4",
192
+ "webpack-dev-server": "^4.8.1",
193
193
  "webpack-merge": "^5.8.0",
194
194
  "webpackbar": "^5.0.2",
195
195
  "write-file-webpack-plugin": "^4.5.1"