@wcardinal/wcardinal-ui 0.289.0 → 0.291.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 (63) hide show
  1. package/dist/types/wcardinal/ui/d-chart-axis-bar.d.ts +5 -0
  2. package/dist/types/wcardinal/ui/d-chart-axis-base-options-parser.d.ts +23 -12
  3. package/dist/types/wcardinal/ui/d-chart-axis-base-options.d.ts +12 -4
  4. package/dist/types/wcardinal/ui/d-chart-axis-base-tick-container.d.ts +13 -4
  5. package/dist/types/wcardinal/ui/d-chart-axis-base.d.ts +5 -4
  6. package/dist/types/wcardinal/ui/d-chart-axis-tick-container.d.ts +5 -0
  7. package/dist/types/wcardinal/ui/d-chart-axis-tick-major.d.ts +4 -0
  8. package/dist/types/wcardinal/ui/d-chart-axis-tick-minor.d.ts +4 -0
  9. package/dist/types/wcardinal/ui/d-chart-coordinate-base.d.ts +52 -0
  10. package/dist/types/wcardinal/ui/d-chart-coordinate-linear.d.ts +4 -46
  11. package/dist/types/wcardinal/ui/d-chart-coordinate-log.d.ts +4 -42
  12. package/dist/types/wcardinal/ui/d-table-body.d.ts +7 -0
  13. package/dist/types/wcardinal/ui/index.d.ts +11 -0
  14. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-chart-axis-base.d.ts +7 -0
  15. package/dist/types/wcardinal/ui/theme/white/d-theme-white-chart-axis-base.d.ts +7 -0
  16. package/dist/wcardinal/ui/d-chart-axis-bar.js.map +1 -1
  17. package/dist/wcardinal/ui/d-chart-axis-base-options-parser.js +123 -23
  18. package/dist/wcardinal/ui/d-chart-axis-base-options-parser.js.map +1 -1
  19. package/dist/wcardinal/ui/d-chart-axis-base-options.js.map +1 -1
  20. package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js +65 -44
  21. package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js.map +1 -1
  22. package/dist/wcardinal/ui/d-chart-axis-base-tick-minor.js +1 -0
  23. package/dist/wcardinal/ui/d-chart-axis-base-tick-minor.js.map +1 -1
  24. package/dist/wcardinal/ui/d-chart-axis-base.js +17 -3
  25. package/dist/wcardinal/ui/d-chart-axis-base.js.map +1 -1
  26. package/dist/wcardinal/ui/d-chart-axis-tick-container.js.map +1 -1
  27. package/dist/wcardinal/ui/d-chart-axis-tick-major.js.map +1 -1
  28. package/dist/wcardinal/ui/d-chart-axis-tick-minor.js.map +1 -1
  29. package/dist/wcardinal/ui/d-chart-coordinate-base.js +186 -0
  30. package/dist/wcardinal/ui/d-chart-coordinate-base.js.map +1 -0
  31. package/dist/wcardinal/ui/d-chart-coordinate-linear-tick.js +2 -1
  32. package/dist/wcardinal/ui/d-chart-coordinate-linear-tick.js.map +1 -1
  33. package/dist/wcardinal/ui/d-chart-coordinate-linear.js +9 -165
  34. package/dist/wcardinal/ui/d-chart-coordinate-linear.js.map +1 -1
  35. package/dist/wcardinal/ui/d-chart-coordinate-log-tick.js +2 -1
  36. package/dist/wcardinal/ui/d-chart-coordinate-log-tick.js.map +1 -1
  37. package/dist/wcardinal/ui/d-chart-coordinate-log.js +9 -153
  38. package/dist/wcardinal/ui/d-chart-coordinate-log.js.map +1 -1
  39. package/dist/wcardinal/ui/d-chart-series-line-of-any.js +4 -2
  40. package/dist/wcardinal/ui/d-chart-series-line-of-any.js.map +1 -1
  41. package/dist/wcardinal/ui/d-scroll-bar-vertical.js +1 -0
  42. package/dist/wcardinal/ui/d-scroll-bar-vertical.js.map +1 -1
  43. package/dist/wcardinal/ui/d-table-body.js +39 -0
  44. package/dist/wcardinal/ui/d-table-body.js.map +1 -1
  45. package/dist/wcardinal/ui/d-table.js +3 -3
  46. package/dist/wcardinal/ui/d-table.js.map +1 -1
  47. package/dist/wcardinal/ui/index.js +11 -0
  48. package/dist/wcardinal/ui/index.js.map +1 -1
  49. package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-axis-base.js +21 -0
  50. package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-axis-base.js.map +1 -1
  51. package/dist/wcardinal/ui/theme/white/d-theme-white-chart-axis-base.js +21 -0
  52. package/dist/wcardinal/ui/theme/white/d-theme-white-chart-axis-base.js.map +1 -1
  53. package/dist/wcardinal-ui-theme-dark.js +22 -1
  54. package/dist/wcardinal-ui-theme-dark.min.js +2 -2
  55. package/dist/wcardinal-ui-theme-dark.min.js.map +1 -1
  56. package/dist/wcardinal-ui-theme-white.js +22 -1
  57. package/dist/wcardinal-ui-theme-white.min.js +2 -2
  58. package/dist/wcardinal-ui-theme-white.min.js.map +1 -1
  59. package/dist/wcardinal-ui.cjs.js +754 -641
  60. package/dist/wcardinal-ui.js +712 -641
  61. package/dist/wcardinal-ui.min.js +2 -2
  62. package/dist/wcardinal-ui.min.js.map +1 -1
  63. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.289.0
2
+ Winter Cardinal UI v0.291.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -52898,6 +52898,7 @@
52898
52898
  var barLength = space * this._end + thumbMinimumLength - barStart;
52899
52899
  thumb.position.set(0, barStart);
52900
52900
  thumb.resize(width, barLength);
52901
+ thumb.updateTransform();
52901
52902
  };
52902
52903
  return DScrollBarVertical;
52903
52904
  }(DScrollBar));
@@ -54155,6 +54156,106 @@
54155
54156
  RIGHT: 3
54156
54157
  };
54157
54158
 
54159
+ /*
54160
+ * Copyright (C) 2019 Toshiba Corporation
54161
+ * SPDX-License-Identifier: Apache-2.0
54162
+ */
54163
+ var DChartAxisBaseBar = /** @class */ (function () {
54164
+ function DChartAxisBaseBar(parser) {
54165
+ this._parser = parser;
54166
+ this._index = 0;
54167
+ }
54168
+ Object.defineProperty(DChartAxisBaseBar.prototype, "shape", {
54169
+ get: function () {
54170
+ var result = this._shape;
54171
+ if (result == null) {
54172
+ result = this.newShape();
54173
+ this._shape = result;
54174
+ }
54175
+ return result;
54176
+ },
54177
+ enumerable: false,
54178
+ configurable: true
54179
+ });
54180
+ DChartAxisBaseBar.prototype.newShape = function () {
54181
+ var _a;
54182
+ var parser = this._parser;
54183
+ var bar = parser.bar;
54184
+ var result = new EShapeBar();
54185
+ result.points.position = this.newShapePosition();
54186
+ result.points.style = (_a = bar.style) !== null && _a !== void 0 ? _a : EShapePointsStyle.NONE;
54187
+ result.stroke.copy(bar.stroke);
54188
+ result.text.copy(parser.label);
54189
+ return result;
54190
+ };
54191
+ DChartAxisBaseBar.prototype.newShapePosition = function () {
54192
+ switch (this._parser.position) {
54193
+ case DChartAxisPosition.LEFT:
54194
+ case DChartAxisPosition.RIGHT:
54195
+ return EShapeBarPosition.TOP;
54196
+ default:
54197
+ return EShapeBarPosition.LEFT;
54198
+ }
54199
+ };
54200
+ DChartAxisBaseBar.prototype.bind = function (container, index) {
54201
+ this._container = container;
54202
+ this._index = index;
54203
+ this.shape.attach(container.container);
54204
+ };
54205
+ DChartAxisBaseBar.prototype.unbind = function () {
54206
+ var shape = this._shape;
54207
+ if (shape != null) {
54208
+ shape.detach();
54209
+ }
54210
+ this._index = 0;
54211
+ this._container = undefined;
54212
+ };
54213
+ DChartAxisBaseBar.prototype.update = function () {
54214
+ var container = this._container;
54215
+ var index = this._index;
54216
+ var shape = this._shape;
54217
+ if (shape != null && container != null) {
54218
+ var plotArea = container.plotArea;
54219
+ var plotAreaWidth = plotArea.width;
54220
+ var plotAreaHeight = plotArea.height;
54221
+ var offset = this._parser.padding * index;
54222
+ shape.disallowUploadedUpdate();
54223
+ var position = shape.transform.position;
54224
+ var size = shape.size;
54225
+ switch (this._parser.position) {
54226
+ case DChartAxisPosition.TOP:
54227
+ position.set(plotAreaWidth * 0.5, 0 - offset);
54228
+ size.set(plotAreaWidth, 0);
54229
+ break;
54230
+ case DChartAxisPosition.BOTTOM:
54231
+ position.set(plotAreaWidth * 0.5, plotAreaHeight + offset);
54232
+ size.set(plotAreaWidth, 0);
54233
+ break;
54234
+ case DChartAxisPosition.LEFT:
54235
+ position.set(0 - offset, plotAreaHeight * 0.5);
54236
+ size.set(0, plotAreaHeight);
54237
+ break;
54238
+ case DChartAxisPosition.RIGHT:
54239
+ position.set(plotAreaWidth + offset, plotAreaHeight * 0.5);
54240
+ size.set(0, plotAreaHeight);
54241
+ break;
54242
+ }
54243
+ shape.allowUploadedUpdate();
54244
+ return true;
54245
+ }
54246
+ return false;
54247
+ };
54248
+ DChartAxisBaseBar.prototype.destroy = function () {
54249
+ var shape = this._shape;
54250
+ if (shape != null) {
54251
+ shape.destroy();
54252
+ }
54253
+ this._index = 0;
54254
+ this._container = undefined;
54255
+ };
54256
+ return DChartAxisBaseBar;
54257
+ }());
54258
+
54158
54259
  /*
54159
54260
  * Copyright (C) 2019 Toshiba Corporation
54160
54261
  * SPDX-License-Identifier: Apache-2.0
@@ -54243,7 +54344,7 @@
54243
54344
  return {
54244
54345
  enable: (_a = tick === null || tick === void 0 ? void 0 : tick.enable) !== null && _a !== void 0 ? _a : theme.getTickEnable(),
54245
54346
  major: this.toTickMajor(theme, tick),
54246
- minor: this.toMinorTick(theme, tick)
54347
+ minor: this.toTickMinor(theme, tick)
54247
54348
  };
54248
54349
  };
54249
54350
  DChartAxisBaseOptionParser.prototype.toTickMajor = function (theme, options) {
@@ -54264,8 +54365,8 @@
54264
54365
  position: this.toTickPosition(position),
54265
54366
  style: style,
54266
54367
  stroke: stroke,
54267
- text: this.toMajorTickText(theme, major === null || major === void 0 ? void 0 : major.text),
54268
- formatter: this.toMajorTickFormatter(theme, major),
54368
+ text: this.toTickMajorText(theme, major === null || major === void 0 ? void 0 : major.text),
54369
+ formatter: this.toTickMajorFormatter(theme, major),
54269
54370
  gridline: this.toTickMajorGridline(theme, major === null || major === void 0 ? void 0 : major.gridline, optionsStyle, optionsStroke)
54270
54371
  };
54271
54372
  };
@@ -54309,7 +54410,7 @@
54309
54410
  }
54310
54411
  }
54311
54412
  };
54312
- DChartAxisBaseOptionParser.prototype.toMinorTick = function (theme, options) {
54413
+ DChartAxisBaseOptionParser.prototype.toTickMinor = function (theme, options) {
54313
54414
  var _a, _b, _c, _d, _e, _f, _g;
54314
54415
  var minor = options === null || options === void 0 ? void 0 : options.minor;
54315
54416
  var position = (_b = (_a = minor === null || minor === void 0 ? void 0 : minor.position) !== null && _a !== void 0 ? _a : options === null || options === void 0 ? void 0 : options.position) !== null && _b !== void 0 ? _b : theme.getMinorTickPosition();
@@ -54320,7 +54421,9 @@
54320
54421
  size: (_g = minor === null || minor === void 0 ? void 0 : minor.size) !== null && _g !== void 0 ? _g : theme.getMinorTickSize(),
54321
54422
  position: this.toTickPosition(position),
54322
54423
  style: style,
54323
- stroke: this.toTickMinorStroke(theme, minor === null || minor === void 0 ? void 0 : minor.stroke, options === null || options === void 0 ? void 0 : options.stroke)
54424
+ stroke: this.toTickMinorStroke(theme, minor === null || minor === void 0 ? void 0 : minor.stroke, options === null || options === void 0 ? void 0 : options.stroke),
54425
+ text: this.toTickMinorText(theme, minor === null || minor === void 0 ? void 0 : minor.text),
54426
+ formatter: this.toTickMinorFormatter(theme, minor)
54324
54427
  };
54325
54428
  };
54326
54429
  DChartAxisBaseOptionParser.prototype.toBarStroke = function (theme, options) {
@@ -54384,12 +54487,15 @@
54384
54487
  };
54385
54488
  }
54386
54489
  };
54387
- DChartAxisBaseOptionParser.prototype.toMajorTickFormatter = function (theme, options) {
54490
+ DChartAxisBaseOptionParser.prototype.toTickMajorFormatter = function (theme, options) {
54388
54491
  var text = options === null || options === void 0 ? void 0 : options.text;
54389
54492
  if (text) {
54390
- var format = text.format;
54391
- if (format != null) {
54392
- return NumberFormatters.create(format);
54493
+ var format_1 = text.format;
54494
+ if (format_1 === null) {
54495
+ return undefined;
54496
+ }
54497
+ else if (format_1 != null) {
54498
+ return NumberFormatters.create(format_1);
54393
54499
  }
54394
54500
  else {
54395
54501
  var formatter = text.formatter;
@@ -54400,28 +54506,32 @@
54400
54506
  }
54401
54507
  }
54402
54508
  }
54403
- return NumberFormatters.create(theme.getMajorTickTextFormat());
54509
+ var format = theme.getMajorTickTextFormat();
54510
+ if (format != null) {
54511
+ return NumberFormatters.create(format);
54512
+ }
54513
+ return undefined;
54404
54514
  };
54405
- DChartAxisBaseOptionParser.prototype.toMajorTickText = function (theme, options) {
54515
+ DChartAxisBaseOptionParser.prototype.toTickMajorText = function (theme, options) {
54406
54516
  options = options || {};
54407
54517
  return {
54408
54518
  format: options.format,
54409
- color: this.toMajorTickTextColor(theme, options.color),
54519
+ color: this.toTickMajorTextColor(theme, options.color),
54410
54520
  alpha: options.alpha,
54411
54521
  family: options.family,
54412
54522
  size: options.size,
54413
54523
  weight: options.weight,
54414
- align: this.toMajorTickTextAlign(theme, options.align),
54415
- offset: this.toMajorTickTextOffset(theme, options.offset),
54524
+ align: this.toTickMajorTextAlign(theme, options.align),
54525
+ offset: this.toTickMajorTextOffset(theme, options.offset),
54416
54526
  style: options.style,
54417
- outline: this.toMajorTickTextOutline(theme, options.outline),
54418
- spacing: this.toMajorTickTextSpacing(theme, options.spacing),
54527
+ outline: this.toTickMajorTextOutline(theme, options.outline),
54528
+ spacing: this.toTickMajorTextSpacing(theme, options.spacing),
54419
54529
  direction: this.toTickMajorTextDirection(theme, options.direction),
54420
- padding: this.toMajorTickTextPadding(theme, options.padding),
54530
+ padding: this.toTickMajorTextPadding(theme, options.padding),
54421
54531
  clipping: options.clipping
54422
54532
  };
54423
54533
  };
54424
- DChartAxisBaseOptionParser.prototype.toMajorTickTextOutline = function (theme, options) {
54534
+ DChartAxisBaseOptionParser.prototype.toTickMajorTextOutline = function (theme, options) {
54425
54535
  if (options) {
54426
54536
  return {
54427
54537
  enable: options.enable,
@@ -54431,7 +54541,7 @@
54431
54541
  };
54432
54542
  }
54433
54543
  };
54434
- DChartAxisBaseOptionParser.prototype.toMajorTickTextAlign = function (theme, options) {
54544
+ DChartAxisBaseOptionParser.prototype.toTickMajorTextAlign = function (theme, options) {
54435
54545
  var _a, _b;
54436
54546
  var position = this._position;
54437
54547
  return {
@@ -54439,7 +54549,7 @@
54439
54549
  vertical: (_b = options === null || options === void 0 ? void 0 : options.vertical) !== null && _b !== void 0 ? _b : theme.getMajorTickTextAlignVertical(position)
54440
54550
  };
54441
54551
  };
54442
- DChartAxisBaseOptionParser.prototype.toMajorTickTextOffset = function (theme, options) {
54552
+ DChartAxisBaseOptionParser.prototype.toTickMajorTextOffset = function (theme, options) {
54443
54553
  if (options) {
54444
54554
  return {
54445
54555
  horizontal: options.horizontal,
@@ -54447,7 +54557,7 @@
54447
54557
  };
54448
54558
  }
54449
54559
  };
54450
- DChartAxisBaseOptionParser.prototype.toMajorTickTextSpacing = function (theme, options) {
54560
+ DChartAxisBaseOptionParser.prototype.toTickMajorTextSpacing = function (theme, options) {
54451
54561
  if (options) {
54452
54562
  return {
54453
54563
  horizontal: options.horizontal,
@@ -54455,7 +54565,7 @@
54455
54565
  };
54456
54566
  }
54457
54567
  };
54458
- DChartAxisBaseOptionParser.prototype.toMajorTickTextPadding = function (theme, options) {
54568
+ DChartAxisBaseOptionParser.prototype.toTickMajorTextPadding = function (theme, options) {
54459
54569
  var _a, _b;
54460
54570
  return {
54461
54571
  horizontal: (_a = options === null || options === void 0 ? void 0 : options.horizontal) !== null && _a !== void 0 ? _a : theme.getMajorTickTextPaddingHorizontal(),
@@ -54465,9 +54575,100 @@
54465
54575
  DChartAxisBaseOptionParser.prototype.toTickMajorTextDirection = function (theme, options) {
54466
54576
  return options !== null && options !== void 0 ? options : theme.getMajorTickTextDirection();
54467
54577
  };
54468
- DChartAxisBaseOptionParser.prototype.toMajorTickTextColor = function (theme, options) {
54578
+ DChartAxisBaseOptionParser.prototype.toTickMajorTextColor = function (theme, options) {
54469
54579
  return options !== null && options !== void 0 ? options : theme.getMajorTickTextColor();
54470
54580
  };
54581
+ DChartAxisBaseOptionParser.prototype.toTickMinorFormatter = function (theme, options) {
54582
+ var text = options === null || options === void 0 ? void 0 : options.text;
54583
+ if (text) {
54584
+ var format_2 = text.format;
54585
+ if (format_2 === null) {
54586
+ return undefined;
54587
+ }
54588
+ else if (format_2 != null) {
54589
+ return NumberFormatters.create(format_2);
54590
+ }
54591
+ else {
54592
+ var formatter = text.formatter;
54593
+ if (formatter) {
54594
+ return {
54595
+ format: formatter
54596
+ };
54597
+ }
54598
+ }
54599
+ }
54600
+ var format = theme.getMinorTickTextFormat();
54601
+ if (format != null) {
54602
+ return NumberFormatters.create(format);
54603
+ }
54604
+ return undefined;
54605
+ };
54606
+ DChartAxisBaseOptionParser.prototype.toTickMinorText = function (theme, options) {
54607
+ options = options || {};
54608
+ return {
54609
+ format: options.format,
54610
+ color: this.toTickMinorTextColor(theme, options.color),
54611
+ alpha: options.alpha,
54612
+ family: options.family,
54613
+ size: options.size,
54614
+ weight: options.weight,
54615
+ align: this.toTickMinorTextAlign(theme, options.align),
54616
+ offset: this.toTickMinorTextOffset(theme, options.offset),
54617
+ style: options.style,
54618
+ outline: this.toTickMinorTextOutline(theme, options.outline),
54619
+ spacing: this.toTickMinorTextSpacing(theme, options.spacing),
54620
+ direction: this.toTickMinorTextDirection(theme, options.direction),
54621
+ padding: this.toTickMinorTextPadding(theme, options.padding),
54622
+ clipping: options.clipping
54623
+ };
54624
+ };
54625
+ DChartAxisBaseOptionParser.prototype.toTickMinorTextOutline = function (theme, options) {
54626
+ if (options) {
54627
+ return {
54628
+ enable: options.enable,
54629
+ color: options.color,
54630
+ alpha: options.alpha,
54631
+ width: options.width
54632
+ };
54633
+ }
54634
+ };
54635
+ DChartAxisBaseOptionParser.prototype.toTickMinorTextAlign = function (theme, options) {
54636
+ var _a, _b;
54637
+ var position = this._position;
54638
+ return {
54639
+ horizontal: (_a = options === null || options === void 0 ? void 0 : options.horizontal) !== null && _a !== void 0 ? _a : theme.getMinorTickTextAlignHorizontal(position),
54640
+ vertical: (_b = options === null || options === void 0 ? void 0 : options.vertical) !== null && _b !== void 0 ? _b : theme.getMinorTickTextAlignVertical(position)
54641
+ };
54642
+ };
54643
+ DChartAxisBaseOptionParser.prototype.toTickMinorTextOffset = function (theme, options) {
54644
+ if (options) {
54645
+ return {
54646
+ horizontal: options.horizontal,
54647
+ vertical: options.vertical
54648
+ };
54649
+ }
54650
+ };
54651
+ DChartAxisBaseOptionParser.prototype.toTickMinorTextSpacing = function (theme, options) {
54652
+ if (options) {
54653
+ return {
54654
+ horizontal: options.horizontal,
54655
+ vertical: options.vertical
54656
+ };
54657
+ }
54658
+ };
54659
+ DChartAxisBaseOptionParser.prototype.toTickMinorTextPadding = function (theme, options) {
54660
+ var _a, _b;
54661
+ return {
54662
+ horizontal: (_a = options === null || options === void 0 ? void 0 : options.horizontal) !== null && _a !== void 0 ? _a : theme.getMinorTickTextPaddingHorizontal(),
54663
+ vertical: (_b = options === null || options === void 0 ? void 0 : options.vertical) !== null && _b !== void 0 ? _b : theme.getMinorTickTextPaddingVertical()
54664
+ };
54665
+ };
54666
+ DChartAxisBaseOptionParser.prototype.toTickMinorTextDirection = function (theme, options) {
54667
+ return options !== null && options !== void 0 ? options : theme.getMinorTickTextDirection();
54668
+ };
54669
+ DChartAxisBaseOptionParser.prototype.toTickMinorTextColor = function (theme, options) {
54670
+ return options !== null && options !== void 0 ? options : theme.getMinorTickTextColor();
54671
+ };
54471
54672
  DChartAxisBaseOptionParser.prototype.toLabel = function (theme, options) {
54472
54673
  var label = options === null || options === void 0 ? void 0 : options.label;
54473
54674
  if (label) {
@@ -54539,106 +54740,6 @@
54539
54740
  return DChartAxisBaseOptionParser;
54540
54741
  }());
54541
54742
 
54542
- /*
54543
- * Copyright (C) 2019 Toshiba Corporation
54544
- * SPDX-License-Identifier: Apache-2.0
54545
- */
54546
- var DChartAxisBaseBar = /** @class */ (function () {
54547
- function DChartAxisBaseBar(parser) {
54548
- this._parser = parser;
54549
- this._index = 0;
54550
- }
54551
- Object.defineProperty(DChartAxisBaseBar.prototype, "shape", {
54552
- get: function () {
54553
- var result = this._shape;
54554
- if (result == null) {
54555
- result = this.newShape();
54556
- this._shape = result;
54557
- }
54558
- return result;
54559
- },
54560
- enumerable: false,
54561
- configurable: true
54562
- });
54563
- DChartAxisBaseBar.prototype.newShape = function () {
54564
- var _a;
54565
- var parser = this._parser;
54566
- var bar = parser.bar;
54567
- var result = new EShapeBar();
54568
- result.points.position = this.newShapePosition();
54569
- result.points.style = (_a = bar.style) !== null && _a !== void 0 ? _a : EShapePointsStyle.NONE;
54570
- result.stroke.copy(bar.stroke);
54571
- result.text.copy(parser.label);
54572
- return result;
54573
- };
54574
- DChartAxisBaseBar.prototype.newShapePosition = function () {
54575
- switch (this._parser.position) {
54576
- case DChartAxisPosition.LEFT:
54577
- case DChartAxisPosition.RIGHT:
54578
- return EShapeBarPosition.TOP;
54579
- default:
54580
- return EShapeBarPosition.LEFT;
54581
- }
54582
- };
54583
- DChartAxisBaseBar.prototype.bind = function (container, index) {
54584
- this._container = container;
54585
- this._index = index;
54586
- this.shape.attach(container.container);
54587
- };
54588
- DChartAxisBaseBar.prototype.unbind = function () {
54589
- var shape = this._shape;
54590
- if (shape != null) {
54591
- shape.detach();
54592
- }
54593
- this._index = 0;
54594
- this._container = undefined;
54595
- };
54596
- DChartAxisBaseBar.prototype.update = function () {
54597
- var container = this._container;
54598
- var index = this._index;
54599
- var shape = this._shape;
54600
- if (shape != null && container != null) {
54601
- var plotArea = container.plotArea;
54602
- var plotAreaWidth = plotArea.width;
54603
- var plotAreaHeight = plotArea.height;
54604
- var offset = this._parser.padding * index;
54605
- shape.disallowUploadedUpdate();
54606
- var position = shape.transform.position;
54607
- var size = shape.size;
54608
- switch (this._parser.position) {
54609
- case DChartAxisPosition.TOP:
54610
- position.set(plotAreaWidth * 0.5, 0 - offset);
54611
- size.set(plotAreaWidth, 0);
54612
- break;
54613
- case DChartAxisPosition.BOTTOM:
54614
- position.set(plotAreaWidth * 0.5, plotAreaHeight + offset);
54615
- size.set(plotAreaWidth, 0);
54616
- break;
54617
- case DChartAxisPosition.LEFT:
54618
- position.set(0 - offset, plotAreaHeight * 0.5);
54619
- size.set(0, plotAreaHeight);
54620
- break;
54621
- case DChartAxisPosition.RIGHT:
54622
- position.set(plotAreaWidth + offset, plotAreaHeight * 0.5);
54623
- size.set(0, plotAreaHeight);
54624
- break;
54625
- }
54626
- shape.allowUploadedUpdate();
54627
- return true;
54628
- }
54629
- return false;
54630
- };
54631
- DChartAxisBaseBar.prototype.destroy = function () {
54632
- var shape = this._shape;
54633
- if (shape != null) {
54634
- shape.destroy();
54635
- }
54636
- this._index = 0;
54637
- this._container = undefined;
54638
- };
54639
- return DChartAxisBaseBar;
54640
- }());
54641
-
54642
54743
  var DChartAxisBaseTickMajorGridline = /** @class */ (function () {
54643
54744
  function DChartAxisBaseTickMajorGridline(parser) {
54644
54745
  this._parser = parser;
@@ -54836,6 +54937,7 @@
54836
54937
  shape.points.size = size;
54837
54938
  shape.points.style = style;
54838
54939
  shape.stroke.copy(minor.stroke);
54940
+ shape.text.copy(minor.text);
54839
54941
  shape.size.set(0, 0);
54840
54942
  result.push(shape);
54841
54943
  }
@@ -54878,8 +54980,8 @@
54878
54980
  function DChartAxisBaseTickContainer(parser) {
54879
54981
  this._parser = parser;
54880
54982
  this._index = 0;
54881
- this._major = new DChartAxisBaseTickMajor(parser);
54882
- this._minor = new DChartAxisBaseTickMinor(parser);
54983
+ this._major = this.newMajor(parser);
54984
+ this._minor = this.newMinor(parser);
54883
54985
  this._majorTicks = [];
54884
54986
  this._minorTicks = [];
54885
54987
  }
@@ -54890,6 +54992,9 @@
54890
54992
  enumerable: false,
54891
54993
  configurable: true
54892
54994
  });
54995
+ DChartAxisBaseTickContainer.prototype.newMajor = function (parser) {
54996
+ return new DChartAxisBaseTickMajor(parser);
54997
+ };
54893
54998
  Object.defineProperty(DChartAxisBaseTickContainer.prototype, "minor", {
54894
54999
  get: function () {
54895
55000
  return this._minor;
@@ -54897,6 +55002,9 @@
54897
55002
  enumerable: false,
54898
55003
  configurable: true
54899
55004
  });
55005
+ DChartAxisBaseTickContainer.prototype.newMinor = function (parser) {
55006
+ return new DChartAxisBaseTickMinor(parser);
55007
+ };
54900
55008
  DChartAxisBaseTickContainer.prototype.bind = function (container, index) {
54901
55009
  this._container = container;
54902
55010
  this._index = index;
@@ -54973,9 +55081,10 @@
54973
55081
  var minorCountPerMajor = minorTick.count;
54974
55082
  var minorCount = (majorCapacity + 1) * minorCountPerMajor;
54975
55083
  var minorStep = minorTick.step;
55084
+ var minorFormatter = minorTick.formatter;
54976
55085
  var majorTicks = this._majorTicks;
54977
55086
  var minorTicks = this._minorTicks;
54978
- coordinate.ticks(domainMin, domainMax, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorTicks, minorTicks);
55087
+ this.newTicks(coordinate, domainMin, domainMax, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorTicks, minorTicks);
54979
55088
  var a = transform.a;
54980
55089
  var tx = transform.tx;
54981
55090
  for (var i = 0; i < majorCapacity; ++i) {
@@ -54986,24 +55095,15 @@
54986
55095
  var majorTickProjectedPosition = majorTicks[imajorTick + 1];
54987
55096
  var majotTickPositionX = a * majorTickProjectedPosition + tx;
54988
55097
  var majorTickStep = majorTicks[imajorTick + 2];
54989
- majorShape.disallowUploadedUpdate();
54990
- majorShape.visible = true;
54991
- majorShape.transform.position.set(majotTickPositionX, shapePositionY);
54992
- majorShape.text.value = majorFormatter.format(majorTickPosition, majorTickStep);
54993
- majorShape.allowUploadedUpdate();
55098
+ this.showMajor(majorShape, majotTickPositionX, shapePositionY, majorFormatter === null || majorFormatter === void 0 ? void 0 : majorFormatter.format(majorTickPosition, majorTickStep));
54994
55099
  if (i < gridlineShapes.length) {
54995
- var gridlineShape = gridlineShapes[i];
54996
- gridlineShape.disallowUploadedUpdate();
54997
- gridlineShape.visible = true;
54998
- gridlineShape.transform.position.set(majotTickPositionX, plotAreaHeight * 0.5);
54999
- gridlineShape.size.set(0, plotAreaHeight);
55000
- gridlineShape.allowUploadedUpdate();
55100
+ this.showMajorGridline(gridlineShapes[i], majorTickPosition, majotTickPositionX, plotAreaHeight * 0.5, 0, plotAreaHeight);
55001
55101
  }
55002
55102
  }
55003
55103
  else {
55004
- majorShape.visible = false;
55005
- if (gridlineShapes) {
55006
- gridlineShapes[i].visible = false;
55104
+ this.hideMajor(majorShape);
55105
+ if (i < gridlineShapes.length) {
55106
+ this.hideMajorGridline(gridlineShapes[i]);
55007
55107
  }
55008
55108
  }
55009
55109
  }
@@ -55011,15 +55111,14 @@
55011
55111
  var minorShape = minorShapes[i];
55012
55112
  var iminorTick = i * 3;
55013
55113
  var minorTickPosition = minorTicks[iminorTick + 0];
55014
- var minorTickProjectedPosition = minorTicks[iminorTick + 1];
55015
55114
  if (!isNaN(minorTickPosition)) {
55016
- minorShape.disallowUploadedUpdate();
55017
- minorShape.visible = true;
55018
- minorShape.transform.position.set(a * minorTickProjectedPosition + tx, shapePositionY);
55019
- minorShape.allowUploadedUpdate();
55115
+ var minorTickProjectedPosition = minorTicks[iminorTick + 1];
55116
+ var minorTickPositionX = a * minorTickProjectedPosition + tx;
55117
+ var minorTickStep = minorTicks[iminorTick + 2];
55118
+ this.showMinor(minorShape, minorTickPositionX, shapePositionY, minorFormatter === null || minorFormatter === void 0 ? void 0 : minorFormatter.format(minorTickPosition, minorTickStep));
55020
55119
  }
55021
55120
  else {
55022
- minorShape.visible = false;
55121
+ this.hideMinor(minorShape);
55023
55122
  }
55024
55123
  }
55025
55124
  return true;
@@ -55035,9 +55134,10 @@
55035
55134
  var minorCountPerMajor = minorTick.count;
55036
55135
  var minorCount = (majorCapacity + 1) * minorCountPerMajor;
55037
55136
  var minorStep = minorTick.step;
55137
+ var minorFormatter = minorTick.formatter;
55038
55138
  var majorTicks = this._majorTicks;
55039
55139
  var minorTicks = this._minorTicks;
55040
- coordinate.ticks(domainMin, domainMax, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorTicks, minorTicks);
55140
+ this.newTicks(coordinate, domainMin, domainMax, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorTicks, minorTicks);
55041
55141
  var d = transform.d;
55042
55142
  var ty = transform.ty;
55043
55143
  for (var i = 0; i < majorCapacity; ++i) {
@@ -55048,24 +55148,15 @@
55048
55148
  var majorTickProjectedPosition = majorTicks[imajorTick + 1];
55049
55149
  var majotTickPositionY = d * majorTickProjectedPosition + ty;
55050
55150
  var majorTickStep = majorTicks[imajorTick + 2];
55051
- majorShape.disallowUploadedUpdate();
55052
- majorShape.visible = true;
55053
- majorShape.transform.position.set(shapePositionX, majotTickPositionY);
55054
- majorShape.text.value = majorFormatter.format(majorTickPosition, majorTickStep);
55055
- majorShape.allowUploadedUpdate();
55151
+ this.showMajor(majorShape, shapePositionX, majotTickPositionY, majorFormatter === null || majorFormatter === void 0 ? void 0 : majorFormatter.format(majorTickPosition, majorTickStep));
55056
55152
  if (i < gridlineShapes.length) {
55057
- var gridlineShape = gridlineShapes[i];
55058
- gridlineShape.disallowUploadedUpdate();
55059
- gridlineShape.visible = true;
55060
- gridlineShape.transform.position.set(plotAreaWidth * 0.5, majotTickPositionY);
55061
- gridlineShape.size.set(plotAreaWidth, 0);
55062
- gridlineShape.allowUploadedUpdate();
55153
+ this.showMajorGridline(gridlineShapes[i], majorTickPosition, plotAreaWidth * 0.5, majotTickPositionY, plotAreaWidth, 0);
55063
55154
  }
55064
55155
  }
55065
55156
  else {
55066
- majorShape.visible = false;
55067
- if (gridlineShapes) {
55068
- gridlineShapes[i].visible = false;
55157
+ this.hideMajor(majorShape);
55158
+ if (i < gridlineShapes.length) {
55159
+ this.hideMajorGridline(gridlineShapes[i]);
55069
55160
  }
55070
55161
  }
55071
55162
  }
@@ -55073,19 +55164,51 @@
55073
55164
  var minorShape = minorShapes[i];
55074
55165
  var iminorTick = i * 3;
55075
55166
  var minorTickPosition = minorTicks[iminorTick + 0];
55076
- var minorTickProjectedPosition = minorTicks[iminorTick + 1];
55077
55167
  if (!isNaN(minorTickPosition)) {
55078
- minorShape.disallowUploadedUpdate();
55079
- minorShape.visible = true;
55080
- minorShape.transform.position.set(shapePositionX, d * minorTickProjectedPosition + ty);
55081
- minorShape.allowUploadedUpdate();
55168
+ var minorTickProjectedPosition = minorTicks[iminorTick + 1];
55169
+ var minorTickPositionY = d * minorTickProjectedPosition + ty;
55170
+ var minorTickStep = minorTicks[iminorTick + 2];
55171
+ this.showMinor(minorShape, shapePositionX, minorTickPositionY, minorFormatter === null || minorFormatter === void 0 ? void 0 : minorFormatter.format(minorTickPosition, minorTickStep));
55082
55172
  }
55083
55173
  else {
55084
- minorShape.visible = false;
55174
+ this.hideMinor(minorShape);
55085
55175
  }
55086
55176
  }
55087
55177
  return true;
55088
55178
  };
55179
+ DChartAxisBaseTickContainer.prototype.showMajor = function (shape, x, y, text) {
55180
+ shape.disallowUploadedUpdate();
55181
+ shape.visible = true;
55182
+ shape.transform.position.set(x, y);
55183
+ shape.text.value = text != null ? text : "";
55184
+ shape.allowUploadedUpdate();
55185
+ };
55186
+ DChartAxisBaseTickContainer.prototype.showMajorGridline = function (shape, value, x, y, sx, sy) {
55187
+ shape.disallowUploadedUpdate();
55188
+ shape.visible = true;
55189
+ shape.transform.position.set(x, y);
55190
+ shape.size.set(sx, sy);
55191
+ shape.allowUploadedUpdate();
55192
+ };
55193
+ DChartAxisBaseTickContainer.prototype.hideMajor = function (shape) {
55194
+ shape.visible = false;
55195
+ };
55196
+ DChartAxisBaseTickContainer.prototype.hideMajorGridline = function (shape) {
55197
+ shape.visible = false;
55198
+ };
55199
+ DChartAxisBaseTickContainer.prototype.showMinor = function (shape, x, y, text) {
55200
+ shape.disallowUploadedUpdate();
55201
+ shape.visible = true;
55202
+ shape.transform.position.set(x, y);
55203
+ shape.text.value = text != null ? text : "";
55204
+ shape.allowUploadedUpdate();
55205
+ };
55206
+ DChartAxisBaseTickContainer.prototype.hideMinor = function (shape) {
55207
+ shape.visible = false;
55208
+ };
55209
+ DChartAxisBaseTickContainer.prototype.newTicks = function (coordinate, domainMin, domainMax, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
55210
+ coordinate.ticks(domainMin, domainMax, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult);
55211
+ };
55089
55212
  DChartAxisBaseTickContainer.prototype.destroy = function () {
55090
55213
  this._major.destroy();
55091
55214
  this._minor.destroy();
@@ -55106,9 +55229,16 @@
55106
55229
  var parser = new DChartAxisBaseOptionParser(theme, options);
55107
55230
  this._parser = parser;
55108
55231
  this._index = 0;
55109
- this._bar = new DChartAxisBaseBar(parser);
55110
- this._tick = new DChartAxisBaseTickContainer(parser);
55232
+ this._bar = this.newBar(parser);
55233
+ this._tick = this.newTick(parser);
55111
55234
  }
55235
+ Object.defineProperty(DChartAxisBase.prototype, "parser", {
55236
+ get: function () {
55237
+ return this._parser;
55238
+ },
55239
+ enumerable: false,
55240
+ configurable: true
55241
+ });
55112
55242
  Object.defineProperty(DChartAxisBase.prototype, "position", {
55113
55243
  get: function () {
55114
55244
  return this._parser.position;
@@ -55123,6 +55253,9 @@
55123
55253
  enumerable: false,
55124
55254
  configurable: true
55125
55255
  });
55256
+ DChartAxisBase.prototype.newBar = function (parser) {
55257
+ return new DChartAxisBaseBar(parser);
55258
+ };
55126
55259
  Object.defineProperty(DChartAxisBase.prototype, "tick", {
55127
55260
  get: function () {
55128
55261
  return this._tick;
@@ -55130,6 +55263,9 @@
55130
55263
  enumerable: false,
55131
55264
  configurable: true
55132
55265
  });
55266
+ DChartAxisBase.prototype.newTick = function (parser) {
55267
+ return new DChartAxisBaseTickContainer(parser);
55268
+ };
55133
55269
  DChartAxisBase.prototype.bind = function (container, index) {
55134
55270
  this._container = container;
55135
55271
  this._index = index;
@@ -55162,7 +55298,8 @@
55162
55298
  this._container = undefined;
55163
55299
  };
55164
55300
  DChartAxisBase.prototype.toTheme = function (options) {
55165
- return (options && options.theme) || this.getThemeDefault();
55301
+ var _a;
55302
+ return (_a = options === null || options === void 0 ? void 0 : options.theme) !== null && _a !== void 0 ? _a : this.getThemeDefault();
55166
55303
  };
55167
55304
  DChartAxisBase.prototype.getThemeDefault = function () {
55168
55305
  return DThemes.getInstance().get(this.getType());
@@ -55360,6 +55497,342 @@
55360
55497
  Y: 1
55361
55498
  };
55362
55499
 
55500
+ /*
55501
+ * Copyright (C) 2019 Toshiba Corporation
55502
+ * SPDX-License-Identifier: Apache-2.0
55503
+ */
55504
+ var DChartCoordinateTransformImpl = /** @class */ (function () {
55505
+ function DChartCoordinateTransformImpl(options) {
55506
+ this._theme = this.toTheme(options);
55507
+ this._id = 0;
55508
+ this._isTranslationEnabled = options === null || options === void 0 ? void 0 : options.translation;
55509
+ this._translate = 0;
55510
+ this._isScalingEnabled = options === null || options === void 0 ? void 0 : options.scaling;
55511
+ this._scale = 1;
55512
+ this._itranslate = 0;
55513
+ this._iscale = 1;
55514
+ }
55515
+ Object.defineProperty(DChartCoordinateTransformImpl.prototype, "id", {
55516
+ get: function () {
55517
+ return this._id;
55518
+ },
55519
+ enumerable: false,
55520
+ configurable: true
55521
+ });
55522
+ Object.defineProperty(DChartCoordinateTransformImpl.prototype, "translate", {
55523
+ get: function () {
55524
+ return this._translate;
55525
+ },
55526
+ set: function (translate) {
55527
+ this.set(translate);
55528
+ },
55529
+ enumerable: false,
55530
+ configurable: true
55531
+ });
55532
+ Object.defineProperty(DChartCoordinateTransformImpl.prototype, "scale", {
55533
+ get: function () {
55534
+ return this._scale;
55535
+ },
55536
+ set: function (scale) {
55537
+ this.set(undefined, scale);
55538
+ },
55539
+ enumerable: false,
55540
+ configurable: true
55541
+ });
55542
+ DChartCoordinateTransformImpl.prototype.bind = function (container, direction) {
55543
+ this.set(0, direction === DChartCoordinateDirection.X ? +1 : -1);
55544
+ };
55545
+ DChartCoordinateTransformImpl.prototype.unbind = function () {
55546
+ // DO NOTHING
55547
+ };
55548
+ DChartCoordinateTransformImpl.prototype.set = function (translate, scale) {
55549
+ var isChanged = false;
55550
+ if (translate != null &&
55551
+ this._isTranslationEnabled !== false &&
55552
+ this._translate !== translate) {
55553
+ isChanged = true;
55554
+ this._translate = translate;
55555
+ }
55556
+ if (scale != null && this._isScalingEnabled !== false && this._scale !== scale) {
55557
+ isChanged = true;
55558
+ this._scale = scale;
55559
+ }
55560
+ if (isChanged) {
55561
+ this._id += 1;
55562
+ this._iscale = this._theme.isZero(this._scale) ? 0 : 1 / this._scale;
55563
+ this._itranslate = -this._translate * this._iscale;
55564
+ }
55565
+ };
55566
+ DChartCoordinateTransformImpl.prototype.blend = function (ratio, mark) {
55567
+ var ratioi = 1 - ratio;
55568
+ var newTranslate = mark.newTranslate * ratio + mark.oldTranslate * ratioi;
55569
+ var newScale = mark.newScale * ratio + mark.oldScale * ratioi;
55570
+ this.set(newTranslate, newScale);
55571
+ };
55572
+ DChartCoordinateTransformImpl.prototype.map = function (value) {
55573
+ return this._translate + this._scale * value;
55574
+ };
55575
+ DChartCoordinateTransformImpl.prototype.mapAll = function (values, ifrom, iend, stride, offset) {
55576
+ var translate = this._translate;
55577
+ var scale = this._scale;
55578
+ for (var i = ifrom + offset; i < iend; i += stride) {
55579
+ values[i] = translate + scale * values[i];
55580
+ }
55581
+ };
55582
+ DChartCoordinateTransformImpl.prototype.unmap = function (value) {
55583
+ return this._itranslate + this._iscale * value;
55584
+ };
55585
+ DChartCoordinateTransformImpl.prototype.unmapAll = function (values, ifrom, iend, stride, offset) {
55586
+ var itranslate = this._itranslate;
55587
+ var iscale = this._iscale;
55588
+ for (var i = ifrom + offset; i < iend; i += stride) {
55589
+ values[i] = itranslate + iscale * values[i];
55590
+ }
55591
+ };
55592
+ DChartCoordinateTransformImpl.prototype.toTheme = function (options) {
55593
+ return (options && options.theme) || this.getThemeDefault();
55594
+ };
55595
+ DChartCoordinateTransformImpl.prototype.getThemeDefault = function () {
55596
+ return DThemes.getInstance().get(this.getType());
55597
+ };
55598
+ DChartCoordinateTransformImpl.prototype.getType = function () {
55599
+ return "DChartCoordinateTransform";
55600
+ };
55601
+ return DChartCoordinateTransformImpl;
55602
+ }());
55603
+
55604
+ var DChartCoordinateTransformMarkImpl = /** @class */ (function () {
55605
+ function DChartCoordinateTransformMarkImpl() {
55606
+ this.oldTranslate = 0;
55607
+ this.oldScale = 1;
55608
+ this.newTranslate = 0;
55609
+ this.newScale = 1;
55610
+ }
55611
+ DChartCoordinateTransformMarkImpl.prototype.set = function (translate, scale) {
55612
+ if (translate != null) {
55613
+ this.newTranslate = translate;
55614
+ }
55615
+ if (scale != null) {
55616
+ this.newScale = scale;
55617
+ }
55618
+ };
55619
+ return DChartCoordinateTransformMarkImpl;
55620
+ }());
55621
+
55622
+ /*
55623
+ * Copyright (C) 2019 Toshiba Corporation
55624
+ * SPDX-License-Identifier: Apache-2.0
55625
+ */
55626
+ var DChartRegionImpl = /** @class */ (function () {
55627
+ function DChartRegionImpl(from, to) {
55628
+ this.from = from;
55629
+ this.to = to;
55630
+ }
55631
+ DChartRegionImpl.prototype.set = function (from, to) {
55632
+ if (from != null) {
55633
+ this.from = from;
55634
+ }
55635
+ if (to != null) {
55636
+ this.to = to;
55637
+ }
55638
+ return this;
55639
+ };
55640
+ DChartRegionImpl.prototype.add = function (from, to) {
55641
+ if (!isNaN$1(from)) {
55642
+ this.from = isNaN$1(this.from) ? from : Math.min(this.from, from);
55643
+ }
55644
+ if (!isNaN$1(to)) {
55645
+ this.to = isNaN$1(this.to) ? to : Math.max(this.to, to);
55646
+ }
55647
+ return this;
55648
+ };
55649
+ DChartRegionImpl.prototype.clear = function () {
55650
+ this.from = NaN;
55651
+ this.to = NaN;
55652
+ return this;
55653
+ };
55654
+ return DChartRegionImpl;
55655
+ }());
55656
+
55657
+ /*
55658
+ * Copyright (C) 2019 Toshiba Corporation
55659
+ * SPDX-License-Identifier: Apache-2.0
55660
+ */
55661
+ var DChartCoordinateBase = /** @class */ (function () {
55662
+ function DChartCoordinateBase(options) {
55663
+ this._id = 0;
55664
+ this._direction = DChartCoordinateDirection.X;
55665
+ this._theme = this.toTheme(options);
55666
+ this._transform = this.newTransform(options === null || options === void 0 ? void 0 : options.transform);
55667
+ this._tick = this.newTick(options === null || options === void 0 ? void 0 : options.tick);
55668
+ this._work = this.newRegion();
55669
+ this._mark = this.newMark();
55670
+ this._from = options === null || options === void 0 ? void 0 : options.from;
55671
+ this._to = options === null || options === void 0 ? void 0 : options.to;
55672
+ }
55673
+ DChartCoordinateBase.prototype.newTransform = function (options) {
55674
+ return new DChartCoordinateTransformImpl(options);
55675
+ };
55676
+ DChartCoordinateBase.prototype.newRegion = function () {
55677
+ return new DChartRegionImpl(NaN, NaN);
55678
+ };
55679
+ DChartCoordinateBase.prototype.newMark = function () {
55680
+ return new DChartCoordinateTransformMarkImpl();
55681
+ };
55682
+ Object.defineProperty(DChartCoordinateBase.prototype, "from", {
55683
+ get: function () {
55684
+ return this._from;
55685
+ },
55686
+ set: function (from) {
55687
+ this._from = from;
55688
+ },
55689
+ enumerable: false,
55690
+ configurable: true
55691
+ });
55692
+ Object.defineProperty(DChartCoordinateBase.prototype, "to", {
55693
+ get: function () {
55694
+ return this._to;
55695
+ },
55696
+ set: function (to) {
55697
+ this._to = to;
55698
+ },
55699
+ enumerable: false,
55700
+ configurable: true
55701
+ });
55702
+ DChartCoordinateBase.prototype.bind = function (container, direction) {
55703
+ this._container = container;
55704
+ this._direction = direction;
55705
+ this._transform.bind(container, direction);
55706
+ };
55707
+ DChartCoordinateBase.prototype.unbind = function () {
55708
+ this._container = undefined;
55709
+ this._transform.unbind();
55710
+ };
55711
+ DChartCoordinateBase.prototype.fit = function (from, to) {
55712
+ this.doFit(from, to, this._transform);
55713
+ };
55714
+ DChartCoordinateBase.prototype.mark = function (from, to) {
55715
+ var mark = this._mark;
55716
+ var transform = this._transform;
55717
+ mark.oldTranslate = transform.translate;
55718
+ mark.oldScale = transform.scale;
55719
+ this.doFit(from, to, mark);
55720
+ };
55721
+ DChartCoordinateBase.prototype.blend = function (ratio) {
55722
+ this._transform.blend(ratio, this._mark);
55723
+ };
55724
+ DChartCoordinateBase.prototype.doFit = function (from, to, result) {
55725
+ var container = this._container;
55726
+ if (container) {
55727
+ var plotArea = container.container.plotArea;
55728
+ var padding = plotArea.padding;
55729
+ var work = this._work;
55730
+ switch (this._direction) {
55731
+ case DChartCoordinateDirection.X:
55732
+ this.doFit_(padding.getLeft(), plotArea.width - padding.getRight(), this.toFitDomain(from, to, plotArea, work), result);
55733
+ break;
55734
+ case DChartCoordinateDirection.Y:
55735
+ this.doFit_(plotArea.height - padding.getBottom(), padding.getTop(), this.toFitRange(from, to, plotArea, work), result);
55736
+ break;
55737
+ }
55738
+ }
55739
+ };
55740
+ DChartCoordinateBase.prototype.toFitDomain = function (from, to, plotArea, result) {
55741
+ if (from == null) {
55742
+ from = this._from;
55743
+ }
55744
+ if (to == null) {
55745
+ to = this._to;
55746
+ }
55747
+ if (from != null && to != null) {
55748
+ result.set(from, to);
55749
+ }
55750
+ else {
55751
+ plotArea.series.getDomain(this, result);
55752
+ result.set(from, to);
55753
+ }
55754
+ return result;
55755
+ };
55756
+ DChartCoordinateBase.prototype.toFitRange = function (from, to, plotArea, result) {
55757
+ if (from == null) {
55758
+ from = this._from;
55759
+ }
55760
+ if (to == null) {
55761
+ to = this._to;
55762
+ }
55763
+ if (from != null && to != null) {
55764
+ result.set(from, to);
55765
+ }
55766
+ else {
55767
+ plotArea.series.getRange(this, result);
55768
+ result.set(from, to);
55769
+ }
55770
+ return result;
55771
+ };
55772
+ DChartCoordinateBase.prototype.doFit_ = function (pixelFrom, pixelTo, region, result) {
55773
+ var regionFrom = region.from;
55774
+ var regionTo = region.to;
55775
+ if (!(isNaN$1(regionFrom) || isNaN$1(regionTo))) {
55776
+ // Scale
55777
+ var newScale = 1;
55778
+ var regionFromMapped = this.map(regionFrom);
55779
+ var regionToMapped = this.map(regionTo);
55780
+ var regionSizeMapped = regionToMapped - regionFromMapped;
55781
+ if (!this._theme.isZero(regionSizeMapped)) {
55782
+ var pixelSize = pixelTo - pixelFrom;
55783
+ newScale = pixelSize / regionSizeMapped;
55784
+ }
55785
+ else {
55786
+ newScale = pixelTo < pixelFrom ? -1 : 1;
55787
+ }
55788
+ // Translation
55789
+ var newTranslation = pixelFrom - regionFromMapped * newScale;
55790
+ // Done
55791
+ result.set(newTranslation, newScale);
55792
+ }
55793
+ };
55794
+ Object.defineProperty(DChartCoordinateBase.prototype, "id", {
55795
+ get: function () {
55796
+ return this._id;
55797
+ },
55798
+ enumerable: false,
55799
+ configurable: true
55800
+ });
55801
+ Object.defineProperty(DChartCoordinateBase.prototype, "transform", {
55802
+ get: function () {
55803
+ return this._transform;
55804
+ },
55805
+ enumerable: false,
55806
+ configurable: true
55807
+ });
55808
+ DChartCoordinateBase.prototype.map = function (value) {
55809
+ return value;
55810
+ };
55811
+ DChartCoordinateBase.prototype.mapAll = function (values, ifrom, iend, stride, offset) {
55812
+ // DO NOTHING
55813
+ };
55814
+ DChartCoordinateBase.prototype.unmap = function (value) {
55815
+ return value;
55816
+ };
55817
+ DChartCoordinateBase.prototype.unmapAll = function (values, ifrom, iend, stride, offset) {
55818
+ // DO NOTHING
55819
+ };
55820
+ DChartCoordinateBase.prototype.ticks = function (domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
55821
+ this._tick.calculate(domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, this);
55822
+ };
55823
+ DChartCoordinateBase.prototype.toTheme = function (options) {
55824
+ var _a;
55825
+ return (_a = options === null || options === void 0 ? void 0 : options.theme) !== null && _a !== void 0 ? _a : this.getThemeDefault();
55826
+ };
55827
+ DChartCoordinateBase.prototype.getThemeDefault = function () {
55828
+ return DThemes.getInstance().get(this.getType());
55829
+ };
55830
+ DChartCoordinateBase.prototype.getType = function () {
55831
+ return "DChartCoordinate";
55832
+ };
55833
+ return DChartCoordinateBase;
55834
+ }());
55835
+
55363
55836
  /*
55364
55837
  * Copyright (C) 2019 Toshiba Corporation
55365
55838
  * SPDX-License-Identifier: Apache-2.0
@@ -55659,7 +56132,8 @@
55659
56132
  }
55660
56133
  };
55661
56134
  DChartCoordinateLinearTick.prototype.toTheme = function (options) {
55662
- return (options && options.theme) || this.getThemeDefault();
56135
+ var _a;
56136
+ return (_a = options === null || options === void 0 ? void 0 : options.theme) !== null && _a !== void 0 ? _a : this.getThemeDefault();
55663
56137
  };
55664
56138
  DChartCoordinateLinearTick.prototype.getThemeDefault = function () {
55665
56139
  return DThemes.getInstance().get(this.getType());
@@ -55674,325 +56148,16 @@
55674
56148
  * Copyright (C) 2019 Toshiba Corporation
55675
56149
  * SPDX-License-Identifier: Apache-2.0
55676
56150
  */
55677
- var DChartCoordinateTransformImpl = /** @class */ (function () {
55678
- function DChartCoordinateTransformImpl(options) {
55679
- this._theme = this.toTheme(options);
55680
- this._id = 0;
55681
- this._isTranslationEnabled = options === null || options === void 0 ? void 0 : options.translation;
55682
- this._translate = 0;
55683
- this._isScalingEnabled = options === null || options === void 0 ? void 0 : options.scaling;
55684
- this._scale = 1;
55685
- this._itranslate = 0;
55686
- this._iscale = 1;
55687
- }
55688
- Object.defineProperty(DChartCoordinateTransformImpl.prototype, "id", {
55689
- get: function () {
55690
- return this._id;
55691
- },
55692
- enumerable: false,
55693
- configurable: true
55694
- });
55695
- Object.defineProperty(DChartCoordinateTransformImpl.prototype, "translate", {
55696
- get: function () {
55697
- return this._translate;
55698
- },
55699
- set: function (translate) {
55700
- this.set(translate);
55701
- },
55702
- enumerable: false,
55703
- configurable: true
55704
- });
55705
- Object.defineProperty(DChartCoordinateTransformImpl.prototype, "scale", {
55706
- get: function () {
55707
- return this._scale;
55708
- },
55709
- set: function (scale) {
55710
- this.set(undefined, scale);
55711
- },
55712
- enumerable: false,
55713
- configurable: true
55714
- });
55715
- DChartCoordinateTransformImpl.prototype.bind = function (container, direction) {
55716
- this.set(0, direction === DChartCoordinateDirection.X ? +1 : -1);
55717
- };
55718
- DChartCoordinateTransformImpl.prototype.unbind = function () {
55719
- // DO NOTHING
55720
- };
55721
- DChartCoordinateTransformImpl.prototype.set = function (translate, scale) {
55722
- var isChanged = false;
55723
- if (translate != null &&
55724
- this._isTranslationEnabled !== false &&
55725
- this._translate !== translate) {
55726
- isChanged = true;
55727
- this._translate = translate;
55728
- }
55729
- if (scale != null && this._isScalingEnabled !== false && this._scale !== scale) {
55730
- isChanged = true;
55731
- this._scale = scale;
55732
- }
55733
- if (isChanged) {
55734
- this._id += 1;
55735
- this._iscale = this._theme.isZero(this._scale) ? 0 : 1 / this._scale;
55736
- this._itranslate = -this._translate * this._iscale;
55737
- }
55738
- };
55739
- DChartCoordinateTransformImpl.prototype.blend = function (ratio, mark) {
55740
- var ratioi = 1 - ratio;
55741
- var newTranslate = mark.newTranslate * ratio + mark.oldTranslate * ratioi;
55742
- var newScale = mark.newScale * ratio + mark.oldScale * ratioi;
55743
- this.set(newTranslate, newScale);
55744
- };
55745
- DChartCoordinateTransformImpl.prototype.map = function (value) {
55746
- return this._translate + this._scale * value;
55747
- };
55748
- DChartCoordinateTransformImpl.prototype.mapAll = function (values, ifrom, iend, stride, offset) {
55749
- var translate = this._translate;
55750
- var scale = this._scale;
55751
- for (var i = ifrom + offset; i < iend; i += stride) {
55752
- values[i] = translate + scale * values[i];
55753
- }
55754
- };
55755
- DChartCoordinateTransformImpl.prototype.unmap = function (value) {
55756
- return this._itranslate + this._iscale * value;
55757
- };
55758
- DChartCoordinateTransformImpl.prototype.unmapAll = function (values, ifrom, iend, stride, offset) {
55759
- var itranslate = this._itranslate;
55760
- var iscale = this._iscale;
55761
- for (var i = ifrom + offset; i < iend; i += stride) {
55762
- values[i] = itranslate + iscale * values[i];
55763
- }
55764
- };
55765
- DChartCoordinateTransformImpl.prototype.toTheme = function (options) {
55766
- return (options && options.theme) || this.getThemeDefault();
55767
- };
55768
- DChartCoordinateTransformImpl.prototype.getThemeDefault = function () {
55769
- return DThemes.getInstance().get(this.getType());
55770
- };
55771
- DChartCoordinateTransformImpl.prototype.getType = function () {
55772
- return "DChartCoordinateTransform";
55773
- };
55774
- return DChartCoordinateTransformImpl;
55775
- }());
55776
-
55777
- var DChartCoordinateTransformMarkImpl = /** @class */ (function () {
55778
- function DChartCoordinateTransformMarkImpl() {
55779
- this.oldTranslate = 0;
55780
- this.oldScale = 1;
55781
- this.newTranslate = 0;
55782
- this.newScale = 1;
55783
- }
55784
- DChartCoordinateTransformMarkImpl.prototype.set = function (translate, scale) {
55785
- if (translate != null) {
55786
- this.newTranslate = translate;
55787
- }
55788
- if (scale != null) {
55789
- this.newScale = scale;
55790
- }
55791
- };
55792
- return DChartCoordinateTransformMarkImpl;
55793
- }());
55794
-
55795
- /*
55796
- * Copyright (C) 2019 Toshiba Corporation
55797
- * SPDX-License-Identifier: Apache-2.0
55798
- */
55799
- var DChartRegionImpl = /** @class */ (function () {
55800
- function DChartRegionImpl(from, to) {
55801
- this.from = from;
55802
- this.to = to;
55803
- }
55804
- DChartRegionImpl.prototype.set = function (from, to) {
55805
- if (from != null) {
55806
- this.from = from;
55807
- }
55808
- if (to != null) {
55809
- this.to = to;
55810
- }
55811
- return this;
55812
- };
55813
- DChartRegionImpl.prototype.add = function (from, to) {
55814
- if (!isNaN$1(from)) {
55815
- this.from = isNaN$1(this.from) ? from : Math.min(this.from, from);
55816
- }
55817
- if (!isNaN$1(to)) {
55818
- this.to = isNaN$1(this.to) ? to : Math.max(this.to, to);
55819
- }
55820
- return this;
55821
- };
55822
- DChartRegionImpl.prototype.clear = function () {
55823
- this.from = NaN;
55824
- this.to = NaN;
55825
- return this;
55826
- };
55827
- return DChartRegionImpl;
55828
- }());
55829
-
55830
- /*
55831
- * Copyright (C) 2019 Toshiba Corporation
55832
- * SPDX-License-Identifier: Apache-2.0
55833
- */
55834
- var DChartCoordinateLinear = /** @class */ (function () {
55835
- function DChartCoordinateLinear(options) {
55836
- this._id = 0;
55837
- this._direction = DChartCoordinateDirection.X;
55838
- this._theme = this.toTheme(options);
55839
- this._transform = new DChartCoordinateTransformImpl(options === null || options === void 0 ? void 0 : options.transform);
55840
- this._tick = new DChartCoordinateLinearTick(options === null || options === void 0 ? void 0 : options.tick);
55841
- this._work = new DChartRegionImpl(NaN, NaN);
55842
- this._mark = new DChartCoordinateTransformMarkImpl();
55843
- this._from = options === null || options === void 0 ? void 0 : options.from;
55844
- this._to = options === null || options === void 0 ? void 0 : options.to;
56151
+ var DChartCoordinateLinear = /** @class */ (function (_super) {
56152
+ __extends(DChartCoordinateLinear, _super);
56153
+ function DChartCoordinateLinear() {
56154
+ return _super !== null && _super.apply(this, arguments) || this;
55845
56155
  }
55846
- Object.defineProperty(DChartCoordinateLinear.prototype, "from", {
55847
- get: function () {
55848
- return this._from;
55849
- },
55850
- set: function (from) {
55851
- this._from = from;
55852
- },
55853
- enumerable: false,
55854
- configurable: true
55855
- });
55856
- Object.defineProperty(DChartCoordinateLinear.prototype, "to", {
55857
- get: function () {
55858
- return this._to;
55859
- },
55860
- set: function (to) {
55861
- this._to = to;
55862
- },
55863
- enumerable: false,
55864
- configurable: true
55865
- });
55866
- DChartCoordinateLinear.prototype.bind = function (container, direction) {
55867
- this._container = container;
55868
- this._direction = direction;
55869
- this._transform.bind(container, direction);
55870
- };
55871
- DChartCoordinateLinear.prototype.unbind = function () {
55872
- this._container = undefined;
55873
- this._transform.unbind();
55874
- };
55875
- DChartCoordinateLinear.prototype.fit = function (from, to) {
55876
- this.doFit(from, to, this._transform);
55877
- };
55878
- DChartCoordinateLinear.prototype.mark = function (from, to) {
55879
- var mark = this._mark;
55880
- var transform = this._transform;
55881
- mark.oldTranslate = transform.translate;
55882
- mark.oldScale = transform.scale;
55883
- this.doFit(from, to, mark);
55884
- };
55885
- DChartCoordinateLinear.prototype.blend = function (ratio) {
55886
- this._transform.blend(ratio, this._mark);
55887
- };
55888
- DChartCoordinateLinear.prototype.doFit = function (from, to, result) {
55889
- var container = this._container;
55890
- if (container) {
55891
- var plotArea = container.container.plotArea;
55892
- var padding = plotArea.padding;
55893
- var work = this._work;
55894
- switch (this._direction) {
55895
- case DChartCoordinateDirection.X:
55896
- this.doFit_(padding.getLeft(), plotArea.width - padding.getRight(), this.toFitDomain(from, to, plotArea, work), result);
55897
- break;
55898
- case DChartCoordinateDirection.Y:
55899
- this.doFit_(plotArea.height - padding.getBottom(), padding.getTop(), this.toFitRange(from, to, plotArea, work), result);
55900
- break;
55901
- }
55902
- }
55903
- };
55904
- DChartCoordinateLinear.prototype.toFitDomain = function (from, to, plotArea, result) {
55905
- if (from == null) {
55906
- from = this._from;
55907
- }
55908
- if (to == null) {
55909
- to = this._to;
55910
- }
55911
- if (from != null && to != null) {
55912
- result.set(from, to);
55913
- }
55914
- else {
55915
- plotArea.series.getDomain(this, result);
55916
- result.set(from, to);
55917
- }
55918
- return result;
55919
- };
55920
- DChartCoordinateLinear.prototype.toFitRange = function (from, to, plotArea, result) {
55921
- if (from == null) {
55922
- from = this._from;
55923
- }
55924
- if (to == null) {
55925
- to = this._to;
55926
- }
55927
- if (from != null && to != null) {
55928
- result.set(from, to);
55929
- }
55930
- else {
55931
- plotArea.series.getRange(this, result);
55932
- result.set(from, to);
55933
- }
55934
- return result;
55935
- };
55936
- DChartCoordinateLinear.prototype.doFit_ = function (pixelFrom, pixelTo, region, result) {
55937
- var regionFrom = region.from;
55938
- var regionTo = region.to;
55939
- if (!(isNaN$1(regionFrom) || isNaN$1(regionTo))) {
55940
- // Scale
55941
- var newScale = 1;
55942
- var regionSize = regionTo - regionFrom;
55943
- if (!this._theme.isZero(regionSize)) {
55944
- var pixelSize = pixelTo - pixelFrom;
55945
- newScale = pixelSize / regionSize;
55946
- }
55947
- else {
55948
- newScale = pixelTo < pixelFrom ? -1 : 1;
55949
- }
55950
- // Translation
55951
- var newTranslation = pixelFrom - regionFrom * newScale;
55952
- // Done
55953
- result.set(newTranslation, newScale);
55954
- }
55955
- };
55956
- Object.defineProperty(DChartCoordinateLinear.prototype, "id", {
55957
- get: function () {
55958
- return this._id;
55959
- },
55960
- enumerable: false,
55961
- configurable: true
55962
- });
55963
- Object.defineProperty(DChartCoordinateLinear.prototype, "transform", {
55964
- get: function () {
55965
- return this._transform;
55966
- },
55967
- enumerable: false,
55968
- configurable: true
55969
- });
55970
- DChartCoordinateLinear.prototype.map = function (value) {
55971
- return value;
55972
- };
55973
- DChartCoordinateLinear.prototype.mapAll = function (values, ifrom, iend, stride, offset) {
55974
- // DO NOTHING
55975
- };
55976
- DChartCoordinateLinear.prototype.unmap = function (value) {
55977
- return value;
55978
- };
55979
- DChartCoordinateLinear.prototype.unmapAll = function (values, ifrom, iend, stride, offset) {
55980
- // DO NOTHING
55981
- };
55982
- DChartCoordinateLinear.prototype.ticks = function (domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
55983
- this._tick.calculate(domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, this);
55984
- };
55985
- DChartCoordinateLinear.prototype.toTheme = function (options) {
55986
- return (options && options.theme) || this.getThemeDefault();
55987
- };
55988
- DChartCoordinateLinear.prototype.getThemeDefault = function () {
55989
- return DThemes.getInstance().get(this.getType());
55990
- };
55991
- DChartCoordinateLinear.prototype.getType = function () {
55992
- return "DChartCoordinate";
56156
+ DChartCoordinateLinear.prototype.newTick = function (options) {
56157
+ return new DChartCoordinateLinearTick(options);
55993
56158
  };
55994
56159
  return DChartCoordinateLinear;
55995
- }());
56160
+ }(DChartCoordinateBase));
55996
56161
 
55997
56162
  /*
55998
56163
  * Copyright (C) 2019 Toshiba Corporation
@@ -56117,7 +56282,8 @@
56117
56282
  }
56118
56283
  };
56119
56284
  DChartCoordinateLogTick.prototype.toTheme = function (options) {
56120
- return (options && options.theme) || this.getThemeDefault();
56285
+ var _a;
56286
+ return (_a = options === null || options === void 0 ? void 0 : options.theme) !== null && _a !== void 0 ? _a : this.getThemeDefault();
56121
56287
  };
56122
56288
  DChartCoordinateLogTick.prototype.getThemeDefault = function () {
56123
56289
  return DThemes.getInstance().get(this.getType());
@@ -56132,142 +56298,14 @@
56132
56298
  * Copyright (C) 2019 Toshiba Corporation
56133
56299
  * SPDX-License-Identifier: Apache-2.0
56134
56300
  */
56135
- var DChartCoordinateLog = /** @class */ (function () {
56136
- function DChartCoordinateLog(options) {
56137
- this._id = 0;
56138
- this._direction = DChartCoordinateDirection.X;
56139
- this._theme = this.toTheme(options);
56140
- this._transform = new DChartCoordinateTransformImpl(options === null || options === void 0 ? void 0 : options.transform);
56141
- this._tick = new DChartCoordinateLogTick(options === null || options === void 0 ? void 0 : options.tick);
56142
- this._work = new DChartRegionImpl(NaN, NaN);
56143
- this._mark = new DChartCoordinateTransformMarkImpl();
56144
- this._from = options === null || options === void 0 ? void 0 : options.from;
56145
- this._to = options === null || options === void 0 ? void 0 : options.to;
56301
+ var DChartCoordinateLog = /** @class */ (function (_super) {
56302
+ __extends(DChartCoordinateLog, _super);
56303
+ function DChartCoordinateLog() {
56304
+ return _super !== null && _super.apply(this, arguments) || this;
56146
56305
  }
56147
- Object.defineProperty(DChartCoordinateLog.prototype, "from", {
56148
- get: function () {
56149
- return this._from;
56150
- },
56151
- set: function (from) {
56152
- this._from = from;
56153
- },
56154
- enumerable: false,
56155
- configurable: true
56156
- });
56157
- Object.defineProperty(DChartCoordinateLog.prototype, "to", {
56158
- get: function () {
56159
- return this._to;
56160
- },
56161
- set: function (to) {
56162
- this._to = to;
56163
- },
56164
- enumerable: false,
56165
- configurable: true
56166
- });
56167
- DChartCoordinateLog.prototype.bind = function (container, direction) {
56168
- this._container = container;
56169
- this._direction = direction;
56170
- };
56171
- DChartCoordinateLog.prototype.unbind = function () {
56172
- this._container = undefined;
56173
- };
56174
- DChartCoordinateLog.prototype.fit = function (from, to) {
56175
- this.doFit(from, to, this._transform);
56176
- };
56177
- DChartCoordinateLog.prototype.mark = function (from, to) {
56178
- var mark = this._mark;
56179
- var transform = this._transform;
56180
- mark.oldTranslate = transform.translate;
56181
- mark.oldScale = transform.scale;
56182
- this.doFit(from, to, mark);
56183
- };
56184
- DChartCoordinateLog.prototype.blend = function (ratio) {
56185
- this._transform.blend(ratio, this._mark);
56186
- };
56187
- DChartCoordinateLog.prototype.doFit = function (from, to, result) {
56188
- var container = this._container;
56189
- if (container) {
56190
- var plotArea = container.container.plotArea;
56191
- var padding = plotArea.padding;
56192
- var work = this._work;
56193
- switch (this._direction) {
56194
- case DChartCoordinateDirection.X:
56195
- this.doFit_(padding.getLeft(), plotArea.width - padding.getRight(), this.toFitDomain(from, to, plotArea, work), result);
56196
- break;
56197
- case DChartCoordinateDirection.Y:
56198
- this.doFit_(plotArea.height - padding.getBottom(), padding.getTop(), this.toFitRange(from, to, plotArea, work), result);
56199
- break;
56200
- }
56201
- }
56202
- };
56203
- DChartCoordinateLog.prototype.toFitDomain = function (from, to, plotArea, result) {
56204
- if (from == null) {
56205
- from = this._from;
56206
- }
56207
- if (to == null) {
56208
- to = this._to;
56209
- }
56210
- if (from != null && to != null) {
56211
- result.set(from, to);
56212
- }
56213
- else {
56214
- plotArea.series.getDomain(this, result);
56215
- result.set(from, to);
56216
- }
56217
- return result;
56218
- };
56219
- DChartCoordinateLog.prototype.toFitRange = function (from, to, plotArea, result) {
56220
- if (from == null) {
56221
- from = this._from;
56222
- }
56223
- if (to == null) {
56224
- to = this._to;
56225
- }
56226
- if (from != null && to != null) {
56227
- result.set(from, to);
56228
- }
56229
- else {
56230
- plotArea.series.getRange(this, result);
56231
- result.set(from, to);
56232
- }
56233
- return result;
56306
+ DChartCoordinateLog.prototype.newTick = function (options) {
56307
+ return new DChartCoordinateLogTick(options);
56234
56308
  };
56235
- DChartCoordinateLog.prototype.doFit_ = function (pixelFrom, pixelTo, region, result) {
56236
- var regionFrom = region.from;
56237
- var regionTo = region.to;
56238
- if (!(isNaN$1(regionFrom) || isNaN$1(regionTo))) {
56239
- // Scale
56240
- var newScale = 1;
56241
- var regionFromMapped = this.map(regionFrom);
56242
- var regionToMapped = this.map(regionTo);
56243
- var regionSizeMapped = regionToMapped - regionFromMapped;
56244
- if (!this._theme.isZero(regionSizeMapped)) {
56245
- var pixelSize = pixelTo - pixelFrom;
56246
- newScale = pixelSize / regionSizeMapped;
56247
- }
56248
- else {
56249
- newScale = pixelTo < pixelFrom ? -1 : 1;
56250
- }
56251
- // Translation
56252
- var newTranslation = pixelFrom - regionFromMapped * newScale;
56253
- // Done
56254
- result.set(newTranslation, newScale);
56255
- }
56256
- };
56257
- Object.defineProperty(DChartCoordinateLog.prototype, "id", {
56258
- get: function () {
56259
- return this._id;
56260
- },
56261
- enumerable: false,
56262
- configurable: true
56263
- });
56264
- Object.defineProperty(DChartCoordinateLog.prototype, "transform", {
56265
- get: function () {
56266
- return this._transform;
56267
- },
56268
- enumerable: false,
56269
- configurable: true
56270
- });
56271
56309
  DChartCoordinateLog.prototype.map = function (value) {
56272
56310
  return Math.log(Math.max(0, value)) / Math.LN10;
56273
56311
  };
@@ -56286,20 +56324,8 @@
56286
56324
  values[i] = Math.pow(10, values[i]);
56287
56325
  }
56288
56326
  };
56289
- DChartCoordinateLog.prototype.ticks = function (domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult) {
56290
- this._tick.calculate(domainFrom, domainTo, majorCount, majorCapacity, majorStep, minorCountPerMajor, minorCount, minorStep, majorResult, minorResult, this);
56291
- };
56292
- DChartCoordinateLog.prototype.toTheme = function (options) {
56293
- return (options && options.theme) || this.getThemeDefault();
56294
- };
56295
- DChartCoordinateLog.prototype.getThemeDefault = function () {
56296
- return DThemes.getInstance().get(this.getType());
56297
- };
56298
- DChartCoordinateLog.prototype.getType = function () {
56299
- return "DChartCoordinate";
56300
- };
56301
56327
  return DChartCoordinateLog;
56302
- }());
56328
+ }(DChartCoordinateBase));
56303
56329
 
56304
56330
  /*
56305
56331
  * Copyright (C) 2019 Toshiba Corporation
@@ -57852,10 +57878,12 @@
57852
57878
  var DChartSeriesLineOfAny = /** @class */ (function (_super) {
57853
57879
  __extends(DChartSeriesLineOfAny, _super);
57854
57880
  function DChartSeriesLineOfAny(options) {
57855
- var _this = _super.call(this, options) || this;
57881
+ var _this = this;
57882
+ var _a;
57883
+ _this = _super.call(this, options) || this;
57856
57884
  _this._line = null;
57857
57885
  _this._options = options;
57858
- _this._points = (options && options.points) || [];
57886
+ _this._points = (_a = options === null || options === void 0 ? void 0 : options.points) !== null && _a !== void 0 ? _a : [];
57859
57887
  _this._pointId = 0;
57860
57888
  _this._pointIdUpdated = NaN;
57861
57889
  return _this;
@@ -69312,6 +69340,43 @@
69312
69340
  result.height -= dy;
69313
69341
  }
69314
69342
  };
69343
+ /**
69344
+ * Scroll to the given row or row index.
69345
+ *
69346
+ * @param target a row or an row index to which the body scrolls to.
69347
+ * @returns true if succeeded
69348
+ */
69349
+ DTableBody.prototype.scrollTo = function (target) {
69350
+ var parent = this.parent;
69351
+ if (parent == null) {
69352
+ return false;
69353
+ }
69354
+ var parentParent = parent.parent;
69355
+ if (parentParent == null) {
69356
+ return false;
69357
+ }
69358
+ var rowIndexMapped = -1;
69359
+ if (isNumber(target)) {
69360
+ if (0 <= target && target < this.data.mapped.size()) {
69361
+ rowIndexMapped = target;
69362
+ }
69363
+ }
69364
+ else {
69365
+ this.data.mapped.each(function (row, _, index) {
69366
+ if (row === target) {
69367
+ rowIndexMapped = index;
69368
+ return false;
69369
+ }
69370
+ return true;
69371
+ });
69372
+ }
69373
+ if (rowIndexMapped < 0) {
69374
+ return false;
69375
+ }
69376
+ parent.position.y = Math.max(Math.min(0, parentParent.height - parent.height), -rowIndexMapped * this._rowHeight);
69377
+ DApplications.update(this);
69378
+ return true;
69379
+ };
69315
69380
  DTableBody.prototype.toRowIndexMapped = function (local) {
69316
69381
  if (0 <= this.parent.position.y + local.y) {
69317
69382
  return Math.floor(local.y / this._rowHeight);
@@ -70865,7 +70930,7 @@
70865
70930
  }
70866
70931
  else {
70867
70932
  return function (row) {
70868
- return key_1 in row ? row[key_1] : def;
70933
+ return Object.prototype.hasOwnProperty.call(row, key_1) ? row[key_1] : def;
70869
70934
  };
70870
70935
  }
70871
70936
  }
@@ -70884,7 +70949,7 @@
70884
70949
  row = row[path[i]];
70885
70950
  }
70886
70951
  var key = path[path.length - 1];
70887
- return key in row ? row[key] : def;
70952
+ return Object.prototype.hasOwnProperty.call(row, key) ? row[key] : def;
70888
70953
  };
70889
70954
  }
70890
70955
  }
@@ -70940,7 +71005,7 @@
70940
71005
  if (pathLength_1 <= 1) {
70941
71006
  var key_3 = path[0];
70942
71007
  return function (row) {
70943
- return key_3 in row;
71008
+ return Object.prototype.hasOwnProperty.call(row, key_3);
70944
71009
  };
70945
71010
  }
70946
71011
  else {
@@ -73737,7 +73802,12 @@
73737
73802
  DButton: DButton,
73738
73803
  DCanvasContainer: DCanvasContainer,
73739
73804
  DCanvas: DCanvas,
73805
+ DChartAxisBaseBar: DChartAxisBaseBar,
73740
73806
  DChartAxisBaseOptionParser: DChartAxisBaseOptionParser,
73807
+ DChartAxisBaseTickContainer: DChartAxisBaseTickContainer,
73808
+ DChartAxisBaseTickMajorGridline: DChartAxisBaseTickMajorGridline,
73809
+ DChartAxisBaseTickMajor: DChartAxisBaseTickMajor,
73810
+ DChartAxisBaseTickMinor: DChartAxisBaseTickMinor,
73741
73811
  DChartAxisBase: DChartAxisBase,
73742
73812
  DChartAxisContainerImpl: DChartAxisContainerImpl,
73743
73813
  DChartAxisPosition: DChartAxisPosition,
@@ -73747,6 +73817,7 @@
73747
73817
  DChartAxisY: DChartAxisY,
73748
73818
  DChartColorSet1: DChartColorSet1,
73749
73819
  DChartColorSet2: DChartColorSet2,
73820
+ DChartCoordinateBase: DChartCoordinateBase,
73750
73821
  DChartCoordinateContainerImpl: DChartCoordinateContainerImpl,
73751
73822
  DChartCoordinateContainerSubImpl: DChartCoordinateContainerSubImpl,
73752
73823
  DChartCoordinateDirection: DChartCoordinateDirection,