evui 3.4.110 → 3.4.111

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.
@@ -11164,7 +11164,7 @@ module.exports = exports;
11164
11164
  /***/ "9224":
11165
11165
  /***/ (function(module) {
11166
11166
 
11167
- module.exports = JSON.parse("{\"a\":\"3.4.110\"}");
11167
+ module.exports = JSON.parse("{\"a\":\"3.4.111\"}");
11168
11168
 
11169
11169
  /***/ }),
11170
11170
 
@@ -38820,9 +38820,9 @@ var modules = {
38820
38820
 
38821
38821
  if (series && sData) {
38822
38822
  if (series.isExistGrp && series.stackIndex && !series.isOverlapping) {
38823
- series.data = _this.addSeriesStackDS(sData, label, series.bsIds, series.stackIndex);
38823
+ series.data = _this.addSeriesStackDS(sData, label, series.bsIds, series.stackIndex, series.interpolation);
38824
38824
  } else {
38825
- series.data = _this.addSeriesDS(sData, label, series.isExistGrp);
38825
+ series.data = _this.addSeriesDS(sData, label, series.isExistGrp, series.interpolation);
38826
38826
  }
38827
38827
 
38828
38828
  series.minMax = _this.getSeriesMinMax(series.data);
@@ -39209,13 +39209,17 @@ var modules = {
39209
39209
  * @param {object} label chart label
39210
39210
  * @param {array} bsIds stacked base data ID List
39211
39211
  * @param {number} sIdx series ordered index
39212
+ * @param {import('./index').InterpolationType} interpolation interpolation type
39212
39213
  *
39213
- * @returns {array} data for each series
39214
+ * @typedef {import('./index').ChartSeriesDataPoint} ChartSeriesDataPoint
39215
+ *
39216
+ * @returns {ChartSeriesDataPoint[]} data for each series
39214
39217
  */
39215
39218
  addSeriesStackDS: function addSeriesStackDS(data, label, bsIds) {
39216
39219
  var _this4 = this;
39217
39220
 
39218
39221
  var sIdx = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
39222
+ var interpolation = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'none';
39219
39223
  var isHorizontal = this.options.horizontal;
39220
39224
  var sdata = [];
39221
39225
 
@@ -39262,15 +39266,14 @@ var modules = {
39262
39266
  if (oData != null) {
39263
39267
  gdata = bdata + oData;
39264
39268
  } else {
39265
- gdata = null;
39266
- bdata = 0;
39269
+ gdata = odata;
39267
39270
  }
39268
39271
  } else {
39269
39272
  bdata = 0;
39270
39273
  gdata = oData;
39271
39274
  }
39272
39275
 
39273
- sdata.push(_this4.addData(gdata, ldata, odata, bdata));
39276
+ sdata.push(_this4.addData(gdata, ldata, odata, bdata, interpolation));
39274
39277
  }
39275
39278
  });
39276
39279
  return sdata;
@@ -39281,13 +39284,17 @@ var modules = {
39281
39284
  * @param {object} data chart series info
39282
39285
  * @param {object} label chart label
39283
39286
  * @param {boolean} isBase is Base(bottommost) series at stack chart
39287
+ * @param {import('./index').InterpolationType} interpolation interpolation type
39288
+ *
39289
+ * @typedef {import('./index').ChartSeriesDataPoint} ChartSeriesDataPoint
39284
39290
  *
39285
- * @returns {array} data for each series
39291
+ * @returns {ChartSeriesDataPoint[]} data for each series
39286
39292
  */
39287
39293
  addSeriesDS: function addSeriesDS(data, label, isBase) {
39288
39294
  var _this$seriesList$Obje,
39289
39295
  _this5 = this;
39290
39296
 
39297
+ var interpolation = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'none';
39291
39298
  var isHorizontal = this.options.horizontal;
39292
39299
  var sdata = [];
39293
39300
  var passingValue = (_this$seriesList$Obje = this.seriesList[Object.keys(this.seriesList)[0]]) === null || _this$seriesList$Obje === void 0 ? void 0 : _this$seriesList$Obje.passingValue;
@@ -39302,7 +39309,7 @@ var modules = {
39302
39309
 
39303
39310
  if (ldata !== null) {
39304
39311
  var isPassingValueWithStack = isBase && !helpers_util.isNullOrUndefined(passingValue) && gdata === passingValue;
39305
- sdata.push(_this5.addData(isPassingValueWithStack ? 0 : gdata, ldata, gdata));
39312
+ sdata.push(_this5.addData(isPassingValueWithStack ? 0 : gdata, ldata, gdata, null, interpolation));
39306
39313
  }
39307
39314
  });
39308
39315
  return sdata;
@@ -39359,13 +39366,18 @@ var modules = {
39359
39366
  * @param {object} ldata label data (x-axis value for vertical chart)
39360
39367
  * @param {object} odata original data (without stacked value)
39361
39368
  * @param {object} bdata base data (stacked value)
39362
- * @returns {object} data for each graph point
39369
+ * @param {import('./index').InterpolationType} interpolation interpolation type
39370
+ *
39371
+ * @typedef {import('./index').ChartSeriesDataPoint} ChartSeriesDataPoint
39372
+ *
39373
+ * @returns {ChartSeriesDataPoint} data for each graph point
39363
39374
  */
39364
39375
  addData: function addData(gdata, ldata) {
39365
39376
  var _gdataColor;
39366
39377
 
39367
39378
  var odata = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
39368
39379
  var bdata = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
39380
+ var interpolation = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'none';
39369
39381
  var data;
39370
39382
  var gdataValue = null;
39371
39383
  var odataValue = null;
@@ -39378,7 +39390,7 @@ var modules = {
39378
39390
  gdataColor = gdata.color;
39379
39391
  dataTextColor = gdata.textColor;
39380
39392
  } else {
39381
- gdataValue = gdata !== null && gdata !== void 0 ? gdata : null;
39393
+ gdataValue = interpolation === 'zero' && !gdata ? bdata !== null && bdata !== void 0 ? bdata : 0 : gdata !== null && gdata !== void 0 ? gdata : null;
39382
39394
  }
39383
39395
 
39384
39396
  if (odata !== null && _typeof(odata) === 'object') {
@@ -39935,12 +39947,18 @@ var modules = {
39935
39947
  return result;
39936
39948
  },
39937
39949
 
39950
+ /**
39951
+ * @typedef {Object} LabelInfoResult
39952
+ * @property {number} labelIndex - 선택된 라벨의 인덱스
39953
+ * @property {object} hitInfo - 해당 위치에서의 히트 정보 (getItemByPosition 반환값)
39954
+ */
39955
+
39938
39956
  /**
39939
39957
  * Find label info by position x and y
39940
39958
  * @param {array} offset position x and y
39941
39959
  * @param {string | null} targetAxis target Axis Location ('xAxis', 'yAxis' , null)
39942
39960
  *
39943
- * @returns {object} clicked label information
39961
+ * @returns {LabelInfoResult} clicked label information
39944
39962
  */
39945
39963
  getLabelInfoByPosition: function getLabelInfoByPosition(offset, targetAxis) {
39946
39964
  var _Object$values$sort$, _Object$values$sort$2, _scrollbarOpt, _scale, _scale$labels, _scale3, _scale3$labels;
@@ -40047,11 +40065,14 @@ var modules = {
40047
40065
 
40048
40066
  /**
40049
40067
  * Get current mouse target label value in label array or calculated using mouse position
40068
+ *
40069
+ * @typedef {import('./index').MouseLabelValue} MouseLabelValue
40070
+ *
40050
40071
  * @param {string} targetAxis target Axis Location ('xAxis', 'yAxis')
40051
40072
  * @param {array} offset return value from getMousePosition()
40052
40073
  * @param {number} labelIndex
40053
40074
  *
40054
- * @returns {object} current mouse target label value
40075
+ * @returns {MouseLabelValue} current mouse target label value
40055
40076
  */
40056
40077
  getCurMouseLabelVal: function getCurMouseLabelVal(targetAxis, offset, labelIndex) {
40057
40078
  var _this9 = this;
@@ -41081,6 +41102,57 @@ var defaultsDeep = _baseRest(function(args) {
41081
41102
 
41082
41103
  /* harmony default export */ var lodash_es_defaultsDeep = (defaultsDeep);
41083
41104
 
41105
+ // CONCATENATED MODULE: ./node_modules/lodash-es/isUndefined.js
41106
+ /**
41107
+ * Checks if `value` is `undefined`.
41108
+ *
41109
+ * @static
41110
+ * @since 0.1.0
41111
+ * @memberOf _
41112
+ * @category Lang
41113
+ * @param {*} value The value to check.
41114
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
41115
+ * @example
41116
+ *
41117
+ * _.isUndefined(void 0);
41118
+ * // => true
41119
+ *
41120
+ * _.isUndefined(null);
41121
+ * // => false
41122
+ */
41123
+ function isUndefined(value) {
41124
+ return value === undefined;
41125
+ }
41126
+
41127
+ /* harmony default export */ var lodash_es_isUndefined = (isUndefined);
41128
+
41129
+ // CONCATENATED MODULE: ./node_modules/lodash-es/isNil.js
41130
+ /**
41131
+ * Checks if `value` is `null` or `undefined`.
41132
+ *
41133
+ * @static
41134
+ * @memberOf _
41135
+ * @since 4.0.0
41136
+ * @category Lang
41137
+ * @param {*} value The value to check.
41138
+ * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
41139
+ * @example
41140
+ *
41141
+ * _.isNil(null);
41142
+ * // => true
41143
+ *
41144
+ * _.isNil(void 0);
41145
+ * // => true
41146
+ *
41147
+ * _.isNil(NaN);
41148
+ * // => false
41149
+ */
41150
+ function isNil(value) {
41151
+ return value == null;
41152
+ }
41153
+
41154
+ /* harmony default export */ var lodash_es_isNil = (isNil);
41155
+
41084
41156
  // CONCATENATED MODULE: ./src/components/chart/helpers/helpers.constant.js
41085
41157
  var AXIS_UNITS = {
41086
41158
  x: {
@@ -41128,7 +41200,8 @@ var LINE_OPTION = {
41128
41200
  fill: false,
41129
41201
  fillOpacity: 0.4,
41130
41202
  showLegend: true,
41131
- passingValue: null
41203
+ passingValue: null,
41204
+ interpolation: 'none'
41132
41205
  };
41133
41206
  var BAR_OPTION = {
41134
41207
  show: true,
@@ -41315,13 +41388,13 @@ var TIME_INTERVALS = {
41315
41388
  /* harmony default export */ var helpers_canvas = ({
41316
41389
  /**
41317
41390
  * Calculate X position
41318
- * @param {any} value graph value
41391
+ * @param {number|null|undefined} value graph value
41319
41392
  * @param {number} min min value
41320
41393
  * @param {number} max max value
41321
41394
  * @param {number} area height for axis
41322
41395
  * @param {number} startPoint startPoint
41323
41396
  *
41324
- * @returns {any} position
41397
+ * @returns {number|null} position
41325
41398
  */
41326
41399
  calculateX: function calculateX(value, min, max, area) {
41327
41400
  var startPoint = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
@@ -41361,13 +41434,13 @@ var TIME_INTERVALS = {
41361
41434
 
41362
41435
  /**
41363
41436
  * Calculate Y position
41364
- * @param {any} value graph value
41437
+ * @param {number|null|undefined} value graph value
41365
41438
  * @param {number} min min value
41366
41439
  * @param {number} max max value
41367
41440
  * @param {number} area height for axis
41368
41441
  * @param {number} startPoint startPoint
41369
41442
  *
41370
- * @returns {any} position
41443
+ * @returns {number|null} position
41371
41444
  */
41372
41445
  calculateY: function calculateY(value, min, max, area) {
41373
41446
  var startPoint = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
@@ -41615,7 +41688,6 @@ var TIME_INTERVALS = {
41615
41688
 
41616
41689
 
41617
41690
 
41618
-
41619
41691
  var element_line_Line = /*#__PURE__*/function () {
41620
41692
  function Line(sId, opt, sIdx) {
41621
41693
  var _this = this;
@@ -41652,6 +41724,8 @@ var element_line_Line = /*#__PURE__*/function () {
41652
41724
  lineWidth: 2
41653
41725
  }
41654
41726
  };
41727
+ /** @type {import('../model/index').ChartSeriesDataPoint[]} */
41728
+
41655
41729
  this.data = [];
41656
41730
  this.beforeMouseXp = 0;
41657
41731
  this.beforeMouseYp = 0;
@@ -41659,11 +41733,23 @@ var element_line_Line = /*#__PURE__*/function () {
41659
41733
  this.size = {
41660
41734
  comboOffset: 0
41661
41735
  };
41662
- this.usePassingValue = !!this.passingValue;
41736
+ this.usePassingValue = !lodash_es_isUndefined(this.passingValue) && this.interpolation === 'linear';
41663
41737
  }
41738
+ /**
41739
+ * @typedef {Object} LineDrawParam
41740
+ * @property {CanvasRenderingContext2D} ctx - 캔버스 렌더링 컨텍스트
41741
+ * @property {object} chartRect - 차트 영역 정보
41742
+ * @property {object} labelOffset - 라벨 오프셋 정보
41743
+ * @property {object} axesSteps - 축 스텝 정보
41744
+ * @property {object} [selectLabel] - 선택된 라벨 정보
41745
+ * @property {object} [selectSeries] - 선택된 시리즈 정보
41746
+ * @property {object} [legendHitInfo] - 범례 히트 정보
41747
+ * @property {boolean} [isBrush] - 브러시 사용 여부
41748
+ */
41749
+
41664
41750
  /**
41665
41751
  * Draw series data
41666
- * @param {object} param object for drawing series data
41752
+ * @param {LineDrawParam} param object for drawing series data
41667
41753
  *
41668
41754
  * @returns {undefined}
41669
41755
  */
@@ -41732,8 +41818,6 @@ var element_line_Line = /*#__PURE__*/function () {
41732
41818
  }
41733
41819
 
41734
41820
  var endPoint = chartRect.y2 - labelOffset.bottom;
41735
- var x;
41736
- var y;
41737
41821
  var barAreaByCombo = 0;
41738
41822
  var minmaxX = axesSteps.x[this.xAxisIndex];
41739
41823
  var minmaxY = axesSteps.y[this.yAxisIndex];
@@ -41758,51 +41842,40 @@ var element_line_Line = /*#__PURE__*/function () {
41758
41842
  }; // draw line
41759
41843
 
41760
41844
 
41761
- var needCutoff = false;
41762
- this.data.reduce(function (prev, curr) {
41763
- x = getXPos(curr.x);
41764
- y = getYPos(curr.y);
41845
+ var prevValid;
41846
+ this.data.forEach(function (curr) {
41847
+ var _prevValid, _prevValid2, _prevValid3;
41765
41848
 
41766
- if (x !== null) {
41767
- x += helpers_util.aliasPixel(x);
41768
- }
41849
+ var x = getXPos(curr.x);
41850
+ var y = getYPos(curr.y);
41769
41851
 
41770
- if (_this2.usePassingValue) {
41771
- if (curr.o === _this2.passingValue) {
41772
- y = getYPos(prev.y);
41852
+ if (_this2.isExistGrp && _this2.usePassingValue && curr.o === _this2.passingValue) {
41853
+ var _curr$b;
41773
41854
 
41774
- if (prev.o === null) {
41775
- needCutoff = true;
41776
- }
41855
+ y = getYPos((_curr$b = curr.b) !== null && _curr$b !== void 0 ? _curr$b : 0);
41856
+ }
41777
41857
 
41778
- if (_this2.isExistGrp && !needCutoff) {
41779
- var _curr$b;
41858
+ if (x !== null) {
41859
+ x += helpers_util.aliasPixel(x);
41860
+ }
41780
41861
 
41781
- y = getYPos((_curr$b = curr.b) !== null && _curr$b !== void 0 ? _curr$b : 0);
41782
- ctx.lineTo(x, y);
41783
- }
41862
+ curr.xp = x;
41863
+ curr.yp = y;
41784
41864
 
41785
- curr.xp = x;
41786
- curr.yp = y;
41787
- return curr;
41865
+ if (_this2.usePassingValue && curr.o === _this2.passingValue) {
41866
+ if (!_this2.isExistGrp) {
41867
+ return;
41788
41868
  }
41789
41869
  }
41790
41870
 
41791
- var isNullValue = helpers_util.isNullOrUndefined(prev.o) || helpers_util.isNullOrUndefined(curr.o) || helpers_util.isNullOrUndefined(curr.x) || helpers_util.isNullOrUndefined(curr.y);
41792
-
41793
- if (isNullValue || needCutoff) {
41871
+ if (lodash_es_isNil((_prevValid = prevValid) === null || _prevValid === void 0 ? void 0 : _prevValid.y) && _this2.usePassingValue && _this2.passingValue !== ((_prevValid2 = prevValid) === null || _prevValid2 === void 0 ? void 0 : _prevValid2.o) || !_this2.usePassingValue && lodash_es_isNil(curr.o) && _this2.interpolation !== 'zero' || !_this2.usePassingValue && lodash_es_isNil((_prevValid3 = prevValid) === null || _prevValid3 === void 0 ? void 0 : _prevValid3.y) || lodash_es_isNil(curr.o) && curr.y == null && _this2.passingValue !== curr.o) {
41794
41872
  ctx.moveTo(x, y);
41795
- needCutoff = false;
41796
41873
  } else {
41797
41874
  ctx.lineTo(x, y);
41798
41875
  }
41799
41876
 
41800
- curr.xp = x; // eslint-disable-line
41801
-
41802
- curr.yp = y; // eslint-disable-line
41803
-
41804
- return curr;
41805
- }, this.data[0]);
41877
+ prevValid = curr;
41878
+ });
41806
41879
  ctx.stroke();
41807
41880
 
41808
41881
  if (this.segments) {
@@ -41842,20 +41915,24 @@ var element_line_Line = /*#__PURE__*/function () {
41842
41915
  var valueArray = this.data.map(function (item) {
41843
41916
  return item === null || item === void 0 ? void 0 : item.o;
41844
41917
  });
41918
+ /** @type {Array<[number, number]>} */
41919
+
41845
41920
  var needFillDataIndexList = [];
41846
41921
 
41847
41922
  for (var i = 0; i < valueArray.length + 1; i++) {
41848
- if (helpers_util.isNullOrUndefined(valueArray[i])) {
41923
+ var isNoneInterpolation = this.interpolation === 'none' || this.usePassingValue && this.passingValue !== null;
41924
+
41925
+ if (isNoneInterpolation ? lodash_es_isNil(valueArray[i]) : lodash_es_isUndefined(valueArray[i])) {
41849
41926
  if (start !== null && end !== null) {
41850
41927
  var temp = valueArray.slice(start, i);
41851
41928
  var lastNormalValueIndex = temp.findLastIndex(function (item) {
41852
- return item !== helpers_util.isNullOrUndefined(item) && item !== _this2.passingValue;
41929
+ return !lodash_es_isNil(item) && item !== _this2.passingValue;
41853
41930
  });
41854
41931
  needFillDataIndexList.push([start, start + lastNormalValueIndex]);
41855
41932
  start = null;
41856
41933
  end = null;
41857
41934
  }
41858
- } else if (valueArray[i] === this.passingValue) {
41935
+ } else if (this.usePassingValue && valueArray[i] === this.passingValue) {
41859
41936
  end = i;
41860
41937
  } else {
41861
41938
  start = start === null ? i : start;
@@ -41885,7 +41962,7 @@ var element_line_Line = /*#__PURE__*/function () {
41885
41962
 
41886
41963
  if (ix === startIndex) {
41887
41964
  ctx.moveTo(currData.xp, currData.yp);
41888
- } else if (_this2.isExistGrp || _this2.passingValue !== currData.o) {
41965
+ } else if (_this2.isExistGrp || _this2.passingValue !== currData.o || _this2.interpolation === 'zero' && lodash_es_isNil(currData.o)) {
41889
41966
  ctx.lineTo(currData.xp, currData.yp);
41890
41967
  }
41891
41968
 
@@ -44742,6 +44819,47 @@ var model_series_modules = {
44742
44819
  Store: model_store,
44743
44820
  Series: model_series
44744
44821
  });
44822
+ /**
44823
+ * @typedef {Object} ChartDOMSize
44824
+ * @property {number} width - 차트 DOM의 너비
44825
+ * @property {number} height - 차트 DOM의 높이
44826
+ */
44827
+
44828
+ /**
44829
+ * @typedef {Object} ChartRect
44830
+ * @property {number} x1 - 차트 영역의 시작 X 좌표
44831
+ * @property {number} x2 - 차트 영역의 끝 X 좌표
44832
+ * @property {number} y1 - 차트 영역의 시작 Y 좌표
44833
+ * @property {number} y2 - 차트 영역의 끝 Y 좌표
44834
+ * @property {number} chartWidth - 실제 차트 그리기 영역의 너비
44835
+ * @property {number} chartHeight - 실제 차트 그리기 영역의 높이
44836
+ * @property {number} width - 전체 차트 컨테이너의 너비
44837
+ * @property {number} height - 전체 차트 컨테이너의 높이
44838
+ */
44839
+
44840
+ /**
44841
+ * @typedef {Object} MouseLabelValue
44842
+ * @property {string|number} labelVal - 마우스 위치에 해당하는 라벨 값
44843
+ * @property {number} labelIdx - 라벨 인덱스 (없으면 -1)
44844
+ */
44845
+
44846
+ /**
44847
+ * @typedef {Object} ChartSeriesDataPoint
44848
+ * @property {number|null} x - x축 값 또는 라벨
44849
+ * @property {number|null} y - y축 값 또는 데이터 값
44850
+ * @property {number|null} o - 원본 데이터 값
44851
+ * @property {number|null} b - 스택형 차트의 베이스 값
44852
+ * @property {number|null} xp - x좌표 위치(픽셀 등)
44853
+ * @property {number|null} yp - y좌표 위치(픽셀 등)
44854
+ * @property {number|null} w - 너비
44855
+ * @property {number|null} h - 높이
44856
+ * @property {string|null} dataColor - 데이터 색상
44857
+ * @property {string|null} dataTextColor - 텍스트 색상
44858
+ */
44859
+
44860
+ /**
44861
+ * @typedef {'none' | 'linear' | 'zero'} InterpolationType
44862
+ */
44745
44863
  // CONCATENATED MODULE: ./src/components/chart/scale/scale.js
44746
44864
 
44747
44865
 
@@ -51228,7 +51346,7 @@ var plugins_interaction_modules = {
51228
51346
  if (item !== null && item !== void 0 && item.data) {
51229
51347
  var gdata = void 0;
51230
51348
 
51231
- if (item.data.o === null) {
51349
+ if (item.data.o === null && series.interpolation !== 'zero') {
51232
51350
  if (!series.isExistGrp) {
51233
51351
  gdata = isHorizontal ? item.data.x : item.data.y;
51234
51352
  }
@@ -54535,8 +54653,9 @@ var chart_core_EvChart = /*#__PURE__*/function () {
54535
54653
  }
54536
54654
  /**
54537
54655
  * Get chart DOM size and set canvas size
54656
+ * @typedef {import('./model/index').ChartDOMSize} ChartDOMSize
54538
54657
  *
54539
- * @returns {object} chart size information
54658
+ * @returns {ChartDOMSize} chart size information
54540
54659
  */
54541
54660
 
54542
54661
  }, {
@@ -54556,8 +54675,9 @@ var chart_core_EvChart = /*#__PURE__*/function () {
54556
54675
  }
54557
54676
  /**
54558
54677
  * Calculate chart size
54678
+ * @typedef {import('./model/index').ChartRect} ChartRect
54559
54679
  *
54560
- * @returns {object} chart size information
54680
+ * @returns {ChartRect} chart size information
54561
54681
  */
54562
54682
 
54563
54683
  }, {