@swimlane/ngx-charts 19.0.0 → 19.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/bundles/swimlane-ngx-charts.umd.js +167 -168
  2. package/bundles/swimlane-ngx-charts.umd.js.map +1 -1
  3. package/esm2015/lib/area-chart/area-chart-normalized.component.js +3 -2
  4. package/esm2015/lib/area-chart/area-chart-stacked.component.js +3 -2
  5. package/esm2015/lib/area-chart/area-chart.component.js +3 -2
  6. package/esm2015/lib/area-chart/area-series.component.js +2 -2
  7. package/esm2015/lib/bar-chart/bar-horizontal-2d.component.js +4 -2
  8. package/esm2015/lib/bar-chart/bar-horizontal-normalized.component.js +3 -2
  9. package/esm2015/lib/bar-chart/bar-horizontal-stacked.component.js +3 -2
  10. package/esm2015/lib/bar-chart/bar-horizontal.component.js +3 -2
  11. package/esm2015/lib/bar-chart/bar-label.component.js +1 -1
  12. package/esm2015/lib/bar-chart/bar-vertical-2d.component.js +4 -2
  13. package/esm2015/lib/bar-chart/bar-vertical-normalized.component.js +3 -2
  14. package/esm2015/lib/bar-chart/bar-vertical-stacked.component.js +3 -2
  15. package/esm2015/lib/bar-chart/bar-vertical.component.js +3 -2
  16. package/esm2015/lib/bar-chart/bar.component.js +1 -1
  17. package/esm2015/lib/bar-chart/series-horizontal.component.js +3 -2
  18. package/esm2015/lib/bar-chart/series-vertical.component.js +3 -2
  19. package/esm2015/lib/bar-chart/types/bar.model.js +1 -1
  20. package/esm2015/lib/bubble-chart/bubble-chart.component.js +3 -2
  21. package/esm2015/lib/bubble-chart/bubble-chart.utils.js +2 -2
  22. package/esm2015/lib/bubble-chart/bubble-series.component.js +2 -2
  23. package/esm2015/lib/common/area.component.js +1 -1
  24. package/esm2015/lib/common/base-chart.component.js +2 -2
  25. package/esm2015/lib/common/charts/chart.component.js +2 -2
  26. package/esm2015/lib/common/circle-series.component.js +2 -2
  27. package/esm2015/lib/common/color.helper.js +2 -2
  28. package/esm2015/lib/common/domain.helper.js +2 -2
  29. package/esm2015/lib/common/grid-panel-series.component.js +2 -2
  30. package/esm2015/lib/common/svg-linear-gradient.component.js +2 -2
  31. package/esm2015/lib/common/timeline/timeline.component.js +2 -2
  32. package/esm2015/lib/common/tooltip-area.component.js +2 -2
  33. package/esm2015/lib/common/view-dimensions.helper.js +3 -2
  34. package/esm2015/lib/gauge/gauge-axis.component.js +2 -2
  35. package/esm2015/lib/gauge/gauge.component.js +3 -2
  36. package/esm2015/lib/gauge/linear-gauge.component.js +3 -2
  37. package/esm2015/lib/heat-map/heat-map-cell.component.js +2 -2
  38. package/esm2015/lib/heat-map/heat-map.component.js +3 -2
  39. package/esm2015/lib/line-chart/line-chart.component.js +3 -2
  40. package/esm2015/lib/line-chart/line-series.component.js +2 -2
  41. package/esm2015/lib/number-card/card-series.component.js +1 -1
  42. package/esm2015/lib/number-card/number-card.component.js +2 -2
  43. package/esm2015/lib/pie-chart/advanced-pie-chart.component.js +2 -2
  44. package/esm2015/lib/pie-chart/pie-chart.component.js +3 -2
  45. package/esm2015/lib/pie-chart/pie-grid.component.js +2 -2
  46. package/esm2015/lib/pie-chart/pie-label.component.js +2 -2
  47. package/esm2015/lib/pie-chart/pie-series.component.js +1 -1
  48. package/esm2015/lib/polar-chart/polar-chart.component.js +4 -2
  49. package/esm2015/lib/polar-chart/polar-series.component.js +2 -2
  50. package/esm2015/lib/tree-map/tree-map-cell-series.component.js +1 -1
  51. package/esm2015/lib/tree-map/tree-map-cell.component.js +2 -2
  52. package/esm2015/lib/tree-map/tree-map.component.js +2 -2
  53. package/esm2015/lib/utils/color-sets.js +2 -2
  54. package/esm2015/public-api.js +8 -2
  55. package/esm2015/swimlane-ngx-charts.js +1 -2
  56. package/fesm2015/swimlane-ngx-charts.js +22 -22
  57. package/fesm2015/swimlane-ngx-charts.js.map +1 -1
  58. package/lib/area-chart/area-chart-normalized.component.d.ts +3 -1
  59. package/lib/area-chart/area-chart-stacked.component.d.ts +3 -1
  60. package/lib/area-chart/area-chart.component.d.ts +3 -1
  61. package/lib/area-chart/area-series.component.d.ts +2 -1
  62. package/lib/bar-chart/bar-horizontal-2d.component.d.ts +4 -1
  63. package/lib/bar-chart/bar-horizontal-normalized.component.d.ts +3 -1
  64. package/lib/bar-chart/bar-horizontal-stacked.component.d.ts +3 -1
  65. package/lib/bar-chart/bar-horizontal.component.d.ts +3 -1
  66. package/lib/bar-chart/bar-label.component.d.ts +1 -1
  67. package/lib/bar-chart/bar-vertical-2d.component.d.ts +4 -1
  68. package/lib/bar-chart/bar-vertical-normalized.component.d.ts +3 -1
  69. package/lib/bar-chart/bar-vertical-stacked.component.d.ts +3 -1
  70. package/lib/bar-chart/bar-vertical.component.d.ts +3 -1
  71. package/lib/bar-chart/bar.component.d.ts +1 -1
  72. package/lib/bar-chart/series-horizontal.component.d.ts +2 -1
  73. package/lib/bar-chart/series-vertical.component.d.ts +2 -1
  74. package/lib/bar-chart/types/bar.model.d.ts +1 -1
  75. package/lib/bubble-chart/bubble-chart.component.d.ts +3 -1
  76. package/lib/bubble-chart/bubble-chart.utils.d.ts +1 -1
  77. package/lib/bubble-chart/bubble-series.component.d.ts +1 -1
  78. package/lib/common/area.component.d.ts +1 -1
  79. package/lib/common/base-chart.component.d.ts +2 -1
  80. package/lib/common/circle-series.component.d.ts +2 -1
  81. package/lib/common/color.helper.d.ts +2 -1
  82. package/lib/common/domain.helper.d.ts +1 -1
  83. package/lib/common/grid-panel-series.component.d.ts +2 -1
  84. package/lib/common/svg-linear-gradient.component.d.ts +2 -1
  85. package/lib/common/timeline/timeline.component.d.ts +2 -1
  86. package/lib/common/tooltip-area.component.d.ts +1 -1
  87. package/lib/common/view-dimensions.helper.d.ts +2 -1
  88. package/lib/gauge/gauge-axis.component.d.ts +1 -1
  89. package/lib/gauge/gauge.component.d.ts +2 -1
  90. package/lib/gauge/linear-gauge.component.d.ts +2 -1
  91. package/lib/heat-map/heat-map-cell.component.d.ts +2 -1
  92. package/lib/heat-map/heat-map.component.d.ts +3 -1
  93. package/lib/line-chart/line-chart.component.d.ts +3 -1
  94. package/lib/line-chart/line-series.component.d.ts +2 -1
  95. package/lib/number-card/card-series.component.d.ts +1 -1
  96. package/lib/number-card/number-card.component.d.ts +1 -1
  97. package/lib/pie-chart/advanced-pie-chart.component.d.ts +1 -1
  98. package/lib/pie-chart/pie-chart.component.d.ts +2 -1
  99. package/lib/pie-chart/pie-grid.component.d.ts +1 -1
  100. package/lib/pie-chart/pie-label.component.d.ts +1 -1
  101. package/lib/pie-chart/pie-series.component.d.ts +1 -1
  102. package/lib/polar-chart/polar-chart.component.d.ts +4 -1
  103. package/lib/tree-map/tree-map-cell-series.component.d.ts +1 -1
  104. package/lib/tree-map/tree-map-cell.component.d.ts +2 -1
  105. package/lib/tree-map/tree-map.component.d.ts +1 -1
  106. package/lib/utils/color-sets.d.ts +1 -1
  107. package/package.json +1 -1
  108. package/public-api.d.ts +7 -1
  109. package/swimlane-ngx-charts.d.ts +0 -1
  110. package/swimlane-ngx-charts.metadata.json +1 -1
  111. package/esm2015/lib/common/types/index.js +0 -8
  112. package/lib/common/types/index.d.ts +0 -7
@@ -962,34 +962,13 @@
962
962
  LegendType["Legend"] = "legend";
963
963
  })(exports.LegendType || (exports.LegendType = {}));
964
964
 
965
- exports.BarOrientation = void 0;
966
- (function (BarOrientation) {
967
- BarOrientation["Vertical"] = "vertical";
968
- BarOrientation["Horizontal"] = "horizontal";
969
- })(exports.BarOrientation || (exports.BarOrientation = {}));
970
-
971
- exports.Orientation = void 0;
972
- (function (Orientation) {
973
- Orientation["Top"] = "top";
974
- Orientation["Bottom"] = "bottom";
975
- Orientation["Left"] = "left";
976
- Orientation["Right"] = "right";
977
- })(exports.Orientation || (exports.Orientation = {}));
978
-
979
- exports.ɵc = void 0;
965
+ exports.ScaleType = void 0;
980
966
  (function (ScaleType) {
981
967
  ScaleType["Time"] = "time";
982
968
  ScaleType["Linear"] = "linear";
983
969
  ScaleType["Ordinal"] = "ordinal";
984
970
  ScaleType["Quantile"] = "quantile";
985
- })(exports.ɵc || (exports.ɵc = {}));
986
-
987
- exports.TextAnchor = void 0;
988
- (function (TextAnchor) {
989
- TextAnchor["Start"] = "start";
990
- TextAnchor["Middle"] = "middle";
991
- TextAnchor["End"] = "end";
992
- })(exports.TextAnchor || (exports.TextAnchor = {}));
971
+ })(exports.ScaleType || (exports.ScaleType = {}));
993
972
 
994
973
  var ChartComponent = /** @class */ (function () {
995
974
  function ChartComponent() {
@@ -1025,7 +1004,7 @@
1025
1004
  : this.chartWidth;
1026
1005
  };
1027
1006
  ChartComponent.prototype.getLegendType = function () {
1028
- return this.legendOptions.scaleType === exports.ɵc.Linear ? exports.LegendType.ScaleLegend : exports.LegendType.Legend;
1007
+ return this.legendOptions.scaleType === exports.ScaleType.Linear ? exports.LegendType.ScaleLegend : exports.LegendType.Legend;
1029
1008
  };
1030
1009
  return ChartComponent;
1031
1010
  }());
@@ -1128,7 +1107,7 @@
1128
1107
  this.cd = cd;
1129
1108
  this.platformId = platformId;
1130
1109
  this.scheme = 'cool';
1131
- this.schemeType = exports.ɵc.Ordinal;
1110
+ this.schemeType = exports.ScaleType.Ordinal;
1132
1111
  this.animations = true;
1133
1112
  this.select = new core.EventEmitter();
1134
1113
  }
@@ -1313,6 +1292,14 @@
1313
1292
  select: [{ type: core.Output }]
1314
1293
  };
1315
1294
 
1295
+ exports.Orientation = void 0;
1296
+ (function (Orientation) {
1297
+ Orientation["Top"] = "top";
1298
+ Orientation["Bottom"] = "bottom";
1299
+ Orientation["Left"] = "left";
1300
+ Orientation["Right"] = "right";
1301
+ })(exports.Orientation || (exports.Orientation = {}));
1302
+
1316
1303
  var AxisLabelComponent = /** @class */ (function () {
1317
1304
  function AxisLabelComponent(element) {
1318
1305
  this.textHeight = 25;
@@ -1401,6 +1388,13 @@
1401
1388
  return ticks;
1402
1389
  }
1403
1390
 
1391
+ exports.TextAnchor = void 0;
1392
+ (function (TextAnchor) {
1393
+ TextAnchor["Start"] = "start";
1394
+ TextAnchor["Middle"] = "middle";
1395
+ TextAnchor["End"] = "end";
1396
+ })(exports.TextAnchor || (exports.TextAnchor = {}));
1397
+
1404
1398
  var XAxisTicksComponent = /** @class */ (function () {
1405
1399
  function XAxisTicksComponent(platformId) {
1406
1400
  this.platformId = platformId;
@@ -2223,6 +2217,12 @@
2223
2217
  return id();
2224
2218
  }
2225
2219
 
2220
+ exports.BarOrientation = void 0;
2221
+ (function (BarOrientation) {
2222
+ BarOrientation["Vertical"] = "vertical";
2223
+ BarOrientation["Horizontal"] = "horizontal";
2224
+ })(exports.BarOrientation || (exports.BarOrientation = {}));
2225
+
2226
2226
  exports.SeriesType = void 0;
2227
2227
  (function (SeriesType) {
2228
2228
  SeriesType["Standard"] = "standard";
@@ -2268,10 +2268,10 @@
2268
2268
  var label = d.name;
2269
2269
  var tooltipLabel = formatLabel(label);
2270
2270
  var cx;
2271
- if (this.scaleType === exports.ɵc.Time) {
2271
+ if (this.scaleType === exports.ScaleType.Time) {
2272
2272
  cx = this.xScale(label);
2273
2273
  }
2274
- else if (this.scaleType === exports.ɵc.Linear) {
2274
+ else if (this.scaleType === exports.ScaleType.Linear) {
2275
2275
  cx = this.xScale(Number(label));
2276
2276
  }
2277
2277
  else {
@@ -2282,7 +2282,7 @@
2282
2282
  var height = this.yScale.range()[0] - cy;
2283
2283
  var opacity = 1;
2284
2284
  var color;
2285
- if (this.colors.scaleType === exports.ɵc.Linear) {
2285
+ if (this.colors.scaleType === exports.ScaleType.Linear) {
2286
2286
  if (this.type === exports.SeriesType.Standard) {
2287
2287
  color = this.colors.getColor(value);
2288
2288
  }
@@ -2941,7 +2941,7 @@
2941
2941
  val = (item.d1 - item.d0).toFixed(2) + '%';
2942
2942
  }
2943
2943
  var color = void 0;
2944
- if (this.colors.scaleType === exports.ɵc.Linear) {
2944
+ if (this.colors.scaleType === exports.ScaleType.Linear) {
2945
2945
  var v = val;
2946
2946
  if (item.d1) {
2947
2947
  v = item.d1;
@@ -3167,12 +3167,12 @@
3167
3167
  finally { if (e_1) throw e_1.error; }
3168
3168
  }
3169
3169
  var domain = [];
3170
- if (this.scaleType === exports.ɵc.Time) {
3170
+ if (this.scaleType === exports.ScaleType.Time) {
3171
3171
  var min = Math.min.apply(Math, __spreadArray([], __read(values)));
3172
3172
  var max = Math.max.apply(Math, __spreadArray([], __read(values)));
3173
3173
  domain = [min, max];
3174
3174
  }
3175
- else if (this.scaleType === exports.ɵc.Linear) {
3175
+ else if (this.scaleType === exports.ScaleType.Linear) {
3176
3176
  values = values.map(function (v) { return Number(v); });
3177
3177
  var min = Math.min.apply(Math, __spreadArray([], __read(values)));
3178
3178
  var max = Math.max.apply(Math, __spreadArray([], __read(values)));
@@ -3185,13 +3185,13 @@
3185
3185
  };
3186
3186
  Timeline.prototype.getXScale = function () {
3187
3187
  var scale;
3188
- if (this.scaleType === exports.ɵc.Time) {
3188
+ if (this.scaleType === exports.ScaleType.Time) {
3189
3189
  scale = d3Scale.scaleTime().range([0, this.dims.width]).domain(this.xDomain);
3190
3190
  }
3191
- else if (this.scaleType === exports.ɵc.Linear) {
3191
+ else if (this.scaleType === exports.ScaleType.Linear) {
3192
3192
  scale = d3Scale.scaleLinear().range([0, this.dims.width]).domain(this.xDomain);
3193
3193
  }
3194
- else if (this.scaleType === exports.ɵc.Ordinal) {
3194
+ else if (this.scaleType === exports.ScaleType.Ordinal) {
3195
3195
  scale = d3Scale.scalePoint().range([0, this.dims.width]).padding(0.1).domain(this.xDomain);
3196
3196
  }
3197
3197
  return scale;
@@ -3550,12 +3550,12 @@
3550
3550
  ];
3551
3551
 
3552
3552
  function calculateViewDimensions(_a) {
3553
- var width = _a.width, height = _a.height, margins = _a.margins, _b = _a.showXAxis, showXAxis = _b === void 0 ? false : _b, _c = _a.showYAxis, showYAxis = _c === void 0 ? false : _c, _d = _a.xAxisHeight, xAxisHeight = _d === void 0 ? 0 : _d, _e = _a.yAxisWidth, yAxisWidth = _e === void 0 ? 0 : _e, _f = _a.showXLabel, showXLabel = _f === void 0 ? false : _f, _g = _a.showYLabel, showYLabel = _g === void 0 ? false : _g, _h = _a.showLegend, showLegend = _h === void 0 ? false : _h, _j = _a.legendType, legendType = _j === void 0 ? exports.ɵc.Ordinal : _j, _k = _a.legendPosition, legendPosition = _k === void 0 ? exports.LegendPosition.Right : _k, _l = _a.columns, columns = _l === void 0 ? 12 : _l;
3553
+ var width = _a.width, height = _a.height, margins = _a.margins, _b = _a.showXAxis, showXAxis = _b === void 0 ? false : _b, _c = _a.showYAxis, showYAxis = _c === void 0 ? false : _c, _d = _a.xAxisHeight, xAxisHeight = _d === void 0 ? 0 : _d, _e = _a.yAxisWidth, yAxisWidth = _e === void 0 ? 0 : _e, _f = _a.showXLabel, showXLabel = _f === void 0 ? false : _f, _g = _a.showYLabel, showYLabel = _g === void 0 ? false : _g, _h = _a.showLegend, showLegend = _h === void 0 ? false : _h, _j = _a.legendType, legendType = _j === void 0 ? exports.ScaleType.Ordinal : _j, _k = _a.legendPosition, legendPosition = _k === void 0 ? exports.LegendPosition.Right : _k, _l = _a.columns, columns = _l === void 0 ? 12 : _l;
3554
3554
  var xOffset = margins[3];
3555
3555
  var chartWidth = width;
3556
3556
  var chartHeight = height - margins[0] - margins[2];
3557
3557
  if (showLegend && legendPosition === exports.LegendPosition.Right) {
3558
- if (legendType === exports.ɵc.Ordinal) {
3558
+ if (legendType === exports.ScaleType.Ordinal) {
3559
3559
  columns -= 2;
3560
3560
  }
3561
3561
  else {
@@ -3598,7 +3598,7 @@
3598
3598
  {
3599
3599
  name: 'vivid',
3600
3600
  selectable: true,
3601
- group: exports.ɵc.Ordinal,
3601
+ group: exports.ScaleType.Ordinal,
3602
3602
  domain: [
3603
3603
  '#647c8a',
3604
3604
  '#3f51b5',
@@ -3615,7 +3615,7 @@
3615
3615
  {
3616
3616
  name: 'natural',
3617
3617
  selectable: true,
3618
- group: exports.ɵc.Ordinal,
3618
+ group: exports.ScaleType.Ordinal,
3619
3619
  domain: [
3620
3620
  '#bf9d76',
3621
3621
  '#e99450',
@@ -3632,7 +3632,7 @@
3632
3632
  {
3633
3633
  name: 'cool',
3634
3634
  selectable: true,
3635
- group: exports.ɵc.Ordinal,
3635
+ group: exports.ScaleType.Ordinal,
3636
3636
  domain: [
3637
3637
  '#a8385d',
3638
3638
  '#7aa3e5',
@@ -3649,13 +3649,13 @@
3649
3649
  {
3650
3650
  name: 'fire',
3651
3651
  selectable: true,
3652
- group: exports.ɵc.Ordinal,
3652
+ group: exports.ScaleType.Ordinal,
3653
3653
  domain: ['#ff3d00', '#bf360c', '#ff8f00', '#ff6f00', '#ff5722', '#e65100', '#ffca28', '#ffab00']
3654
3654
  },
3655
3655
  {
3656
3656
  name: 'solar',
3657
3657
  selectable: true,
3658
- group: exports.ɵc.Linear,
3658
+ group: exports.ScaleType.Linear,
3659
3659
  domain: [
3660
3660
  '#fff8e1',
3661
3661
  '#ffecb3',
@@ -3672,7 +3672,7 @@
3672
3672
  {
3673
3673
  name: 'air',
3674
3674
  selectable: true,
3675
- group: exports.ɵc.Linear,
3675
+ group: exports.ScaleType.Linear,
3676
3676
  domain: [
3677
3677
  '#e1f5fe',
3678
3678
  '#b3e5fc',
@@ -3689,7 +3689,7 @@
3689
3689
  {
3690
3690
  name: 'aqua',
3691
3691
  selectable: true,
3692
- group: exports.ɵc.Linear,
3692
+ group: exports.ScaleType.Linear,
3693
3693
  domain: [
3694
3694
  '#e0f7fa',
3695
3695
  '#b2ebf2',
@@ -3706,7 +3706,7 @@
3706
3706
  {
3707
3707
  name: 'flame',
3708
3708
  selectable: false,
3709
- group: exports.ɵc.Ordinal,
3709
+ group: exports.ScaleType.Ordinal,
3710
3710
  domain: [
3711
3711
  '#A10A28',
3712
3712
  '#D3342D',
@@ -3723,7 +3723,7 @@
3723
3723
  {
3724
3724
  name: 'ocean',
3725
3725
  selectable: false,
3726
- group: exports.ɵc.Ordinal,
3726
+ group: exports.ScaleType.Ordinal,
3727
3727
  domain: [
3728
3728
  '#1D68FB',
3729
3729
  '#33C0FC',
@@ -3740,7 +3740,7 @@
3740
3740
  {
3741
3741
  name: 'forest',
3742
3742
  selectable: false,
3743
- group: exports.ɵc.Ordinal,
3743
+ group: exports.ScaleType.Ordinal,
3744
3744
  domain: [
3745
3745
  '#55C22D',
3746
3746
  '#C1F33D',
@@ -3757,7 +3757,7 @@
3757
3757
  {
3758
3758
  name: 'horizon',
3759
3759
  selectable: false,
3760
- group: exports.ɵc.Ordinal,
3760
+ group: exports.ScaleType.Ordinal,
3761
3761
  domain: [
3762
3762
  '#2597FB',
3763
3763
  '#65EBFD',
@@ -3774,7 +3774,7 @@
3774
3774
  {
3775
3775
  name: 'neons',
3776
3776
  selectable: false,
3777
- group: exports.ɵc.Ordinal,
3777
+ group: exports.ScaleType.Ordinal,
3778
3778
  domain: [
3779
3779
  '#FF3333',
3780
3780
  '#FF33FF',
@@ -3791,7 +3791,7 @@
3791
3791
  {
3792
3792
  name: 'picnic',
3793
3793
  selectable: false,
3794
- group: exports.ɵc.Ordinal,
3794
+ group: exports.ScaleType.Ordinal,
3795
3795
  domain: [
3796
3796
  '#FAC51D',
3797
3797
  '#66BD6D',
@@ -3808,7 +3808,7 @@
3808
3808
  {
3809
3809
  name: 'night',
3810
3810
  selectable: false,
3811
- group: exports.ɵc.Ordinal,
3811
+ group: exports.ScaleType.Ordinal,
3812
3812
  domain: [
3813
3813
  '#2B1B5A',
3814
3814
  '#501356',
@@ -3830,7 +3830,7 @@
3830
3830
  {
3831
3831
  name: 'nightLights',
3832
3832
  selectable: false,
3833
- group: exports.ɵc.Ordinal,
3833
+ group: exports.ScaleType.Ordinal,
3834
3834
  domain: [
3835
3835
  '#4e31a5',
3836
3836
  '#9c25a7',
@@ -3871,13 +3871,13 @@
3871
3871
  });
3872
3872
  }
3873
3873
  var colorScale;
3874
- if (type === exports.ɵc.Quantile) {
3874
+ if (type === exports.ScaleType.Quantile) {
3875
3875
  colorScale = d3Scale.scaleQuantile().range(scheme.domain).domain(domain);
3876
3876
  }
3877
- else if (type === exports.ɵc.Ordinal) {
3877
+ else if (type === exports.ScaleType.Ordinal) {
3878
3878
  colorScale = d3Scale.scaleOrdinal().range(scheme.domain).domain(domain);
3879
3879
  }
3880
- else if (type === exports.ɵc.Linear) {
3880
+ else if (type === exports.ScaleType.Linear) {
3881
3881
  // linear schemes must have at least 2 colors
3882
3882
  var colorDomain = __spreadArray([], __read(scheme.domain));
3883
3883
  if (colorDomain.length === 1) {
@@ -3893,7 +3893,7 @@
3893
3893
  if (value === undefined || value === null) {
3894
3894
  throw new Error('Value can not be null');
3895
3895
  }
3896
- if (this.scaleType === exports.ɵc.Linear) {
3896
+ if (this.scaleType === exports.ScaleType.Linear) {
3897
3897
  var valueScale = d3Scale.scaleLinear().domain(this.domain).range([0, 1]);
3898
3898
  return this.scale(valueScale(value));
3899
3899
  }
@@ -4035,14 +4035,14 @@
4035
4035
  if (checkDateType) {
4036
4036
  var allDates = values.every(function (value) { return value instanceof Date; });
4037
4037
  if (allDates) {
4038
- return exports.ɵc.Time;
4038
+ return exports.ScaleType.Time;
4039
4039
  }
4040
4040
  }
4041
4041
  var allNumbers = values.every(function (value) { return typeof value === 'number'; });
4042
4042
  if (allNumbers) {
4043
- return exports.ɵc.Linear;
4043
+ return exports.ScaleType.Linear;
4044
4044
  }
4045
- return exports.ɵc.Ordinal;
4045
+ return exports.ScaleType.Ordinal;
4046
4046
  }
4047
4047
 
4048
4048
  var AreaChartComponent = /** @class */ (function (_super) {
@@ -4126,16 +4126,16 @@
4126
4126
  var values = getUniqueXDomainValues(this.results);
4127
4127
  this.scaleType = getScaleType(values);
4128
4128
  var domain = [];
4129
- if (this.scaleType === exports.ɵc.Linear) {
4129
+ if (this.scaleType === exports.ScaleType.Linear) {
4130
4130
  values = values.map(function (v) { return Number(v); });
4131
4131
  }
4132
4132
  var min;
4133
4133
  var max;
4134
- if (this.scaleType === exports.ɵc.Time || this.scaleType === exports.ɵc.Linear) {
4134
+ if (this.scaleType === exports.ScaleType.Time || this.scaleType === exports.ScaleType.Linear) {
4135
4135
  min = this.xScaleMin ? this.xScaleMin : Math.min.apply(Math, __spreadArray([], __read(values)));
4136
4136
  max = this.xScaleMax ? this.xScaleMax : Math.max.apply(Math, __spreadArray([], __read(values)));
4137
4137
  }
4138
- if (this.scaleType === exports.ɵc.Time) {
4138
+ if (this.scaleType === exports.ScaleType.Time) {
4139
4139
  domain = [new Date(min), new Date(max)];
4140
4140
  this.xSet = __spreadArray([], __read(values)).sort(function (a, b) {
4141
4141
  var aDate = a.getTime();
@@ -4147,7 +4147,7 @@
4147
4147
  return 0;
4148
4148
  });
4149
4149
  }
4150
- else if (this.scaleType === exports.ɵc.Linear) {
4150
+ else if (this.scaleType === exports.ScaleType.Linear) {
4151
4151
  domain = [min, max];
4152
4152
  // Use compare function to sort numbers numerically
4153
4153
  this.xSet = __spreadArray([], __read(values)).sort(function (a, b) { return a - b; });
@@ -4204,13 +4204,13 @@
4204
4204
  };
4205
4205
  AreaChartComponent.prototype.getXScale = function (domain, width) {
4206
4206
  var scale;
4207
- if (this.scaleType === exports.ɵc.Time) {
4207
+ if (this.scaleType === exports.ScaleType.Time) {
4208
4208
  scale = d3Scale.scaleTime();
4209
4209
  }
4210
- else if (this.scaleType === exports.ɵc.Linear) {
4210
+ else if (this.scaleType === exports.ScaleType.Linear) {
4211
4211
  scale = d3Scale.scaleLinear();
4212
4212
  }
4213
- else if (this.scaleType === exports.ɵc.Ordinal) {
4213
+ else if (this.scaleType === exports.ScaleType.Ordinal) {
4214
4214
  scale = d3Scale.scalePoint().padding(0.1);
4215
4215
  }
4216
4216
  scale.range([0, width]).domain(domain);
@@ -4243,12 +4243,12 @@
4243
4243
  finally { if (e_3) throw e_3.error; }
4244
4244
  }
4245
4245
  if (date) {
4246
- return exports.ɵc.Time;
4246
+ return exports.ScaleType.Time;
4247
4247
  }
4248
4248
  if (num) {
4249
- return exports.ɵc.Linear;
4249
+ return exports.ScaleType.Linear;
4250
4250
  }
4251
- return exports.ɵc.Ordinal;
4251
+ return exports.ScaleType.Ordinal;
4252
4252
  };
4253
4253
  AreaChartComponent.prototype.updateDomain = function (domain) {
4254
4254
  this.filteredDomain = domain;
@@ -4271,7 +4271,7 @@
4271
4271
  };
4272
4272
  AreaChartComponent.prototype.setColors = function () {
4273
4273
  var domain;
4274
- if (this.schemeType === exports.ɵc.Ordinal) {
4274
+ if (this.schemeType === exports.ScaleType.Ordinal) {
4275
4275
  domain = this.seriesDomain;
4276
4276
  }
4277
4277
  else {
@@ -4287,7 +4287,7 @@
4287
4287
  title: undefined,
4288
4288
  position: this.legendPosition
4289
4289
  };
4290
- if (opts.scaleType === exports.ɵc.Ordinal) {
4290
+ if (opts.scaleType === exports.ScaleType.Ordinal) {
4291
4291
  opts.domain = this.seriesDomain;
4292
4292
  opts.colors = this.colors;
4293
4293
  opts.title = this.legendTitle;
@@ -4466,7 +4466,7 @@
4466
4466
  var d = group.series.find(function (item) {
4467
4467
  var a = item.name;
4468
4468
  var b = val;
4469
- if (_this.scaleType === exports.ɵc.Time) {
4469
+ if (_this.scaleType === exports.ScaleType.Time) {
4470
4470
  a = a.valueOf();
4471
4471
  b = b.valueOf();
4472
4472
  }
@@ -4490,7 +4490,7 @@
4490
4490
  var d = group.series.find(function (item) {
4491
4491
  var a = item.name;
4492
4492
  var b = val;
4493
- if (_this.scaleType === exports.ɵc.Time) {
4493
+ if (_this.scaleType === exports.ScaleType.Time) {
4494
4494
  a = a.valueOf();
4495
4495
  b = b.valueOf();
4496
4496
  }
@@ -4552,7 +4552,7 @@
4552
4552
  var values = getUniqueXDomainValues(this.results);
4553
4553
  this.scaleType = getScaleType(values);
4554
4554
  var domain = [];
4555
- if (this.scaleType === exports.ɵc.Time) {
4555
+ if (this.scaleType === exports.ScaleType.Time) {
4556
4556
  var min = Math.min.apply(Math, __spreadArray([], __read(values)));
4557
4557
  var max = Math.max.apply(Math, __spreadArray([], __read(values)));
4558
4558
  domain = [new Date(min), new Date(max)];
@@ -4566,7 +4566,7 @@
4566
4566
  return 0;
4567
4567
  });
4568
4568
  }
4569
- else if (this.scaleType === exports.ɵc.Linear) {
4569
+ else if (this.scaleType === exports.ScaleType.Linear) {
4570
4570
  values = values.map(function (v) { return Number(v); });
4571
4571
  var min = Math.min.apply(Math, __spreadArray([], __read(values)));
4572
4572
  var max = Math.max.apply(Math, __spreadArray([], __read(values)));
@@ -4585,13 +4585,13 @@
4585
4585
  };
4586
4586
  AreaChartNormalizedComponent.prototype.getXScale = function (domain, width) {
4587
4587
  var scale;
4588
- if (this.scaleType === exports.ɵc.Time) {
4588
+ if (this.scaleType === exports.ScaleType.Time) {
4589
4589
  scale = d3Scale.scaleTime();
4590
4590
  }
4591
- else if (this.scaleType === exports.ɵc.Linear) {
4591
+ else if (this.scaleType === exports.ScaleType.Linear) {
4592
4592
  scale = d3Scale.scaleLinear();
4593
4593
  }
4594
- else if (this.scaleType === exports.ɵc.Ordinal) {
4594
+ else if (this.scaleType === exports.ScaleType.Ordinal) {
4595
4595
  scale = d3Scale.scalePoint().padding(0.1);
4596
4596
  }
4597
4597
  scale.range([0, width]).domain(domain);
@@ -4622,7 +4622,7 @@
4622
4622
  };
4623
4623
  AreaChartNormalizedComponent.prototype.setColors = function () {
4624
4624
  var domain;
4625
- if (this.schemeType === exports.ɵc.Ordinal) {
4625
+ if (this.schemeType === exports.ScaleType.Ordinal) {
4626
4626
  domain = this.seriesDomain;
4627
4627
  }
4628
4628
  else {
@@ -4638,7 +4638,7 @@
4638
4638
  title: undefined,
4639
4639
  position: this.legendPosition
4640
4640
  };
4641
- if (opts.scaleType === exports.ɵc.Ordinal) {
4641
+ if (opts.scaleType === exports.ScaleType.Ordinal) {
4642
4642
  opts.domain = this.seriesDomain;
4643
4643
  opts.colors = this.colors;
4644
4644
  opts.title = this.legendTitle;
@@ -4808,7 +4808,7 @@
4808
4808
  var d = group.series.find(function (item) {
4809
4809
  var a = item.name;
4810
4810
  var b = val;
4811
- if (_this.scaleType === exports.ɵc.Time) {
4811
+ if (_this.scaleType === exports.ScaleType.Time) {
4812
4812
  a = a.valueOf();
4813
4813
  b = b.valueOf();
4814
4814
  }
@@ -4862,16 +4862,16 @@
4862
4862
  var values = getUniqueXDomainValues(this.results);
4863
4863
  this.scaleType = getScaleType(values);
4864
4864
  var domain = [];
4865
- if (this.scaleType === exports.ɵc.Linear) {
4865
+ if (this.scaleType === exports.ScaleType.Linear) {
4866
4866
  values = values.map(function (v) { return Number(v); });
4867
4867
  }
4868
4868
  var min;
4869
4869
  var max;
4870
- if (this.scaleType === exports.ɵc.Time || this.scaleType === exports.ɵc.Linear) {
4870
+ if (this.scaleType === exports.ScaleType.Time || this.scaleType === exports.ScaleType.Linear) {
4871
4871
  min = this.xScaleMin ? this.xScaleMin : Math.min.apply(Math, __spreadArray([], __read(values)));
4872
4872
  max = this.xScaleMax ? this.xScaleMax : Math.max.apply(Math, __spreadArray([], __read(values)));
4873
4873
  }
4874
- if (this.scaleType === exports.ɵc.Time) {
4874
+ if (this.scaleType === exports.ScaleType.Time) {
4875
4875
  domain = [new Date(min), new Date(max)];
4876
4876
  this.xSet = __spreadArray([], __read(values)).sort(function (a, b) {
4877
4877
  var aDate = a.getTime();
@@ -4883,7 +4883,7 @@
4883
4883
  return 0;
4884
4884
  });
4885
4885
  }
4886
- else if (this.scaleType === exports.ɵc.Linear) {
4886
+ else if (this.scaleType === exports.ScaleType.Linear) {
4887
4887
  domain = [min, max];
4888
4888
  // Use compare function to sort numbers numerically
4889
4889
  this.xSet = __spreadArray([], __read(values)).sort(function (a, b) { return a - b; });
@@ -4907,7 +4907,7 @@
4907
4907
  var d = group.series.find(function (item) {
4908
4908
  var a = item.name;
4909
4909
  var b = val;
4910
- if (_this.scaleType === exports.ɵc.Time) {
4910
+ if (_this.scaleType === exports.ScaleType.Time) {
4911
4911
  a = a.valueOf();
4912
4912
  b = b.valueOf();
4913
4913
  }
@@ -4940,13 +4940,13 @@
4940
4940
  };
4941
4941
  AreaChartStackedComponent.prototype.getXScale = function (domain, width) {
4942
4942
  var scale;
4943
- if (this.scaleType === exports.ɵc.Time) {
4943
+ if (this.scaleType === exports.ScaleType.Time) {
4944
4944
  scale = d3Scale.scaleTime();
4945
4945
  }
4946
- else if (this.scaleType === exports.ɵc.Linear) {
4946
+ else if (this.scaleType === exports.ScaleType.Linear) {
4947
4947
  scale = d3Scale.scaleLinear();
4948
4948
  }
4949
- else if (this.scaleType === exports.ɵc.Ordinal) {
4949
+ else if (this.scaleType === exports.ScaleType.Ordinal) {
4950
4950
  scale = d3Scale.scalePoint().padding(0.1);
4951
4951
  }
4952
4952
  scale.range([0, width]).domain(domain);
@@ -4980,7 +4980,7 @@
4980
4980
  };
4981
4981
  AreaChartStackedComponent.prototype.setColors = function () {
4982
4982
  var domain;
4983
- if (this.schemeType === exports.ɵc.Ordinal) {
4983
+ if (this.schemeType === exports.ScaleType.Ordinal) {
4984
4984
  domain = this.seriesDomain;
4985
4985
  }
4986
4986
  else {
@@ -4996,7 +4996,7 @@
4996
4996
  title: undefined,
4997
4997
  position: this.legendPosition
4998
4998
  };
4999
- if (opts.scaleType === exports.ɵc.Ordinal) {
4999
+ if (opts.scaleType === exports.ScaleType.Ordinal) {
5000
5000
  opts.domain = this.seriesDomain;
5001
5001
  opts.colors = this.colors;
5002
5002
  opts.title = this.legendTitle;
@@ -5194,10 +5194,10 @@
5194
5194
  startingArea.curve(this.curve);
5195
5195
  this.opacity = 0.8;
5196
5196
  var data = this.data.series;
5197
- if (this.scaleType === exports.ɵc.Linear) {
5197
+ if (this.scaleType === exports.ScaleType.Linear) {
5198
5198
  data = sortLinear(data, 'name');
5199
5199
  }
5200
- else if (this.scaleType === exports.ɵc.Time) {
5200
+ else if (this.scaleType === exports.ScaleType.Time) {
5201
5201
  data = sortByTime(data, 'name');
5202
5202
  }
5203
5203
  else {
@@ -5207,7 +5207,7 @@
5207
5207
  this.startingPath = startingArea(data);
5208
5208
  };
5209
5209
  AreaSeriesComponent.prototype.updateGradient = function () {
5210
- if (this.colors.scaleType === exports.ɵc.Linear) {
5210
+ if (this.colors.scaleType === exports.ScaleType.Linear) {
5211
5211
  this.hasGradient = true;
5212
5212
  if (this.stacked || this.normalized) {
5213
5213
  var d0values = this.data.series.map(function (d) { return d.d0; });
@@ -5557,7 +5557,7 @@
5557
5557
  };
5558
5558
  BarHorizontalComponent.prototype.setColors = function () {
5559
5559
  var domain;
5560
- if (this.schemeType === exports.ɵc.Ordinal) {
5560
+ if (this.schemeType === exports.ScaleType.Ordinal) {
5561
5561
  domain = this.yDomain;
5562
5562
  }
5563
5563
  else {
@@ -5868,7 +5868,7 @@
5868
5868
  };
5869
5869
  BarHorizontal2DComponent.prototype.setColors = function () {
5870
5870
  var domain;
5871
- if (this.schemeType === exports.ɵc.Ordinal) {
5871
+ if (this.schemeType === exports.ScaleType.Ordinal) {
5872
5872
  domain = this.innerDomain;
5873
5873
  }
5874
5874
  else {
@@ -5884,7 +5884,7 @@
5884
5884
  title: undefined,
5885
5885
  position: this.legendPosition
5886
5886
  };
5887
- if (opts.scaleType === exports.ɵc.Ordinal) {
5887
+ if (opts.scaleType === exports.ScaleType.Ordinal) {
5888
5888
  opts.domain = this.innerDomain;
5889
5889
  opts.colors = this.colors;
5890
5890
  opts.title = this.legendTitle;
@@ -6145,7 +6145,7 @@
6145
6145
  };
6146
6146
  BarHorizontalNormalizedComponent.prototype.setColors = function () {
6147
6147
  var domain;
6148
- if (this.schemeType === exports.ɵc.Ordinal) {
6148
+ if (this.schemeType === exports.ScaleType.Ordinal) {
6149
6149
  domain = this.innerDomain;
6150
6150
  }
6151
6151
  else {
@@ -6161,7 +6161,7 @@
6161
6161
  title: undefined,
6162
6162
  position: this.legendPosition
6163
6163
  };
6164
- if (opts.scaleType === exports.ɵc.Ordinal) {
6164
+ if (opts.scaleType === exports.ScaleType.Ordinal) {
6165
6165
  opts.domain = this.innerDomain;
6166
6166
  opts.colors = this.colors;
6167
6167
  opts.title = this.legendTitle;
@@ -6451,7 +6451,7 @@
6451
6451
  };
6452
6452
  BarHorizontalStackedComponent.prototype.setColors = function () {
6453
6453
  var domain;
6454
- if (this.schemeType === exports.ɵc.Ordinal) {
6454
+ if (this.schemeType === exports.ScaleType.Ordinal) {
6455
6455
  domain = this.innerDomain;
6456
6456
  }
6457
6457
  else {
@@ -6467,7 +6467,7 @@
6467
6467
  title: undefined,
6468
6468
  position: this.legendPosition
6469
6469
  };
6470
- if (opts.scaleType === exports.ɵc.Ordinal) {
6470
+ if (opts.scaleType === exports.ScaleType.Ordinal) {
6471
6471
  opts.domain = this.innerDomain;
6472
6472
  opts.colors = this.colors;
6473
6473
  opts.title = this.legendTitle;
@@ -6681,7 +6681,7 @@
6681
6681
  };
6682
6682
  BarVerticalComponent.prototype.setColors = function () {
6683
6683
  var domain;
6684
- if (this.schemeType === exports.ɵc.Ordinal) {
6684
+ if (this.schemeType === exports.ScaleType.Ordinal) {
6685
6685
  domain = this.xDomain;
6686
6686
  }
6687
6687
  else {
@@ -6697,7 +6697,7 @@
6697
6697
  title: undefined,
6698
6698
  position: this.legendPosition
6699
6699
  };
6700
- if (opts.scaleType === exports.ɵc.Ordinal) {
6700
+ if (opts.scaleType === exports.ScaleType.Ordinal) {
6701
6701
  opts.domain = this.xDomain;
6702
6702
  opts.colors = this.colors;
6703
6703
  opts.title = this.legendTitle;
@@ -6822,7 +6822,7 @@
6822
6822
  _this.legendTitle = 'Legend';
6823
6823
  _this.legendPosition = exports.LegendPosition.Right;
6824
6824
  _this.tooltipDisabled = false;
6825
- _this.scaleType = exports.ɵc.Ordinal;
6825
+ _this.scaleType = exports.ScaleType.Ordinal;
6826
6826
  _this.showGridLines = true;
6827
6827
  _this.activeEntries = [];
6828
6828
  _this.trimXAxisTicks = true;
@@ -7008,7 +7008,7 @@
7008
7008
  };
7009
7009
  BarVertical2DComponent.prototype.setColors = function () {
7010
7010
  var domain;
7011
- if (this.schemeType === exports.ɵc.Ordinal) {
7011
+ if (this.schemeType === exports.ScaleType.Ordinal) {
7012
7012
  domain = this.innerDomain;
7013
7013
  }
7014
7014
  else {
@@ -7024,7 +7024,7 @@
7024
7024
  title: undefined,
7025
7025
  position: this.legendPosition
7026
7026
  };
7027
- if (opts.scaleType === exports.ɵc.Ordinal) {
7027
+ if (opts.scaleType === exports.ScaleType.Ordinal) {
7028
7028
  opts.domain = this.innerDomain;
7029
7029
  opts.colors = this.colors;
7030
7030
  opts.title = this.legendTitle;
@@ -7267,7 +7267,7 @@
7267
7267
  };
7268
7268
  BarVerticalNormalizedComponent.prototype.setColors = function () {
7269
7269
  var domain;
7270
- if (this.schemeType === exports.ɵc.Ordinal) {
7270
+ if (this.schemeType === exports.ScaleType.Ordinal) {
7271
7271
  domain = this.innerDomain;
7272
7272
  }
7273
7273
  else {
@@ -7283,7 +7283,7 @@
7283
7283
  title: undefined,
7284
7284
  position: this.legendPosition
7285
7285
  };
7286
- if (opts.scaleType === exports.ɵc.Ordinal) {
7286
+ if (opts.scaleType === exports.ScaleType.Ordinal) {
7287
7287
  opts.domain = this.innerDomain;
7288
7288
  opts.colors = this.colors;
7289
7289
  opts.title = this.legendTitle;
@@ -7588,7 +7588,7 @@
7588
7588
  };
7589
7589
  BarVerticalStackedComponent.prototype.setColors = function () {
7590
7590
  var domain;
7591
- if (this.schemeType === exports.ɵc.Ordinal) {
7591
+ if (this.schemeType === exports.ScaleType.Ordinal) {
7592
7592
  domain = this.innerDomain;
7593
7593
  }
7594
7594
  else {
@@ -7604,7 +7604,7 @@
7604
7604
  title: undefined,
7605
7605
  position: this.legendPosition
7606
7606
  };
7607
- if (opts.scaleType === exports.ɵc.Ordinal) {
7607
+ if (opts.scaleType === exports.ScaleType.Ordinal) {
7608
7608
  opts.domain = this.innerDomain;
7609
7609
  opts.colors = this.colors;
7610
7610
  opts.title = this.legendTitle;
@@ -7809,7 +7809,7 @@
7809
7809
  bar.offset1 = offset1;
7810
7810
  value = (offset1 - offset0).toFixed(2) + '%';
7811
7811
  }
7812
- if (_this.colors.scaleType === exports.ɵc.Ordinal) {
7812
+ if (_this.colors.scaleType === exports.ScaleType.Ordinal) {
7813
7813
  bar.color = _this.colors.getColor(label);
7814
7814
  }
7815
7815
  else {
@@ -8032,7 +8032,7 @@
8032
8032
  bar.offset1 = offset1;
8033
8033
  value = (offset1 - offset0).toFixed(2) + '%';
8034
8034
  }
8035
- if (_this.colors.scaleType === exports.ɵc.Ordinal) {
8035
+ if (_this.colors.scaleType === exports.ScaleType.Ordinal) {
8036
8036
  bar.color = _this.colors.getColor(label);
8037
8037
  }
8038
8038
  else {
@@ -8281,13 +8281,13 @@
8281
8281
 
8282
8282
  function getDomain(values, scaleType, autoScale, minVal, maxVal) {
8283
8283
  var domain = [];
8284
- if (scaleType === exports.ɵc.Linear) {
8284
+ if (scaleType === exports.ScaleType.Linear) {
8285
8285
  values = values.map(function (v) { return Number(v); });
8286
8286
  if (!autoScale) {
8287
8287
  values.push(0);
8288
8288
  }
8289
8289
  }
8290
- if (scaleType === exports.ɵc.Time || scaleType === exports.ɵc.Linear) {
8290
+ if (scaleType === exports.ScaleType.Time || scaleType === exports.ScaleType.Linear) {
8291
8291
  var min = minVal ? minVal : Math.min.apply(Math, __spreadArray([], __read(values)));
8292
8292
  var max = maxVal ? maxVal : Math.max.apply(Math, __spreadArray([], __read(values)));
8293
8293
  domain = [min, max];
@@ -8299,16 +8299,16 @@
8299
8299
  }
8300
8300
  function getScale(domain, range, scaleType, roundDomains) {
8301
8301
  var scale;
8302
- if (scaleType === exports.ɵc.Time) {
8302
+ if (scaleType === exports.ScaleType.Time) {
8303
8303
  scale = d3Scale.scaleTime().range(range).domain(domain);
8304
8304
  }
8305
- else if (scaleType === exports.ɵc.Linear) {
8305
+ else if (scaleType === exports.ScaleType.Linear) {
8306
8306
  scale = d3Scale.scaleLinear().range(range).domain(domain);
8307
8307
  if (roundDomains) {
8308
8308
  scale = scale.nice();
8309
8309
  }
8310
8310
  }
8311
- else if (scaleType === exports.ɵc.Ordinal) {
8311
+ else if (scaleType === exports.ScaleType.Ordinal) {
8312
8312
  scale = d3Scale.scalePoint().range([range[0], range[1]]).domain(domain);
8313
8313
  }
8314
8314
  return scale;
@@ -8332,11 +8332,11 @@
8332
8332
  _this.roundDomains = false;
8333
8333
  _this.maxRadius = 10;
8334
8334
  _this.minRadius = 3;
8335
- _this.schemeType = exports.ɵc.Ordinal;
8335
+ _this.schemeType = exports.ScaleType.Ordinal;
8336
8336
  _this.tooltipDisabled = false;
8337
8337
  _this.activate = new core.EventEmitter();
8338
8338
  _this.deactivate = new core.EventEmitter();
8339
- _this.scaleType = exports.ɵc.Linear;
8339
+ _this.scaleType = exports.ScaleType.Linear;
8340
8340
  _this.margin = [10, 20, 10, 20];
8341
8341
  _this.bubblePadding = [0, 0, 0, 0];
8342
8342
  _this.xAxisHeight = 0;
@@ -8365,7 +8365,7 @@
8365
8365
  this.xDomain = this.getXDomain();
8366
8366
  this.yDomain = this.getYDomain();
8367
8367
  this.transform = "translate(" + this.dims.xOffset + "," + this.margin[0] + ")";
8368
- var colorDomain = this.schemeType === exports.ɵc.Ordinal ? this.seriesDomain : this.rDomain;
8368
+ var colorDomain = this.schemeType === exports.ScaleType.Ordinal ? this.seriesDomain : this.rDomain;
8369
8369
  this.colors = new ColorHelper(this.scheme, this.schemeType, colorDomain, this.customColors);
8370
8370
  this.data = this.results;
8371
8371
  this.minRadius = Math.max(this.minRadius, 1);
@@ -8401,8 +8401,8 @@
8401
8401
  for (var _e = (e_2 = void 0, __values(s.series)), _f = _e.next(); !_f.done; _f = _e.next()) {
8402
8402
  var d = _f.value;
8403
8403
  var r = this.rScale(d.r);
8404
- var cx = this.xScaleType === exports.ɵc.Linear ? this.xScale(Number(d.x)) : this.xScale(d.x);
8405
- var cy = this.yScaleType === exports.ɵc.Linear ? this.yScale(Number(d.y)) : this.yScale(d.y);
8404
+ var cx = this.xScaleType === exports.ScaleType.Linear ? this.xScale(Number(d.x)) : this.xScale(d.x);
8405
+ var cy = this.yScaleType === exports.ScaleType.Linear ? this.yScale(Number(d.y)) : this.yScale(d.y);
8406
8406
  xMin = Math.max(r - cx, xMin);
8407
8407
  yMin = Math.max(r - cy, yMin);
8408
8408
  yMax = Math.max(cy + r, yMax);
@@ -8459,7 +8459,7 @@
8459
8459
  position: this.legendPosition,
8460
8460
  title: undefined
8461
8461
  };
8462
- if (opts.scaleType === exports.ɵc.Ordinal) {
8462
+ if (opts.scaleType === exports.ScaleType.Ordinal) {
8463
8463
  opts.domain = this.seriesDomain;
8464
8464
  opts.colors = this.colors;
8465
8465
  opts.title = this.legendTitle;
@@ -8703,9 +8703,9 @@
8703
8703
  var r = d.r;
8704
8704
  var radius = _this.rScale(r || 1);
8705
8705
  var tooltipLabel = formatLabel(d.name);
8706
- var cx = _this.xScaleType === exports.ɵc.Linear ? _this.xScale(Number(x)) : _this.xScale(x);
8707
- var cy = _this.yScaleType === exports.ɵc.Linear ? _this.yScale(Number(y)) : _this.yScale(y);
8708
- var color = _this.colors.scaleType === exports.ɵc.Linear ? _this.colors.getColor(r) : _this.colors.getColor(seriesName);
8706
+ var cx = _this.xScaleType === exports.ScaleType.Linear ? _this.xScale(Number(x)) : _this.xScale(x);
8707
+ var cy = _this.yScaleType === exports.ScaleType.Linear ? _this.yScale(Number(y)) : _this.yScale(y);
8708
+ var color = _this.colors.scaleType === exports.ScaleType.Linear ? _this.colors.getColor(r) : _this.colors.getColor(seriesName);
8709
8709
  var isActive = !_this.activeEntries.length ? true : _this.isActive({ name: seriesName });
8710
8710
  var opacity = isActive ? 1 : 0.3;
8711
8711
  var data = Object.assign({}, d, {
@@ -9009,7 +9009,7 @@
9009
9009
  _this.margin = [10, 20, 10, 20];
9010
9010
  _this.xAxisHeight = 0;
9011
9011
  _this.yAxisWidth = 0;
9012
- _this.scaleType = exports.ɵc.Linear;
9012
+ _this.scaleType = exports.ScaleType.Linear;
9013
9013
  return _this;
9014
9014
  }
9015
9015
  HeatMapComponent.prototype.update = function () {
@@ -9033,7 +9033,7 @@
9033
9033
  legendType: this.scaleType,
9034
9034
  legendPosition: this.legendPosition
9035
9035
  });
9036
- if (this.scaleType === exports.ɵc.Linear) {
9036
+ if (this.scaleType === exports.ScaleType.Linear) {
9037
9037
  var min = this.min;
9038
9038
  var max = this.max;
9039
9039
  if (!this.min) {
@@ -9201,8 +9201,8 @@
9201
9201
  return {
9202
9202
  scaleType: this.scaleType,
9203
9203
  domain: this.valueDomain,
9204
- colors: this.scaleType === exports.ɵc.Ordinal ? this.colors : this.colors.scale,
9205
- title: this.scaleType === exports.ɵc.Ordinal ? this.legendTitle : undefined,
9204
+ colors: this.scaleType === exports.ScaleType.Ordinal ? this.colors : this.colors.scale,
9205
+ title: this.scaleType === exports.ScaleType.Ordinal ? this.legendTitle : undefined,
9206
9206
  position: this.legendPosition
9207
9207
  };
9208
9208
  };
@@ -9440,16 +9440,16 @@
9440
9440
  var values = getUniqueXDomainValues(this.results);
9441
9441
  this.scaleType = getScaleType(values);
9442
9442
  var domain = [];
9443
- if (this.scaleType === exports.ɵc.Linear) {
9443
+ if (this.scaleType === exports.ScaleType.Linear) {
9444
9444
  values = values.map(function (v) { return Number(v); });
9445
9445
  }
9446
9446
  var min;
9447
9447
  var max;
9448
- if (this.scaleType === exports.ɵc.Time || this.scaleType === exports.ɵc.Linear) {
9448
+ if (this.scaleType === exports.ScaleType.Time || this.scaleType === exports.ScaleType.Linear) {
9449
9449
  min = this.xScaleMin ? this.xScaleMin : Math.min.apply(Math, __spreadArray([], __read(values)));
9450
9450
  max = this.xScaleMax ? this.xScaleMax : Math.max.apply(Math, __spreadArray([], __read(values)));
9451
9451
  }
9452
- if (this.scaleType === exports.ɵc.Time) {
9452
+ if (this.scaleType === exports.ScaleType.Time) {
9453
9453
  domain = [new Date(min), new Date(max)];
9454
9454
  this.xSet = __spreadArray([], __read(values)).sort(function (a, b) {
9455
9455
  var aDate = a.getTime();
@@ -9461,7 +9461,7 @@
9461
9461
  return 0;
9462
9462
  });
9463
9463
  }
9464
- else if (this.scaleType === exports.ɵc.Linear) {
9464
+ else if (this.scaleType === exports.ScaleType.Linear) {
9465
9465
  domain = [min, max];
9466
9466
  // Use compare function to sort numbers numerically
9467
9467
  this.xSet = __spreadArray([], __read(values)).sort(function (a, b) { return a - b; });
@@ -9527,16 +9527,16 @@
9527
9527
  };
9528
9528
  LineChartComponent.prototype.getXScale = function (domain, width) {
9529
9529
  var scale;
9530
- if (this.scaleType === exports.ɵc.Time) {
9530
+ if (this.scaleType === exports.ScaleType.Time) {
9531
9531
  scale = d3Scale.scaleTime().range([0, width]).domain(domain);
9532
9532
  }
9533
- else if (this.scaleType === exports.ɵc.Linear) {
9533
+ else if (this.scaleType === exports.ScaleType.Linear) {
9534
9534
  scale = d3Scale.scaleLinear().range([0, width]).domain(domain);
9535
9535
  if (this.roundDomains) {
9536
9536
  scale = scale.nice();
9537
9537
  }
9538
9538
  }
9539
- else if (this.scaleType === exports.ɵc.Ordinal) {
9539
+ else if (this.scaleType === exports.ScaleType.Ordinal) {
9540
9540
  scale = d3Scale.scalePoint().range([0, width]).padding(0.1).domain(domain);
9541
9541
  }
9542
9542
  return scale;
@@ -9566,7 +9566,7 @@
9566
9566
  };
9567
9567
  LineChartComponent.prototype.setColors = function () {
9568
9568
  var domain;
9569
- if (this.schemeType === exports.ɵc.Ordinal) {
9569
+ if (this.schemeType === exports.ScaleType.Ordinal) {
9570
9570
  domain = this.seriesDomain;
9571
9571
  }
9572
9572
  else {
@@ -9582,7 +9582,7 @@
9582
9582
  title: undefined,
9583
9583
  position: this.legendPosition
9584
9584
  };
9585
- if (opts.scaleType === exports.ɵc.Ordinal) {
9585
+ if (opts.scaleType === exports.ScaleType.Ordinal) {
9586
9586
  opts.domain = this.seriesDomain;
9587
9587
  opts.colors = this.colors;
9588
9588
  opts.title = this.legendTitle;
@@ -9744,10 +9744,10 @@
9744
9744
  .x(function (d) {
9745
9745
  var label = d.name;
9746
9746
  var value;
9747
- if (_this.scaleType === exports.ɵc.Time) {
9747
+ if (_this.scaleType === exports.ScaleType.Time) {
9748
9748
  value = _this.xScale(label);
9749
9749
  }
9750
- else if (_this.scaleType === exports.ɵc.Linear) {
9750
+ else if (_this.scaleType === exports.ScaleType.Linear) {
9751
9751
  value = _this.xScale(Number(label));
9752
9752
  }
9753
9753
  else {
@@ -9764,10 +9764,10 @@
9764
9764
  .x(function (d) {
9765
9765
  var label = d.name;
9766
9766
  var value;
9767
- if (_this.scaleType === exports.ɵc.Time) {
9767
+ if (_this.scaleType === exports.ScaleType.Time) {
9768
9768
  value = _this.xScale(label);
9769
9769
  }
9770
- else if (_this.scaleType === exports.ɵc.Linear) {
9770
+ else if (_this.scaleType === exports.ScaleType.Linear) {
9771
9771
  value = _this.xScale(Number(label));
9772
9772
  }
9773
9773
  else {
@@ -9792,10 +9792,10 @@
9792
9792
  .curve(this.curve);
9793
9793
  };
9794
9794
  LineSeriesComponent.prototype.sortData = function (data) {
9795
- if (this.scaleType === exports.ɵc.Linear) {
9795
+ if (this.scaleType === exports.ScaleType.Linear) {
9796
9796
  data = sortLinear(data, 'name');
9797
9797
  }
9798
- else if (this.scaleType === exports.ɵc.Time) {
9798
+ else if (this.scaleType === exports.ScaleType.Time) {
9799
9799
  data = sortByTime(data, 'name');
9800
9800
  }
9801
9801
  else {
@@ -9804,7 +9804,7 @@
9804
9804
  return data;
9805
9805
  };
9806
9806
  LineSeriesComponent.prototype.updateGradients = function () {
9807
- if (this.colors.scaleType === exports.ɵc.Linear) {
9807
+ if (this.colors.scaleType === exports.ScaleType.Linear) {
9808
9808
  this.hasGradient = true;
9809
9809
  this.gradientId = 'grad' + id().toString();
9810
9810
  this.gradientUrl = "url(#" + this.gradientId + ")";
@@ -10032,12 +10032,12 @@
10032
10032
  };
10033
10033
  PolarChartComponent.prototype.getXDomain = function (values) {
10034
10034
  if (values === void 0) { values = this.getXValues(); }
10035
- if (this.scaleType === exports.ɵc.Time) {
10035
+ if (this.scaleType === exports.ScaleType.Time) {
10036
10036
  var min = Math.min.apply(Math, __spreadArray([], __read(values)));
10037
10037
  var max = Math.max.apply(Math, __spreadArray([], __read(values)));
10038
10038
  return [min, max];
10039
10039
  }
10040
- else if (this.scaleType === exports.ɵc.Linear) {
10040
+ else if (this.scaleType === exports.ScaleType.Linear) {
10041
10041
  values = values.map(function (v) { return Number(v); });
10042
10042
  var min = Math.min.apply(Math, __spreadArray([], __read(values)));
10043
10043
  var max = Math.max.apply(Math, __spreadArray([], __read(values)));
@@ -10102,9 +10102,9 @@
10102
10102
  };
10103
10103
  PolarChartComponent.prototype.getXScale = function (domain, width) {
10104
10104
  switch (this.scaleType) {
10105
- case exports.ɵc.Time:
10105
+ case exports.ScaleType.Time:
10106
10106
  return d3Scale.scaleTime().range([0, width]).domain(domain);
10107
- case exports.ɵc.Linear:
10107
+ case exports.ScaleType.Linear:
10108
10108
  var scale = d3Scale.scaleLinear().range([0, width]).domain(domain);
10109
10109
  return this.roundDomains ? scale.nice() : scale;
10110
10110
  default:
@@ -10125,11 +10125,11 @@
10125
10125
  this.select.emit(data);
10126
10126
  };
10127
10127
  PolarChartComponent.prototype.setColors = function () {
10128
- var domain = this.schemeType === exports.ɵc.Ordinal ? this.seriesDomain : this.yDomain.reverse();
10128
+ var domain = this.schemeType === exports.ScaleType.Ordinal ? this.seriesDomain : this.yDomain.reverse();
10129
10129
  this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);
10130
10130
  };
10131
10131
  PolarChartComponent.prototype.getLegendOptions = function () {
10132
- if (this.schemeType === exports.ɵc.Ordinal) {
10132
+ if (this.schemeType === exports.ScaleType.Ordinal) {
10133
10133
  return {
10134
10134
  scaleType: this.schemeType,
10135
10135
  colors: this.colors,
@@ -10272,7 +10272,7 @@
10272
10272
  var line = this.getLineGenerator();
10273
10273
  var data = this.sortData(this.data.series);
10274
10274
  var seriesName = this.data.name;
10275
- var linearScaleType = this.colors.scaleType === exports.ɵc.Linear;
10275
+ var linearScaleType = this.colors.scaleType === exports.ScaleType.Linear;
10276
10276
  var min = this.yScale.domain()[0];
10277
10277
  this.seriesColor = this.colors.getColor(linearScaleType ? min : seriesName);
10278
10278
  this.path = line(data) || '';
@@ -10301,10 +10301,10 @@
10301
10301
  };
10302
10302
  PolarSeriesComponent.prototype.getAngle = function (d) {
10303
10303
  var label = d.name;
10304
- if (this.scaleType === exports.ɵc.Time) {
10304
+ if (this.scaleType === exports.ScaleType.Time) {
10305
10305
  return this.xScale(label);
10306
10306
  }
10307
- else if (this.scaleType === exports.ɵc.Linear) {
10307
+ else if (this.scaleType === exports.ScaleType.Linear) {
10308
10308
  return this.xScale(Number(label));
10309
10309
  }
10310
10310
  return this.xScale(label);
@@ -10320,10 +10320,10 @@
10320
10320
  .curve(this.curve);
10321
10321
  };
10322
10322
  PolarSeriesComponent.prototype.sortData = function (data) {
10323
- if (this.scaleType === exports.ɵc.Linear) {
10323
+ if (this.scaleType === exports.ScaleType.Linear) {
10324
10324
  return sortLinear(data, 'name');
10325
10325
  }
10326
- else if (this.scaleType === exports.ɵc.Time) {
10326
+ else if (this.scaleType === exports.ScaleType.Time) {
10327
10327
  return sortByTime(data, 'name');
10328
10328
  }
10329
10329
  return sortByDomain(data, 'name', 'asc', this.xScale.domain());
@@ -10349,13 +10349,13 @@
10349
10349
  return "\n <span class=\"tooltip-label\">" + escapeLabel(this.data.name) + " \u2022 " + escapeLabel(label) + "</span>\n <span class=\"tooltip-val\">" + value.toLocaleString() + "</span>\n ";
10350
10350
  };
10351
10351
  PolarSeriesComponent.prototype.updateGradients = function () {
10352
- this.hasGradient = this.gradient || this.colors.scaleType === exports.ɵc.Linear;
10352
+ this.hasGradient = this.gradient || this.colors.scaleType === exports.ScaleType.Linear;
10353
10353
  if (!this.hasGradient) {
10354
10354
  return;
10355
10355
  }
10356
10356
  this.gradientId = 'grad' + id().toString();
10357
10357
  this.gradientUrl = "url(#" + this.gradientId + ")";
10358
- if (this.colors.scaleType === exports.ɵc.Linear) {
10358
+ if (this.colors.scaleType === exports.ScaleType.Linear) {
10359
10359
  var values = this.data.series.map(function (d) { return d.value; });
10360
10360
  var max = Math.max.apply(Math, __spreadArray([], __read(values)));
10361
10361
  var min = Math.min.apply(Math, __spreadArray([], __read(values)));
@@ -10430,7 +10430,7 @@
10430
10430
  this.select.emit(data);
10431
10431
  };
10432
10432
  AdvancedPieChartComponent.prototype.setColors = function () {
10433
- this.colors = new ColorHelper(this.scheme, exports.ɵc.Ordinal, this.domain, this.customColors);
10433
+ this.colors = new ColorHelper(this.scheme, exports.ScaleType.Ordinal, this.domain, this.customColors);
10434
10434
  };
10435
10435
  AdvancedPieChartComponent.prototype.onActivate = function (item, fromLegend) {
10436
10436
  if (fromLegend === void 0) { fromLegend = false; }
@@ -10791,11 +10791,11 @@
10791
10791
  this.select.emit(data);
10792
10792
  };
10793
10793
  PieChartComponent.prototype.setColors = function () {
10794
- this.colors = new ColorHelper(this.scheme, exports.ɵc.Ordinal, this.domain, this.customColors);
10794
+ this.colors = new ColorHelper(this.scheme, exports.ScaleType.Ordinal, this.domain, this.customColors);
10795
10795
  };
10796
10796
  PieChartComponent.prototype.getLegendOptions = function () {
10797
10797
  return {
10798
- scaleType: exports.ɵc.Ordinal,
10798
+ scaleType: exports.ScaleType.Ordinal,
10799
10799
  domain: this.domain,
10800
10800
  colors: this.colors,
10801
10801
  title: this.legendTitle,
@@ -11022,7 +11022,7 @@
11022
11022
  this.select.emit(data);
11023
11023
  };
11024
11024
  PieGridComponent.prototype.setColors = function () {
11025
- this.colorScale = new ColorHelper(this.scheme, exports.ɵc.Ordinal, this.domain, this.customColors);
11025
+ this.colorScale = new ColorHelper(this.scheme, exports.ScaleType.Ordinal, this.domain, this.customColors);
11026
11026
  };
11027
11027
  PieGridComponent.prototype.onActivate = function (item, fromLegend) {
11028
11028
  if (fromLegend === void 0) { fromLegend = false; }
@@ -11771,7 +11771,7 @@
11771
11771
  this.select.emit(data);
11772
11772
  };
11773
11773
  NumberCardComponent.prototype.setColors = function () {
11774
- this.colors = new ColorHelper(this.scheme, exports.ɵc.Ordinal, this.domain, this.customColors);
11774
+ this.colors = new ColorHelper(this.scheme, exports.ScaleType.Ordinal, this.domain, this.customColors);
11775
11775
  };
11776
11776
  return NumberCardComponent;
11777
11777
  }(BaseChartComponent));
@@ -12024,7 +12024,7 @@
12024
12024
  this.select.emit(data);
12025
12025
  };
12026
12026
  TreeMapComponent.prototype.setColors = function () {
12027
- this.colors = new ColorHelper(this.scheme, exports.ɵc.Ordinal, this.domain, this.customColors);
12027
+ this.colors = new ColorHelper(this.scheme, exports.ScaleType.Ordinal, this.domain, this.customColors);
12028
12028
  };
12029
12029
  return TreeMapComponent;
12030
12030
  }(BaseChartComponent));
@@ -12202,7 +12202,7 @@
12202
12202
  });
12203
12203
  };
12204
12204
  LinearGaugeComponent.prototype.setColors = function () {
12205
- this.colors = new ColorHelper(this.scheme, exports.ɵc.Ordinal, [this.value], this.customColors);
12205
+ this.colors = new ColorHelper(this.scheme, exports.ScaleType.Ordinal, [this.value], this.customColors);
12206
12206
  };
12207
12207
  return LinearGaugeComponent;
12208
12208
  }(BaseChartComponent));
@@ -12406,7 +12406,7 @@
12406
12406
  };
12407
12407
  GaugeComponent.prototype.getLegendOptions = function () {
12408
12408
  return {
12409
- scaleType: exports.ɵc.Ordinal,
12409
+ scaleType: exports.ScaleType.Ordinal,
12410
12410
  colors: this.colors,
12411
12411
  domain: this.domain,
12412
12412
  title: this.legendTitle,
@@ -12414,7 +12414,7 @@
12414
12414
  };
12415
12415
  };
12416
12416
  GaugeComponent.prototype.setColors = function () {
12417
- this.colors = new ColorHelper(this.scheme, exports.ɵc.Ordinal, this.domain, this.customColors);
12417
+ this.colors = new ColorHelper(this.scheme, exports.ScaleType.Ordinal, this.domain, this.customColors);
12418
12418
  };
12419
12419
  GaugeComponent.prototype.onActivate = function (item) {
12420
12420
  var idx = this.activeEntries.findIndex(function (d) {
@@ -12765,7 +12765,6 @@
12765
12765
  exports.PolarChartModule = PolarChartModule;
12766
12766
  exports.PolarSeriesComponent = PolarSeriesComponent;
12767
12767
  exports.ScaleLegendComponent = ScaleLegendComponent;
12768
- exports.ScaleType = exports.ɵc;
12769
12768
  exports.SeriesHorizontal = SeriesHorizontal;
12770
12769
  exports.SeriesVerticalComponent = SeriesVerticalComponent;
12771
12770
  exports.SvgLinearGradientComponent = SvgLinearGradientComponent;