@wcardinal/wcardinal-ui 0.292.0 → 0.294.0

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/types/wcardinal/ui/d-chart-axis-bar.d.ts +1 -1
  2. package/dist/types/wcardinal/ui/d-chart-axis-base-bar.d.ts +1 -1
  3. package/dist/types/wcardinal/ui/d-chart-axis-base-options-parser.d.ts +6 -12
  4. package/dist/types/wcardinal/ui/d-chart-axis-base-options.d.ts +1 -1
  5. package/dist/types/wcardinal/ui/d-chart-axis-base-tick-container.d.ts +1 -1
  6. package/dist/types/wcardinal/ui/d-chart-axis-base-tick-major-gridline.d.ts +1 -1
  7. package/dist/types/wcardinal/ui/d-chart-axis-base-tick-major.d.ts +1 -1
  8. package/dist/types/wcardinal/ui/d-chart-axis-base-tick-minor.d.ts +1 -1
  9. package/dist/types/wcardinal/ui/d-chart-axis-base.d.ts +5 -1
  10. package/dist/types/wcardinal/ui/d-chart-axis-tick-container.d.ts +1 -1
  11. package/dist/types/wcardinal/ui/d-chart-axis-tick-major-gridline.d.ts +1 -1
  12. package/dist/types/wcardinal/ui/d-chart-axis-tick-major.d.ts +1 -1
  13. package/dist/types/wcardinal/ui/d-chart-axis-tick-minor.d.ts +1 -1
  14. package/dist/types/wcardinal/ui/d-chart-axis-x-datetime.d.ts +1 -1
  15. package/dist/types/wcardinal/ui/d-chart-axis-x.d.ts +1 -1
  16. package/dist/types/wcardinal/ui/d-chart-axis-y.d.ts +1 -1
  17. package/dist/types/wcardinal/ui/d-chart-axis.d.ts +3 -1
  18. package/dist/types/wcardinal/ui/d-chart-series-base.d.ts +1 -0
  19. package/dist/types/wcardinal/ui/d-chart-series-container-impl.d.ts +1 -0
  20. package/dist/types/wcardinal/ui/d-chart-series-line-of-any.d.ts +3 -1
  21. package/dist/types/wcardinal/ui/d-chart-series-line.d.ts +3 -1
  22. package/dist/types/wcardinal/ui/d-chart-series-linear.d.ts +3 -1
  23. package/dist/types/wcardinal/ui/d-chart-series.d.ts +1 -0
  24. package/dist/wcardinal/ui/d-chart-axis-bar.js.map +1 -1
  25. package/dist/wcardinal/ui/d-chart-axis-base-bar.js.map +1 -1
  26. package/dist/wcardinal/ui/d-chart-axis-base-options-parser.js +10 -52
  27. package/dist/wcardinal/ui/d-chart-axis-base-options-parser.js.map +1 -1
  28. package/dist/wcardinal/ui/d-chart-axis-base-options.js.map +1 -1
  29. package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js +4 -4
  30. package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js.map +1 -1
  31. package/dist/wcardinal/ui/d-chart-axis-base-tick-major-gridline.js.map +1 -1
  32. package/dist/wcardinal/ui/d-chart-axis-base-tick-major.js.map +1 -1
  33. package/dist/wcardinal/ui/d-chart-axis-base-tick-minor.js.map +1 -1
  34. package/dist/wcardinal/ui/d-chart-axis-base.js +23 -7
  35. package/dist/wcardinal/ui/d-chart-axis-base.js.map +1 -1
  36. package/dist/wcardinal/ui/d-chart-axis-tick-container.js.map +1 -1
  37. package/dist/wcardinal/ui/d-chart-axis-tick-major-gridline.js.map +1 -1
  38. package/dist/wcardinal/ui/d-chart-axis-tick-major.js.map +1 -1
  39. package/dist/wcardinal/ui/d-chart-axis-tick-minor.js.map +1 -1
  40. package/dist/wcardinal/ui/d-chart-axis-x-datetime.js.map +1 -1
  41. package/dist/wcardinal/ui/d-chart-axis-x.js.map +1 -1
  42. package/dist/wcardinal/ui/d-chart-axis-y.js.map +1 -1
  43. package/dist/wcardinal/ui/d-chart-axis.js.map +1 -1
  44. package/dist/wcardinal/ui/d-chart-plot-area-impl.js +2 -4
  45. package/dist/wcardinal/ui/d-chart-plot-area-impl.js.map +1 -1
  46. package/dist/wcardinal/ui/d-chart-series-base.js.map +1 -1
  47. package/dist/wcardinal/ui/d-chart-series-container-impl.js +10 -0
  48. package/dist/wcardinal/ui/d-chart-series-container-impl.js.map +1 -1
  49. package/dist/wcardinal/ui/d-chart-series-line-of-any.js +15 -4
  50. package/dist/wcardinal/ui/d-chart-series-line-of-any.js.map +1 -1
  51. package/dist/wcardinal/ui/d-chart-series-line.js +15 -4
  52. package/dist/wcardinal/ui/d-chart-series-line.js.map +1 -1
  53. package/dist/wcardinal/ui/d-chart-series-linear.js +15 -4
  54. package/dist/wcardinal/ui/d-chart-series-linear.js.map +1 -1
  55. package/dist/wcardinal/ui/d-chart-series.js.map +1 -1
  56. package/dist/wcardinal-ui-theme-dark.js +1 -1
  57. package/dist/wcardinal-ui-theme-dark.min.js +1 -1
  58. package/dist/wcardinal-ui-theme-white.js +1 -1
  59. package/dist/wcardinal-ui-theme-white.min.js +1 -1
  60. package/dist/wcardinal-ui.cjs.js +95 -80
  61. package/dist/wcardinal-ui.js +95 -80
  62. package/dist/wcardinal-ui.min.js +2 -2
  63. package/dist/wcardinal-ui.min.js.map +1 -1
  64. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.292.0
2
+ Winter Cardinal UI v0.294.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -72588,55 +72588,13 @@ var DChartAxisBaseBar = /** @class */ (function () {
72588
72588
  var DChartAxisBaseOptionParser = /** @class */ (function () {
72589
72589
  function DChartAxisBaseOptionParser(theme, options) {
72590
72590
  var _a, _b;
72591
- this._coordinateIndex = (_a = options === null || options === void 0 ? void 0 : options.coordinate) !== null && _a !== void 0 ? _a : 0;
72592
- this._position = this.toPosition(theme, options);
72593
- this._tick = this.toTick(theme, options);
72594
- this._label = this.toLabel(theme, options);
72595
- this._padding = (_b = options === null || options === void 0 ? void 0 : options.padding) !== null && _b !== void 0 ? _b : theme.getPadding();
72596
- this._bar = this.toBar(theme, options);
72591
+ this.coordinate = (_a = options === null || options === void 0 ? void 0 : options.coordinate) !== null && _a !== void 0 ? _a : 0;
72592
+ this.position = this.toPosition(theme, options);
72593
+ this.tick = this.toTick(theme, options);
72594
+ this.label = this.toLabel(theme, options);
72595
+ this.padding = (_b = options === null || options === void 0 ? void 0 : options.padding) !== null && _b !== void 0 ? _b : theme.getPadding();
72596
+ this.bar = this.toBar(theme, options);
72597
72597
  }
72598
- Object.defineProperty(DChartAxisBaseOptionParser.prototype, "coordinateIndex", {
72599
- get: function () {
72600
- return this._coordinateIndex;
72601
- },
72602
- enumerable: false,
72603
- configurable: true
72604
- });
72605
- Object.defineProperty(DChartAxisBaseOptionParser.prototype, "padding", {
72606
- get: function () {
72607
- return this._padding;
72608
- },
72609
- enumerable: false,
72610
- configurable: true
72611
- });
72612
- Object.defineProperty(DChartAxisBaseOptionParser.prototype, "position", {
72613
- get: function () {
72614
- return this._position;
72615
- },
72616
- enumerable: false,
72617
- configurable: true
72618
- });
72619
- Object.defineProperty(DChartAxisBaseOptionParser.prototype, "bar", {
72620
- get: function () {
72621
- return this._bar;
72622
- },
72623
- enumerable: false,
72624
- configurable: true
72625
- });
72626
- Object.defineProperty(DChartAxisBaseOptionParser.prototype, "tick", {
72627
- get: function () {
72628
- return this._tick;
72629
- },
72630
- enumerable: false,
72631
- configurable: true
72632
- });
72633
- Object.defineProperty(DChartAxisBaseOptionParser.prototype, "label", {
72634
- get: function () {
72635
- return this._label;
72636
- },
72637
- enumerable: false,
72638
- configurable: true
72639
- });
72640
72598
  DChartAxisBaseOptionParser.prototype.toPosition = function (theme, options) {
72641
72599
  var position = options === null || options === void 0 ? void 0 : options.position;
72642
72600
  if (isString(position)) {
@@ -72696,7 +72654,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
72696
72654
  };
72697
72655
  };
72698
72656
  DChartAxisBaseOptionParser.prototype.toTickPosition = function (tickPosition) {
72699
- var position = this._position;
72657
+ var position = this.position;
72700
72658
  if (tickPosition === DChartAxisTickPosition.OUTSIDE || tickPosition === "OUTSIDE") {
72701
72659
  switch (position) {
72702
72660
  case DChartAxisPosition.TOP:
@@ -72872,7 +72830,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
72872
72830
  };
72873
72831
  DChartAxisBaseOptionParser.prototype.toTickMajorTextAlign = function (theme, options) {
72874
72832
  var _a, _b;
72875
- var position = this._position;
72833
+ var position = this.position;
72876
72834
  return {
72877
72835
  horizontal: (_a = options === null || options === void 0 ? void 0 : options.horizontal) !== null && _a !== void 0 ? _a : theme.getMajorTickTextAlignHorizontal(position),
72878
72836
  vertical: (_b = options === null || options === void 0 ? void 0 : options.vertical) !== null && _b !== void 0 ? _b : theme.getMajorTickTextAlignVertical(position)
@@ -72963,7 +72921,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
72963
72921
  };
72964
72922
  DChartAxisBaseOptionParser.prototype.toTickMinorTextAlign = function (theme, options) {
72965
72923
  var _a, _b;
72966
- var position = this._position;
72924
+ var position = this.position;
72967
72925
  return {
72968
72926
  horizontal: (_a = options === null || options === void 0 ? void 0 : options.horizontal) !== null && _a !== void 0 ? _a : theme.getMinorTickTextAlignHorizontal(position),
72969
72927
  vertical: (_b = options === null || options === void 0 ? void 0 : options.vertical) !== null && _b !== void 0 ? _b : theme.getMinorTickTextAlignVertical(position)
@@ -73031,7 +72989,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
73031
72989
  };
73032
72990
  DChartAxisBaseOptionParser.prototype.toLabelAlign = function (theme, options) {
73033
72991
  var _a, _b;
73034
- var position = this._position;
72992
+ var position = this.position;
73035
72993
  return {
73036
72994
  horizontal: (_a = options === null || options === void 0 ? void 0 : options.horizontal) !== null && _a !== void 0 ? _a : theme.getLabelAlignHorizontal(position),
73037
72995
  vertical: (_b = options === null || options === void 0 ? void 0 : options.vertical) !== null && _b !== void 0 ? _b : theme.getLabelAlignVertical(position)
@@ -73360,7 +73318,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
73360
73318
  var coordinate = void 0;
73361
73319
  switch (parser.position) {
73362
73320
  case DChartAxisPosition.TOP:
73363
- coordinate = plotArea.coordinate.x.get(parser.coordinateIndex);
73321
+ coordinate = plotArea.coordinate.x.get(parser.coordinate);
73364
73322
  if (coordinate) {
73365
73323
  var domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.x));
73366
73324
  var domainTo = coordinate.unmap(coordinate.transform.unmap(bounds.x + bounds.width));
@@ -73369,7 +73327,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
73369
73327
  }
73370
73328
  break;
73371
73329
  case DChartAxisPosition.BOTTOM:
73372
- coordinate = plotArea.coordinate.x.get(parser.coordinateIndex);
73330
+ coordinate = plotArea.coordinate.x.get(parser.coordinate);
73373
73331
  if (coordinate) {
73374
73332
  var domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.x));
73375
73333
  var domainTo = coordinate.unmap(coordinate.transform.unmap(bounds.x + bounds.width));
@@ -73378,7 +73336,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
73378
73336
  }
73379
73337
  break;
73380
73338
  case DChartAxisPosition.LEFT:
73381
- coordinate = plotArea.coordinate.y.get(parser.coordinateIndex);
73339
+ coordinate = plotArea.coordinate.y.get(parser.coordinate);
73382
73340
  if (coordinate) {
73383
73341
  var domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.y));
73384
73342
  var domainTo = coordinate.unmap(coordinate.transform.unmap(bounds.y + bounds.height));
@@ -73387,7 +73345,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
73387
73345
  }
73388
73346
  break;
73389
73347
  case DChartAxisPosition.RIGHT:
73390
- coordinate = plotArea.coordinate.y.get(parser.coordinateIndex);
73348
+ coordinate = plotArea.coordinate.y.get(parser.coordinate);
73391
73349
  if (coordinate) {
73392
73350
  var domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.y));
73393
73351
  var domainTo = coordinate.unmap(coordinate.transform.unmap(bounds.y + bounds.height));
@@ -73561,13 +73519,6 @@ var DChartAxisBase = /** @class */ (function () {
73561
73519
  this._bar = this.newBar(parser, theme, options);
73562
73520
  this._tick = this.newTick(parser, theme, options);
73563
73521
  }
73564
- Object.defineProperty(DChartAxisBase.prototype, "parser", {
73565
- get: function () {
73566
- return this._parser;
73567
- },
73568
- enumerable: false,
73569
- configurable: true
73570
- });
73571
73522
  DChartAxisBase.prototype.newParser = function (theme, options) {
73572
73523
  return new DChartAxisBaseOptionParser(theme, options);
73573
73524
  };
@@ -73575,6 +73526,29 @@ var DChartAxisBase = /** @class */ (function () {
73575
73526
  get: function () {
73576
73527
  return this._parser.position;
73577
73528
  },
73529
+ set: function (position) {
73530
+ this._parser.position = position;
73531
+ },
73532
+ enumerable: false,
73533
+ configurable: true
73534
+ });
73535
+ Object.defineProperty(DChartAxisBase.prototype, "coordinate", {
73536
+ get: function () {
73537
+ return this._parser.coordinate;
73538
+ },
73539
+ set: function (coordinate) {
73540
+ this._parser.coordinate = coordinate;
73541
+ },
73542
+ enumerable: false,
73543
+ configurable: true
73544
+ });
73545
+ Object.defineProperty(DChartAxisBase.prototype, "padding", {
73546
+ get: function () {
73547
+ return this._parser.padding;
73548
+ },
73549
+ set: function (padding) {
73550
+ this._parser.padding = padding;
73551
+ },
73578
73552
  enumerable: false,
73579
73553
  configurable: true
73580
73554
  });
@@ -75041,6 +75015,16 @@ var DChartSeriesContainerImpl = /** @class */ (function () {
75041
75015
  selection.update();
75042
75016
  }
75043
75017
  };
75018
+ DChartSeriesContainerImpl.prototype.onRender = function () {
75019
+ var list = this._list;
75020
+ for (var i = 0, imax = list.length; i < imax; ++i) {
75021
+ list[i].onRender();
75022
+ }
75023
+ var selection = this._selection;
75024
+ if (selection) {
75025
+ selection.onRender();
75026
+ }
75027
+ };
75044
75028
  DChartSeriesContainerImpl.prototype.add = function (series) {
75045
75029
  var list = this._list;
75046
75030
  series.bind(this, list.length);
@@ -75283,11 +75267,9 @@ var DChartPlotAreaImpl = /** @class */ (function (_super) {
75283
75267
  DChartPlotAreaImpl.prototype.render = function (renderer) {
75284
75268
  if (this._isViewDirty) {
75285
75269
  this._isViewDirty = false;
75270
+ this._coordinate.fit();
75286
75271
  this._axis.onRender();
75287
- var selection = this._series.selection;
75288
- if (selection) {
75289
- selection.onRender();
75290
- }
75272
+ this._series.onRender();
75291
75273
  }
75292
75274
  _super.prototype.render.call(this, renderer);
75293
75275
  };
@@ -76286,6 +76268,14 @@ var DChartSeriesLineOfAny = /** @class */ (function (_super) {
76286
76268
  return this;
76287
76269
  };
76288
76270
  DChartSeriesLineOfAny.prototype.update = function () {
76271
+ this.doUpdate(true);
76272
+ return this;
76273
+ };
76274
+ DChartSeriesLineOfAny.prototype.onRender = function () {
76275
+ this.doUpdate(false);
76276
+ return this;
76277
+ };
76278
+ DChartSeriesLineOfAny.prototype.doUpdate = function (render) {
76289
76279
  var line = this._line;
76290
76280
  if (line) {
76291
76281
  var coordinate = this._coordinate;
@@ -76298,13 +76288,17 @@ var DChartSeriesLineOfAny = /** @class */ (function (_super) {
76298
76288
  var isCoordinateTransformChanged = coordinate.isTransformDirty(coordinateX, coordinateY);
76299
76289
  if (isPointChanged || isCoordinateChanged || isCoordinateTransformChanged) {
76300
76290
  this._pointIdUpdated = pointId;
76301
- this.updateLine(line, coordinateX, coordinateY);
76291
+ this.doUpdateLine(line, coordinateX, coordinateY);
76292
+ if (render) {
76293
+ DApplications.update(line);
76294
+ }
76295
+ return true;
76302
76296
  }
76303
76297
  }
76304
76298
  }
76305
- return this;
76299
+ return false;
76306
76300
  };
76307
- DChartSeriesLineOfAny.prototype.updateLine = function (line, xcoordinate, ycoordinate) {
76301
+ DChartSeriesLineOfAny.prototype.doUpdateLine = function (line, xcoordinate, ycoordinate) {
76308
76302
  var values = line.points.values;
76309
76303
  var valuesLength = values.length;
76310
76304
  var ivalues = 0;
@@ -76375,7 +76369,6 @@ var DChartSeriesLineOfAny = /** @class */ (function (_super) {
76375
76369
  line.disallowUploadedUpdate();
76376
76370
  this.applyLine(line, xcoordinate, ycoordinate, sx, sy, cx, cy, values);
76377
76371
  line.allowUploadedUpdate();
76378
- DApplications.update(line);
76379
76372
  };
76380
76373
  DChartSeriesLineOfAny.prototype.adjustLineRegion = function (xmin, xmax, ymin, ymax, result) {
76381
76374
  result.xmin = xmin;
@@ -76833,6 +76826,14 @@ var DChartSeriesLine = /** @class */ (function (_super) {
76833
76826
  return this;
76834
76827
  };
76835
76828
  DChartSeriesLine.prototype.update = function () {
76829
+ this.doUpdate(true);
76830
+ return this;
76831
+ };
76832
+ DChartSeriesLine.prototype.onRender = function () {
76833
+ this.doUpdate(false);
76834
+ return this;
76835
+ };
76836
+ DChartSeriesLine.prototype.doUpdate = function (render) {
76836
76837
  var line = this._line;
76837
76838
  if (line) {
76838
76839
  var coordinate = this._coordinate;
@@ -76845,13 +76846,17 @@ var DChartSeriesLine = /** @class */ (function (_super) {
76845
76846
  var isCoordinateTransformChanged = coordinate.isTransformDirty(coordinateX, coordinateY);
76846
76847
  if (isPointChanged || isCoordinateChanged || isCoordinateTransformChanged) {
76847
76848
  this._pointIdUpdated = pointId;
76848
- this.updateLine(line, coordinateX, coordinateY, isPointChanged || isCoordinateChanged);
76849
+ this.doUpdateLine(line, coordinateX, coordinateY, isPointChanged || isCoordinateChanged);
76850
+ if (render) {
76851
+ DApplications.update(line);
76852
+ }
76853
+ return true;
76849
76854
  }
76850
76855
  }
76851
76856
  }
76852
- return this;
76857
+ return false;
76853
76858
  };
76854
- DChartSeriesLine.prototype.updateLine = function (line, xcoordinate, ycoordinate, isPointsDirty) {
76859
+ DChartSeriesLine.prototype.doUpdateLine = function (line, xcoordinate, ycoordinate, isPointsDirty) {
76855
76860
  line.disallowUploadedUpdate();
76856
76861
  if (isPointsDirty) {
76857
76862
  var values = line.points.values;
@@ -76935,7 +76940,6 @@ var DChartSeriesLine = /** @class */ (function (_super) {
76935
76940
  line.transform.position.set(xcoordinate.transform.map(this._centerX), ycoordinate.transform.map(this._centerY));
76936
76941
  line.transform.scale.set(xcoordinate.transform.scale, ycoordinate.transform.scale);
76937
76942
  line.allowUploadedUpdate();
76938
- DApplications.update(line);
76939
76943
  };
76940
76944
  DChartSeriesLine.prototype.updateRegion = function () {
76941
76945
  var pointId = this._pointId;
@@ -77182,6 +77186,14 @@ var DChartSeriesLinear = /** @class */ (function (_super) {
77182
77186
  return this;
77183
77187
  };
77184
77188
  DChartSeriesLinear.prototype.update = function () {
77189
+ this.doUpdate(true);
77190
+ return this;
77191
+ };
77192
+ DChartSeriesLinear.prototype.onRender = function () {
77193
+ this.doUpdate(false);
77194
+ return this;
77195
+ };
77196
+ DChartSeriesLinear.prototype.doUpdate = function (render) {
77185
77197
  var line = this._line;
77186
77198
  var container = this._container;
77187
77199
  if (line && container) {
@@ -77205,13 +77217,17 @@ var DChartSeriesLinear = /** @class */ (function (_super) {
77205
77217
  parameters.toClean();
77206
77218
  this._plotAreaSizeXUpdated = plotAreaWidth;
77207
77219
  this._plotAreaSizeYUpdated = plotAreaHeight;
77208
- this.updateLine(line, coordinateX, coordinateY, plotAreaWidth, plotAreaHeight);
77220
+ this.doUpdateLine(line, coordinateX, coordinateY, plotAreaWidth, plotAreaHeight);
77221
+ if (render) {
77222
+ DApplications.update(line);
77223
+ }
77224
+ return true;
77209
77225
  }
77210
77226
  }
77211
77227
  }
77212
- return this;
77228
+ return false;
77213
77229
  };
77214
- DChartSeriesLinear.prototype.updateLine = function (line, xcoordinate, ycoordinate, plotAreaSizeX, plotAreaSizeY) {
77230
+ DChartSeriesLinear.prototype.doUpdateLine = function (line, xcoordinate, ycoordinate, plotAreaSizeX, plotAreaSizeY) {
77215
77231
  var values = line.points.values;
77216
77232
  var segments = line.points.segments;
77217
77233
  var parameters = this._parameters;
@@ -77309,7 +77325,6 @@ var DChartSeriesLinear = /** @class */ (function (_super) {
77309
77325
  line.points.toFitted();
77310
77326
  line.transform.position.set(cx, cy);
77311
77327
  line.allowUploadedUpdate();
77312
- DApplications.update(line);
77313
77328
  };
77314
77329
  DChartSeriesLinear.prototype.updateRegion = function () {
77315
77330
  // DO NOTHING
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.292.0
2
+ Winter Cardinal UI v0.294.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -54272,55 +54272,13 @@
54272
54272
  var DChartAxisBaseOptionParser = /** @class */ (function () {
54273
54273
  function DChartAxisBaseOptionParser(theme, options) {
54274
54274
  var _a, _b;
54275
- this._coordinateIndex = (_a = options === null || options === void 0 ? void 0 : options.coordinate) !== null && _a !== void 0 ? _a : 0;
54276
- this._position = this.toPosition(theme, options);
54277
- this._tick = this.toTick(theme, options);
54278
- this._label = this.toLabel(theme, options);
54279
- this._padding = (_b = options === null || options === void 0 ? void 0 : options.padding) !== null && _b !== void 0 ? _b : theme.getPadding();
54280
- this._bar = this.toBar(theme, options);
54275
+ this.coordinate = (_a = options === null || options === void 0 ? void 0 : options.coordinate) !== null && _a !== void 0 ? _a : 0;
54276
+ this.position = this.toPosition(theme, options);
54277
+ this.tick = this.toTick(theme, options);
54278
+ this.label = this.toLabel(theme, options);
54279
+ this.padding = (_b = options === null || options === void 0 ? void 0 : options.padding) !== null && _b !== void 0 ? _b : theme.getPadding();
54280
+ this.bar = this.toBar(theme, options);
54281
54281
  }
54282
- Object.defineProperty(DChartAxisBaseOptionParser.prototype, "coordinateIndex", {
54283
- get: function () {
54284
- return this._coordinateIndex;
54285
- },
54286
- enumerable: false,
54287
- configurable: true
54288
- });
54289
- Object.defineProperty(DChartAxisBaseOptionParser.prototype, "padding", {
54290
- get: function () {
54291
- return this._padding;
54292
- },
54293
- enumerable: false,
54294
- configurable: true
54295
- });
54296
- Object.defineProperty(DChartAxisBaseOptionParser.prototype, "position", {
54297
- get: function () {
54298
- return this._position;
54299
- },
54300
- enumerable: false,
54301
- configurable: true
54302
- });
54303
- Object.defineProperty(DChartAxisBaseOptionParser.prototype, "bar", {
54304
- get: function () {
54305
- return this._bar;
54306
- },
54307
- enumerable: false,
54308
- configurable: true
54309
- });
54310
- Object.defineProperty(DChartAxisBaseOptionParser.prototype, "tick", {
54311
- get: function () {
54312
- return this._tick;
54313
- },
54314
- enumerable: false,
54315
- configurable: true
54316
- });
54317
- Object.defineProperty(DChartAxisBaseOptionParser.prototype, "label", {
54318
- get: function () {
54319
- return this._label;
54320
- },
54321
- enumerable: false,
54322
- configurable: true
54323
- });
54324
54282
  DChartAxisBaseOptionParser.prototype.toPosition = function (theme, options) {
54325
54283
  var position = options === null || options === void 0 ? void 0 : options.position;
54326
54284
  if (isString(position)) {
@@ -54380,7 +54338,7 @@
54380
54338
  };
54381
54339
  };
54382
54340
  DChartAxisBaseOptionParser.prototype.toTickPosition = function (tickPosition) {
54383
- var position = this._position;
54341
+ var position = this.position;
54384
54342
  if (tickPosition === DChartAxisTickPosition.OUTSIDE || tickPosition === "OUTSIDE") {
54385
54343
  switch (position) {
54386
54344
  case DChartAxisPosition.TOP:
@@ -54556,7 +54514,7 @@
54556
54514
  };
54557
54515
  DChartAxisBaseOptionParser.prototype.toTickMajorTextAlign = function (theme, options) {
54558
54516
  var _a, _b;
54559
- var position = this._position;
54517
+ var position = this.position;
54560
54518
  return {
54561
54519
  horizontal: (_a = options === null || options === void 0 ? void 0 : options.horizontal) !== null && _a !== void 0 ? _a : theme.getMajorTickTextAlignHorizontal(position),
54562
54520
  vertical: (_b = options === null || options === void 0 ? void 0 : options.vertical) !== null && _b !== void 0 ? _b : theme.getMajorTickTextAlignVertical(position)
@@ -54647,7 +54605,7 @@
54647
54605
  };
54648
54606
  DChartAxisBaseOptionParser.prototype.toTickMinorTextAlign = function (theme, options) {
54649
54607
  var _a, _b;
54650
- var position = this._position;
54608
+ var position = this.position;
54651
54609
  return {
54652
54610
  horizontal: (_a = options === null || options === void 0 ? void 0 : options.horizontal) !== null && _a !== void 0 ? _a : theme.getMinorTickTextAlignHorizontal(position),
54653
54611
  vertical: (_b = options === null || options === void 0 ? void 0 : options.vertical) !== null && _b !== void 0 ? _b : theme.getMinorTickTextAlignVertical(position)
@@ -54715,7 +54673,7 @@
54715
54673
  };
54716
54674
  DChartAxisBaseOptionParser.prototype.toLabelAlign = function (theme, options) {
54717
54675
  var _a, _b;
54718
- var position = this._position;
54676
+ var position = this.position;
54719
54677
  return {
54720
54678
  horizontal: (_a = options === null || options === void 0 ? void 0 : options.horizontal) !== null && _a !== void 0 ? _a : theme.getLabelAlignHorizontal(position),
54721
54679
  vertical: (_b = options === null || options === void 0 ? void 0 : options.vertical) !== null && _b !== void 0 ? _b : theme.getLabelAlignVertical(position)
@@ -55044,7 +55002,7 @@
55044
55002
  var coordinate = void 0;
55045
55003
  switch (parser.position) {
55046
55004
  case DChartAxisPosition.TOP:
55047
- coordinate = plotArea.coordinate.x.get(parser.coordinateIndex);
55005
+ coordinate = plotArea.coordinate.x.get(parser.coordinate);
55048
55006
  if (coordinate) {
55049
55007
  var domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.x));
55050
55008
  var domainTo = coordinate.unmap(coordinate.transform.unmap(bounds.x + bounds.width));
@@ -55053,7 +55011,7 @@
55053
55011
  }
55054
55012
  break;
55055
55013
  case DChartAxisPosition.BOTTOM:
55056
- coordinate = plotArea.coordinate.x.get(parser.coordinateIndex);
55014
+ coordinate = plotArea.coordinate.x.get(parser.coordinate);
55057
55015
  if (coordinate) {
55058
55016
  var domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.x));
55059
55017
  var domainTo = coordinate.unmap(coordinate.transform.unmap(bounds.x + bounds.width));
@@ -55062,7 +55020,7 @@
55062
55020
  }
55063
55021
  break;
55064
55022
  case DChartAxisPosition.LEFT:
55065
- coordinate = plotArea.coordinate.y.get(parser.coordinateIndex);
55023
+ coordinate = plotArea.coordinate.y.get(parser.coordinate);
55066
55024
  if (coordinate) {
55067
55025
  var domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.y));
55068
55026
  var domainTo = coordinate.unmap(coordinate.transform.unmap(bounds.y + bounds.height));
@@ -55071,7 +55029,7 @@
55071
55029
  }
55072
55030
  break;
55073
55031
  case DChartAxisPosition.RIGHT:
55074
- coordinate = plotArea.coordinate.y.get(parser.coordinateIndex);
55032
+ coordinate = plotArea.coordinate.y.get(parser.coordinate);
55075
55033
  if (coordinate) {
55076
55034
  var domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.y));
55077
55035
  var domainTo = coordinate.unmap(coordinate.transform.unmap(bounds.y + bounds.height));
@@ -55245,13 +55203,6 @@
55245
55203
  this._bar = this.newBar(parser, theme, options);
55246
55204
  this._tick = this.newTick(parser, theme, options);
55247
55205
  }
55248
- Object.defineProperty(DChartAxisBase.prototype, "parser", {
55249
- get: function () {
55250
- return this._parser;
55251
- },
55252
- enumerable: false,
55253
- configurable: true
55254
- });
55255
55206
  DChartAxisBase.prototype.newParser = function (theme, options) {
55256
55207
  return new DChartAxisBaseOptionParser(theme, options);
55257
55208
  };
@@ -55259,6 +55210,29 @@
55259
55210
  get: function () {
55260
55211
  return this._parser.position;
55261
55212
  },
55213
+ set: function (position) {
55214
+ this._parser.position = position;
55215
+ },
55216
+ enumerable: false,
55217
+ configurable: true
55218
+ });
55219
+ Object.defineProperty(DChartAxisBase.prototype, "coordinate", {
55220
+ get: function () {
55221
+ return this._parser.coordinate;
55222
+ },
55223
+ set: function (coordinate) {
55224
+ this._parser.coordinate = coordinate;
55225
+ },
55226
+ enumerable: false,
55227
+ configurable: true
55228
+ });
55229
+ Object.defineProperty(DChartAxisBase.prototype, "padding", {
55230
+ get: function () {
55231
+ return this._parser.padding;
55232
+ },
55233
+ set: function (padding) {
55234
+ this._parser.padding = padding;
55235
+ },
55262
55236
  enumerable: false,
55263
55237
  configurable: true
55264
55238
  });
@@ -56725,6 +56699,16 @@
56725
56699
  selection.update();
56726
56700
  }
56727
56701
  };
56702
+ DChartSeriesContainerImpl.prototype.onRender = function () {
56703
+ var list = this._list;
56704
+ for (var i = 0, imax = list.length; i < imax; ++i) {
56705
+ list[i].onRender();
56706
+ }
56707
+ var selection = this._selection;
56708
+ if (selection) {
56709
+ selection.onRender();
56710
+ }
56711
+ };
56728
56712
  DChartSeriesContainerImpl.prototype.add = function (series) {
56729
56713
  var list = this._list;
56730
56714
  series.bind(this, list.length);
@@ -56967,11 +56951,9 @@
56967
56951
  DChartPlotAreaImpl.prototype.render = function (renderer) {
56968
56952
  if (this._isViewDirty) {
56969
56953
  this._isViewDirty = false;
56954
+ this._coordinate.fit();
56970
56955
  this._axis.onRender();
56971
- var selection = this._series.selection;
56972
- if (selection) {
56973
- selection.onRender();
56974
- }
56956
+ this._series.onRender();
56975
56957
  }
56976
56958
  _super.prototype.render.call(this, renderer);
56977
56959
  };
@@ -57970,6 +57952,14 @@
57970
57952
  return this;
57971
57953
  };
57972
57954
  DChartSeriesLineOfAny.prototype.update = function () {
57955
+ this.doUpdate(true);
57956
+ return this;
57957
+ };
57958
+ DChartSeriesLineOfAny.prototype.onRender = function () {
57959
+ this.doUpdate(false);
57960
+ return this;
57961
+ };
57962
+ DChartSeriesLineOfAny.prototype.doUpdate = function (render) {
57973
57963
  var line = this._line;
57974
57964
  if (line) {
57975
57965
  var coordinate = this._coordinate;
@@ -57982,13 +57972,17 @@
57982
57972
  var isCoordinateTransformChanged = coordinate.isTransformDirty(coordinateX, coordinateY);
57983
57973
  if (isPointChanged || isCoordinateChanged || isCoordinateTransformChanged) {
57984
57974
  this._pointIdUpdated = pointId;
57985
- this.updateLine(line, coordinateX, coordinateY);
57975
+ this.doUpdateLine(line, coordinateX, coordinateY);
57976
+ if (render) {
57977
+ DApplications.update(line);
57978
+ }
57979
+ return true;
57986
57980
  }
57987
57981
  }
57988
57982
  }
57989
- return this;
57983
+ return false;
57990
57984
  };
57991
- DChartSeriesLineOfAny.prototype.updateLine = function (line, xcoordinate, ycoordinate) {
57985
+ DChartSeriesLineOfAny.prototype.doUpdateLine = function (line, xcoordinate, ycoordinate) {
57992
57986
  var values = line.points.values;
57993
57987
  var valuesLength = values.length;
57994
57988
  var ivalues = 0;
@@ -58059,7 +58053,6 @@
58059
58053
  line.disallowUploadedUpdate();
58060
58054
  this.applyLine(line, xcoordinate, ycoordinate, sx, sy, cx, cy, values);
58061
58055
  line.allowUploadedUpdate();
58062
- DApplications.update(line);
58063
58056
  };
58064
58057
  DChartSeriesLineOfAny.prototype.adjustLineRegion = function (xmin, xmax, ymin, ymax, result) {
58065
58058
  result.xmin = xmin;
@@ -58517,6 +58510,14 @@
58517
58510
  return this;
58518
58511
  };
58519
58512
  DChartSeriesLine.prototype.update = function () {
58513
+ this.doUpdate(true);
58514
+ return this;
58515
+ };
58516
+ DChartSeriesLine.prototype.onRender = function () {
58517
+ this.doUpdate(false);
58518
+ return this;
58519
+ };
58520
+ DChartSeriesLine.prototype.doUpdate = function (render) {
58520
58521
  var line = this._line;
58521
58522
  if (line) {
58522
58523
  var coordinate = this._coordinate;
@@ -58529,13 +58530,17 @@
58529
58530
  var isCoordinateTransformChanged = coordinate.isTransformDirty(coordinateX, coordinateY);
58530
58531
  if (isPointChanged || isCoordinateChanged || isCoordinateTransformChanged) {
58531
58532
  this._pointIdUpdated = pointId;
58532
- this.updateLine(line, coordinateX, coordinateY, isPointChanged || isCoordinateChanged);
58533
+ this.doUpdateLine(line, coordinateX, coordinateY, isPointChanged || isCoordinateChanged);
58534
+ if (render) {
58535
+ DApplications.update(line);
58536
+ }
58537
+ return true;
58533
58538
  }
58534
58539
  }
58535
58540
  }
58536
- return this;
58541
+ return false;
58537
58542
  };
58538
- DChartSeriesLine.prototype.updateLine = function (line, xcoordinate, ycoordinate, isPointsDirty) {
58543
+ DChartSeriesLine.prototype.doUpdateLine = function (line, xcoordinate, ycoordinate, isPointsDirty) {
58539
58544
  line.disallowUploadedUpdate();
58540
58545
  if (isPointsDirty) {
58541
58546
  var values = line.points.values;
@@ -58619,7 +58624,6 @@
58619
58624
  line.transform.position.set(xcoordinate.transform.map(this._centerX), ycoordinate.transform.map(this._centerY));
58620
58625
  line.transform.scale.set(xcoordinate.transform.scale, ycoordinate.transform.scale);
58621
58626
  line.allowUploadedUpdate();
58622
- DApplications.update(line);
58623
58627
  };
58624
58628
  DChartSeriesLine.prototype.updateRegion = function () {
58625
58629
  var pointId = this._pointId;
@@ -58866,6 +58870,14 @@
58866
58870
  return this;
58867
58871
  };
58868
58872
  DChartSeriesLinear.prototype.update = function () {
58873
+ this.doUpdate(true);
58874
+ return this;
58875
+ };
58876
+ DChartSeriesLinear.prototype.onRender = function () {
58877
+ this.doUpdate(false);
58878
+ return this;
58879
+ };
58880
+ DChartSeriesLinear.prototype.doUpdate = function (render) {
58869
58881
  var line = this._line;
58870
58882
  var container = this._container;
58871
58883
  if (line && container) {
@@ -58889,13 +58901,17 @@
58889
58901
  parameters.toClean();
58890
58902
  this._plotAreaSizeXUpdated = plotAreaWidth;
58891
58903
  this._plotAreaSizeYUpdated = plotAreaHeight;
58892
- this.updateLine(line, coordinateX, coordinateY, plotAreaWidth, plotAreaHeight);
58904
+ this.doUpdateLine(line, coordinateX, coordinateY, plotAreaWidth, plotAreaHeight);
58905
+ if (render) {
58906
+ DApplications.update(line);
58907
+ }
58908
+ return true;
58893
58909
  }
58894
58910
  }
58895
58911
  }
58896
- return this;
58912
+ return false;
58897
58913
  };
58898
- DChartSeriesLinear.prototype.updateLine = function (line, xcoordinate, ycoordinate, plotAreaSizeX, plotAreaSizeY) {
58914
+ DChartSeriesLinear.prototype.doUpdateLine = function (line, xcoordinate, ycoordinate, plotAreaSizeX, plotAreaSizeY) {
58899
58915
  var values = line.points.values;
58900
58916
  var segments = line.points.segments;
58901
58917
  var parameters = this._parameters;
@@ -58993,7 +59009,6 @@
58993
59009
  line.points.toFitted();
58994
59010
  line.transform.position.set(cx, cy);
58995
59011
  line.allowUploadedUpdate();
58996
- DApplications.update(line);
58997
59012
  };
58998
59013
  DChartSeriesLinear.prototype.updateRegion = function () {
58999
59014
  // DO NOTHING