@carbon/charts-vue 0.32.12 → 0.33.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.
@@ -6834,7 +6834,7 @@ var tools_Tools;
6834
6834
  function getDimensions(el) {
6835
6835
  return {
6836
6836
  width: parseFloat(el.style.width.replace("px", "") || el.offsetWidth),
6837
- height: parseFloat(el.style.height.replace("px", "") || el.offsetHeight),
6837
+ height: parseFloat(el.style.height.replace("px", "") || el.offsetHeight)
6838
6838
  };
6839
6839
  }
6840
6840
  Tools.getDimensions = getDimensions;
@@ -6864,7 +6864,7 @@ var tools_Tools;
6864
6864
  .split(",");
6865
6865
  return {
6866
6866
  tx: transforms[0],
6867
- ty: transforms[1],
6867
+ ty: transforms[1]
6868
6868
  };
6869
6869
  }
6870
6870
  return null;
@@ -6886,7 +6886,7 @@ var tools_Tools;
6886
6886
  var xyString = match.split(",");
6887
6887
  return {
6888
6888
  x: parseFloat(xyString[0]),
6889
- y: parseFloat(xyString[1]),
6889
+ y: parseFloat(xyString[1])
6890
6890
  };
6891
6891
  }
6892
6892
  Tools.getTranformOffsets = getTranformOffsets;
@@ -6933,19 +6933,21 @@ var tools_Tools;
6933
6933
  }
6934
6934
  Tools.convertValueToPercentage = convertValueToPercentage;
6935
6935
  /**
6936
- * Truncate the labels
6937
- * @export
6938
- * @param {any} fullText
6939
- * @param {any} truncationType
6940
- * @param {any} numCharacter
6941
- * @returns Truncated text
6942
- */
6936
+ * Truncate the labels
6937
+ * @export
6938
+ * @param {any} fullText
6939
+ * @param {any} truncationType
6940
+ * @param {any} numCharacter
6941
+ * @returns Truncated text
6942
+ */
6943
6943
  function truncateLabel(fullText, truncationType, numCharacter) {
6944
6944
  if (numCharacter > fullText.length) {
6945
6945
  return fullText;
6946
6946
  }
6947
6947
  if (truncationType === TruncationTypes.MID_LINE) {
6948
- return fullText.substr(0, numCharacter / 2) + "..." + fullText.substr(-numCharacter / 2);
6948
+ return (fullText.substr(0, numCharacter / 2) +
6949
+ "..." +
6950
+ fullText.substr(-numCharacter / 2));
6949
6951
  }
6950
6952
  else if (truncationType === TruncationTypes.FRONT_LINE) {
6951
6953
  return "..." + fullText.substr(-numCharacter);
@@ -6970,7 +6972,7 @@ var tools_Tools;
6970
6972
  function arrayDifferences(oldArray, newArray) {
6971
6973
  var difference = {
6972
6974
  missing: [],
6973
- added: [],
6975
+ added: []
6974
6976
  };
6975
6977
  oldArray.forEach(function (element) {
6976
6978
  if (newArray.indexOf(element) === -1) {
@@ -7057,7 +7059,7 @@ var tools_Tools;
7057
7059
  y0: verticalCoordinates.x0,
7058
7060
  y1: verticalCoordinates.x1,
7059
7061
  x0: verticalCoordinates.y0,
7060
- x1: verticalCoordinates.y1,
7062
+ x1: verticalCoordinates.y1
7061
7063
  };
7062
7064
  }
7063
7065
  return verticalCoordinates;
@@ -7096,7 +7098,7 @@ var en_US_default = /*#__PURE__*/__webpack_require__.n(en_US);
7096
7098
  var standardTruncationOptions = {
7097
7099
  type: TruncationTypes.END_LINE,
7098
7100
  threshold: 16,
7099
- numCharacter: 14,
7101
+ numCharacter: 14
7100
7102
  };
7101
7103
  /**
7102
7104
  * Legend options
@@ -7116,9 +7118,9 @@ var legend = {
7116
7118
  },
7117
7119
  checkbox: {
7118
7120
  radius: 6.5,
7119
- spaceAfter: 4,
7121
+ spaceAfter: 4
7120
7122
  },
7121
- truncation: standardTruncationOptions,
7123
+ truncation: standardTruncationOptions
7122
7124
  };
7123
7125
  /**
7124
7126
  * Grid options
@@ -7164,19 +7166,19 @@ var barChartTooltip = tools_Tools.merge({}, axisChartTooltip, {
7164
7166
  var configuration_axes = {
7165
7167
  top: {
7166
7168
  includeZero: true,
7167
- truncation: standardTruncationOptions,
7169
+ truncation: standardTruncationOptions
7168
7170
  },
7169
7171
  bottom: {
7170
7172
  includeZero: true,
7171
- truncation: standardTruncationOptions,
7173
+ truncation: standardTruncationOptions
7172
7174
  },
7173
7175
  left: {
7174
7176
  includeZero: true,
7175
- truncation: standardTruncationOptions,
7177
+ truncation: standardTruncationOptions
7176
7178
  },
7177
7179
  right: {
7178
7180
  includeZero: true,
7179
- truncation: standardTruncationOptions,
7181
+ truncation: standardTruncationOptions
7180
7182
  }
7181
7183
  };
7182
7184
  var timeScale = {
@@ -7209,7 +7211,8 @@ var configuration_chart = {
7209
7211
  },
7210
7212
  data: {
7211
7213
  groupMapsTo: "group",
7212
- loading: false
7214
+ loading: false,
7215
+ selectedGroups: []
7213
7216
  },
7214
7217
  color: {
7215
7218
  scale: null
@@ -7345,7 +7348,11 @@ var gaugeChart = tools_Tools.merge({}, configuration_chart, {
7345
7348
  numberSpacing: 10,
7346
7349
  deltaFontSize: function (radius) { return radius / 8; },
7347
7350
  valueFontSize: function (radius) { return radius / 2.5; },
7348
- numberFormatter: function (number) { return (number.toFixed(2) % 1 !== 0) ? number.toFixed(2).toLocaleString() : number.toFixed().toLocaleString(); }
7351
+ numberFormatter: function (number) {
7352
+ return number.toFixed(2) % 1 !== 0
7353
+ ? number.toFixed(2).toLocaleString()
7354
+ : number.toFixed().toLocaleString();
7355
+ }
7349
7356
  }
7350
7357
  });
7351
7358
  /**
@@ -7772,7 +7779,7 @@ var getColor = function (obj, shade) { return obj[shade]; };
7772
7779
  magenta: function (shade) { return getColor(magenta, shade); },
7773
7780
  purple: function (shade) { return getColor(purple, shade); },
7774
7781
  red: function (shade) { return getColor(red, shade); },
7775
- teal: function (shade) { return getColor(teal, shade); },
7782
+ teal: function (shade) { return getColor(teal, shade); }
7776
7783
  });
7777
7784
  //# sourceMappingURL=../../src/services/colors.js.map
7778
7785
  // CONCATENATED MODULE: ./node_modules/@carbon/charts/services/colorPalettes.js
@@ -7794,7 +7801,7 @@ var WHITE = [
7794
7801
  services_colors.teal(50),
7795
7802
  services_colors.cyan(90),
7796
7803
  "#8a3800",
7797
- services_colors.purple(50),
7804
+ services_colors.purple(50)
7798
7805
  ];
7799
7806
  var DARK = [
7800
7807
  services_colors.purple(60),
@@ -7810,7 +7817,7 @@ var DARK = [
7810
7817
  services_colors.teal(40),
7811
7818
  services_colors.cyan(20),
7812
7819
  "#ba4e00",
7813
- services_colors.purple(30),
7820
+ services_colors.purple(30)
7814
7821
  ];
7815
7822
  var G10 = WHITE;
7816
7823
  var G90 = DARK;
@@ -12182,11 +12189,10 @@ var model_ChartModel = /** @class */ (function () {
12182
12189
  this.colorScale = {};
12183
12190
  this.services = services;
12184
12191
  }
12185
- ChartModel.prototype.getDisplayData = function () {
12192
+ ChartModel.prototype.getAllDataFromDomain = function () {
12186
12193
  if (!this.get("data")) {
12187
12194
  return null;
12188
12195
  }
12189
- var ACTIVE = legend.items.status.ACTIVE;
12190
12196
  var dataGroups = this.getDataGroups();
12191
12197
  // Remove datasets that have been disabled
12192
12198
  var displayData = tools_Tools.clone(this.get("data"));
@@ -12205,12 +12211,26 @@ var model_ChartModel = /** @class */ (function () {
12205
12211
  else {
12206
12212
  var _a = axesOptions[axis].domain, start_1 = _a[0], end_1 = _a[1];
12207
12213
  // Filter out data outside domain
12208
- displayData = displayData.filter(function (datum) { return datum[mapsTo_1] >= start_1 && datum[mapsTo_1] <= end_1; });
12214
+ displayData = displayData.filter(function (datum) {
12215
+ return datum[mapsTo_1] >= start_1 && datum[mapsTo_1] <= end_1;
12216
+ });
12209
12217
  }
12210
12218
  }
12211
12219
  });
12212
12220
  }
12213
12221
  return displayData.filter(function (datum) {
12222
+ return dataGroups.find(function (group) { return group.name === datum[groupMapsTo]; });
12223
+ });
12224
+ };
12225
+ ChartModel.prototype.getDisplayData = function () {
12226
+ if (!this.get("data")) {
12227
+ return null;
12228
+ }
12229
+ var ACTIVE = legend.items.status.ACTIVE;
12230
+ var dataGroups = this.getDataGroups();
12231
+ var groupMapsTo = this.getOptions().data.groupMapsTo;
12232
+ var allDataFromDomain = this.getAllDataFromDomain();
12233
+ return allDataFromDomain.filter(function (datum) {
12214
12234
  var group = dataGroups.find(function (group) { return group.name === datum[groupMapsTo]; });
12215
12235
  return group.status === ACTIVE;
12216
12236
  });
@@ -12287,7 +12307,6 @@ var model_ChartModel = /** @class */ (function () {
12287
12307
  scaleType === ScaleTypes.LINEAR) {
12288
12308
  stackKeys.sort(function (a, b) { return a - b; });
12289
12309
  }
12290
- ;
12291
12310
  var dataGroupNames = this.getDataGroupNames();
12292
12311
  return stackKeys.map(function (key) {
12293
12312
  var correspondingValues = { sharedStackKey: key };
@@ -12416,6 +12435,19 @@ var model_ChartModel = /** @class */ (function () {
12416
12435
  group.name === changedLabel ? ACTIVE : DISABLED;
12417
12436
  });
12418
12437
  }
12438
+ // Updates selected groups
12439
+ var updatedActiveItems = dataGroups.filter(function (group) { return group.status === ACTIVE; });
12440
+ var options = this.getOptions();
12441
+ var hasUpdatedDeactivatedItems = dataGroups.some(function (group) { return group.status === DISABLED; });
12442
+ // If there are deactivated items, map the item name into selected groups
12443
+ if (hasUpdatedDeactivatedItems) {
12444
+ options.data.selectedGroups = updatedActiveItems.map(function (activeItem) { return activeItem.name; });
12445
+ }
12446
+ else {
12447
+ // If every item is active, clear array
12448
+ options.data.selectedGroups = [];
12449
+ }
12450
+ ;
12419
12451
  // dispatch legend filtering event with the status of all the dataLabels
12420
12452
  this.services.events.dispatchEvent(Events.Legend.ITEMS_UPDATE, {
12421
12453
  dataGroups: dataGroups
@@ -12543,11 +12575,27 @@ var model_ChartModel = /** @class */ (function () {
12543
12575
  };
12544
12576
  ChartModel.prototype.generateDataGroups = function (data) {
12545
12577
  var groupMapsTo = this.getOptions().data.groupMapsTo;
12546
- var ACTIVE = legend.items.status.ACTIVE;
12578
+ var _a = legend.items.status, ACTIVE = _a.ACTIVE, DISABLED = _a.DISABLED;
12579
+ var options = this.getOptions();
12547
12580
  var uniqueDataGroups = src_map(data, function (datum) { return datum[groupMapsTo]; }).keys();
12581
+ // check if selectedGroups can be applied to chart with current data groups
12582
+ if (options.data.selectedGroups.length) {
12583
+ var hasAllSelectedGroups = options.data.selectedGroups
12584
+ .every(function (groupName) { return uniqueDataGroups.includes(groupName); });
12585
+ if (!hasAllSelectedGroups) {
12586
+ options.data.selectedGroups = [];
12587
+ }
12588
+ ;
12589
+ }
12590
+ // Get group status based on items in selected groups
12591
+ var getStatus = function (groupName) {
12592
+ return !options.data.selectedGroups.length || options.data.selectedGroups.includes(groupName)
12593
+ ? ACTIVE
12594
+ : DISABLED;
12595
+ };
12548
12596
  return uniqueDataGroups.map(function (groupName) { return ({
12549
12597
  name: groupName,
12550
- status: ACTIVE
12598
+ status: getStatus(groupName)
12551
12599
  }); });
12552
12600
  };
12553
12601
  /*
@@ -13678,7 +13726,7 @@ var dom_utils_DOMUtils = /** @class */ (function (_super) {
13678
13726
  }
13679
13727
  var finalDimensions = {
13680
13728
  width: 0,
13681
- height: 0,
13729
+ height: 0
13682
13730
  };
13683
13731
  var validateAndSetDimensions = function (dimensions) {
13684
13732
  if (dimensions) {
@@ -13697,7 +13745,7 @@ var dom_utils_DOMUtils = /** @class */ (function (_super) {
13697
13745
  };
13698
13746
  var attrDimensions = {
13699
13747
  width: svgSelector.attr("width"),
13700
- height: svgSelector.attr("height"),
13748
+ height: svgSelector.attr("height")
13701
13749
  };
13702
13750
  var bbox, bboxDimensions, boundingRect, boundingRectDimensions;
13703
13751
  // In many versions of Firefox
@@ -13706,7 +13754,7 @@ var dom_utils_DOMUtils = /** @class */ (function (_super) {
13706
13754
  bbox = svgSelector.node().getBBox();
13707
13755
  bboxDimensions = {
13708
13756
  width: bbox.width,
13709
- height: bbox.height,
13757
+ height: bbox.height
13710
13758
  };
13711
13759
  }
13712
13760
  catch (e) { }
@@ -13714,13 +13762,13 @@ var dom_utils_DOMUtils = /** @class */ (function (_super) {
13714
13762
  boundingRect = svgSelector.node().getBoundingClientRect();
13715
13763
  boundingRectDimensions = {
13716
13764
  width: boundingRect.width,
13717
- height: boundingRect.height,
13765
+ height: boundingRect.height
13718
13766
  };
13719
13767
  }
13720
13768
  catch (e) { }
13721
13769
  var clientDimensions = {
13722
13770
  width: svgSelector.node().clientWidth,
13723
- height: svgSelector.node().clientHeight,
13771
+ height: svgSelector.node().clientHeight
13724
13772
  };
13725
13773
  // If both attribute values are numbers
13726
13774
  // And not percentages or NaN
@@ -13753,7 +13801,7 @@ var dom_utils_DOMUtils = /** @class */ (function (_super) {
13753
13801
  try {
13754
13802
  var nativeDimensions = {
13755
13803
  width: tools_Tools.getProperty(svgSelector.node(), "width", "baseVal", "value"),
13756
- height: tools_Tools.getProperty(svgSelector.node(), "height", "baseVal", "value"),
13804
+ height: tools_Tools.getProperty(svgSelector.node(), "height", "baseVal", "value")
13757
13805
  };
13758
13806
  validateAndSetDimensions(nativeDimensions);
13759
13807
  }
@@ -13908,7 +13956,7 @@ var events_Events = /** @class */ (function (_super) {
13908
13956
  var newEvent;
13909
13957
  if (eventDetail) {
13910
13958
  newEvent = new CustomEvent(eventType, {
13911
- detail: eventDetail,
13959
+ detail: eventDetail
13912
13960
  });
13913
13961
  }
13914
13962
  else {
@@ -16451,13 +16499,13 @@ var scales_cartesian_CartesianScales = /** @class */ (function (_super) {
16451
16499
  top: null,
16452
16500
  right: null,
16453
16501
  bottom: null,
16454
- left: null,
16502
+ left: null
16455
16503
  };
16456
16504
  _this.scales = {
16457
16505
  top: null,
16458
16506
  right: null,
16459
16507
  bottom: null,
16460
- left: null,
16508
+ left: null
16461
16509
  };
16462
16510
  return _this;
16463
16511
  }
@@ -16517,7 +16565,7 @@ var scales_cartesian_CartesianScales = /** @class */ (function (_super) {
16517
16565
  CartesianScales.prototype.getMainXAxisPosition = function () {
16518
16566
  var possibleXAxisPositions = [
16519
16567
  AxisPositions.BOTTOM,
16520
- AxisPositions.TOP,
16568
+ AxisPositions.TOP
16521
16569
  ];
16522
16570
  return [this.domainAxisPosition, this.rangeAxisPosition].find(function (position) { return possibleXAxisPositions.indexOf(position) > -1; });
16523
16571
  };
@@ -16525,7 +16573,7 @@ var scales_cartesian_CartesianScales = /** @class */ (function (_super) {
16525
16573
  CartesianScales.prototype.getMainYAxisPosition = function () {
16526
16574
  var possibleYAxisPositions = [
16527
16575
  AxisPositions.LEFT,
16528
- AxisPositions.RIGHT,
16576
+ AxisPositions.RIGHT
16529
16577
  ];
16530
16578
  return [this.domainAxisPosition, this.rangeAxisPosition].find(function (position) { return possibleYAxisPositions.indexOf(position) > -1; });
16531
16579
  };
@@ -16625,7 +16673,7 @@ var scales_cartesian_CartesianScales = /** @class */ (function (_super) {
16625
16673
  var mainHorizontalScaleType = mainHorizontalAxisOptions.scaleType || ScaleTypes.LINEAR;
16626
16674
  var result = {
16627
16675
  domainAxisPosition: null,
16628
- rangeAxisPosition: null,
16676
+ rangeAxisPosition: null
16629
16677
  };
16630
16678
  if (mainHorizontalScaleType === ScaleTypes.LABELS ||
16631
16679
  mainHorizontalScaleType === ScaleTypes.TIME) {
@@ -16731,7 +16779,7 @@ var scales_cartesian_CartesianScales = /** @class */ (function (_super) {
16731
16779
  }
16732
16780
  return {
16733
16781
  threshold: highestThreshold,
16734
- scaleValue: domainScale(highestThreshold.value),
16782
+ scaleValue: domainScale(highestThreshold.value)
16735
16783
  };
16736
16784
  };
16737
16785
  CartesianScales.prototype.getHighestRangeThreshold = function () {
@@ -16746,7 +16794,7 @@ var scales_cartesian_CartesianScales = /** @class */ (function (_super) {
16746
16794
  var highestThreshold = thresholds.sort(function (a, b) { return b.value - a.value; })[0];
16747
16795
  return {
16748
16796
  threshold: highestThreshold,
16749
- scaleValue: rangeScale(highestThreshold.value),
16797
+ scaleValue: rangeScale(highestThreshold.value)
16750
16798
  };
16751
16799
  };
16752
16800
  return CartesianScales;
@@ -16758,49 +16806,49 @@ function addSpacingToTimeDomain(domain, spaceToAddToEdges) {
16758
16806
  if (differenceInYears(endDate, startDate) > 1) {
16759
16807
  return [
16760
16808
  subYears(startDate, spaceToAddToEdges),
16761
- addYears(endDate, spaceToAddToEdges),
16809
+ addYears(endDate, spaceToAddToEdges)
16762
16810
  ];
16763
16811
  }
16764
16812
  if (differenceInMonths(endDate, startDate) > 1) {
16765
16813
  return [
16766
16814
  subMonths(startDate, spaceToAddToEdges),
16767
- addMonths(endDate, spaceToAddToEdges),
16815
+ addMonths(endDate, spaceToAddToEdges)
16768
16816
  ];
16769
16817
  }
16770
16818
  if (differenceInDays(endDate, startDate) > 1) {
16771
16819
  return [
16772
16820
  subDays(startDate, spaceToAddToEdges),
16773
- addDays(endDate, spaceToAddToEdges),
16821
+ addDays(endDate, spaceToAddToEdges)
16774
16822
  ];
16775
16823
  }
16776
16824
  if (differenceInHours(endDate, startDate) > 1) {
16777
16825
  return [
16778
16826
  subHours(startDate, spaceToAddToEdges),
16779
- addHours(endDate, spaceToAddToEdges),
16827
+ addHours(endDate, spaceToAddToEdges)
16780
16828
  ];
16781
16829
  }
16782
16830
  if (differenceInMinutes(endDate, startDate) > 30) {
16783
16831
  return [
16784
16832
  subMinutes(startDate, spaceToAddToEdges * 30),
16785
- addMinutes(endDate, spaceToAddToEdges * 30),
16833
+ addMinutes(endDate, spaceToAddToEdges * 30)
16786
16834
  ];
16787
16835
  }
16788
16836
  if (differenceInMinutes(endDate, startDate) > 1) {
16789
16837
  return [
16790
16838
  subMinutes(startDate, spaceToAddToEdges),
16791
- addMinutes(endDate, spaceToAddToEdges),
16839
+ addMinutes(endDate, spaceToAddToEdges)
16792
16840
  ];
16793
16841
  }
16794
16842
  if (differenceInSeconds(endDate, startDate) > 15) {
16795
16843
  return [
16796
16844
  subSeconds(startDate, spaceToAddToEdges * 15),
16797
- addSeconds(endDate, spaceToAddToEdges * 15),
16845
+ addSeconds(endDate, spaceToAddToEdges * 15)
16798
16846
  ];
16799
16847
  }
16800
16848
  if (differenceInSeconds(endDate, startDate) > 1) {
16801
16849
  return [
16802
16850
  subSeconds(startDate, spaceToAddToEdges),
16803
- addSeconds(endDate, spaceToAddToEdges),
16851
+ addSeconds(endDate, spaceToAddToEdges)
16804
16852
  ];
16805
16853
  }
16806
16854
  return [startDate, endDate];
@@ -17781,7 +17829,7 @@ var curves_Curves = /** @class */ (function (_super) {
17781
17829
  curveNatural: natural,
17782
17830
  curveStep: curve_step,
17783
17831
  curveStepAfter: stepAfter,
17784
- curveStepBefore: stepBefore,
17832
+ curveStepBefore: stepBefore
17785
17833
  };
17786
17834
  return _this;
17787
17835
  }
@@ -17930,7 +17978,10 @@ var legend_Legend = /** @class */ (function (_super) {
17930
17978
  var addedLegendItems = legendItems
17931
17979
  .enter()
17932
17980
  .append("g")
17933
- .classed("legend-item", true);
17981
+ .classed("legend-item", true)
17982
+ .classed("active", function (d, i) {
17983
+ return d.status === options.legend.items.status.ACTIVE;
17984
+ });
17934
17985
  // Configs
17935
17986
  var checkboxRadius = options.legend.checkbox.radius;
17936
17987
  // Truncation
@@ -17959,8 +18010,7 @@ var legend_Legend = /** @class */ (function (_super) {
17959
18010
  .merge(legendItems.select("text"));
17960
18011
  // truncate the legend label if it's too long
17961
18012
  if (truncationType !== TruncationTypes.NONE) {
17962
- addedLegendItemsText
17963
- .html(function (d) {
18013
+ addedLegendItemsText.html(function (d) {
17964
18014
  if (d.name.length > truncationThreshold) {
17965
18015
  return tools_Tools.truncateLabel(d.name, truncationType, truncationNumCharacter);
17966
18016
  }
@@ -17970,8 +18020,7 @@ var legend_Legend = /** @class */ (function (_super) {
17970
18020
  });
17971
18021
  }
17972
18022
  else {
17973
- addedLegendItemsText
17974
- .html(function (d) { return d.name; });
18023
+ addedLegendItemsText.html(function (d) { return d.name; });
17975
18024
  }
17976
18025
  this.breakItemsIntoLines(addedLegendItems);
17977
18026
  // Remove old elements as needed.
@@ -18051,11 +18100,19 @@ var legend_Legend = /** @class */ (function (_super) {
18051
18100
  legendItem
18052
18101
  .select("text")
18053
18102
  .attr("x", startingPoint + spaceNeededForCheckbox)
18054
- .attr("y", yOffset + yPosition + 2);
18103
+ .attr("y", yOffset + yPosition + 3);
18055
18104
  lastYPosition = yPosition;
18105
+ // Test if legendItems are placed in the correct direction
18106
+ var testHorizontal = (!legendOrientation ||
18107
+ legendOrientation === LegendOrientations.HORIZONTAL) &&
18108
+ legendItem.select("rect.checkbox").attr("y") === '0';
18109
+ var testVertical = legendOrientation === LegendOrientations.VERTICAL &&
18110
+ legendItem.select("rect.checkbox").attr("x") === '0';
18111
+ var hasCorrectLegendDirection = testHorizontal || testVertical;
18056
18112
  // Render checkbox check icon
18057
18113
  if (hasDeactivatedItems &&
18058
- legendItem.select("g.check").empty()) {
18114
+ legendItem.select("g.check").empty() &&
18115
+ hasCorrectLegendDirection) {
18059
18116
  legendItem.append("g").classed("check", true).html("\n\t\t\t\t\t\t\t<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 32 32\" aria-hidden=\"true\"\n\t\t\t\t\t\t\t\tstyle=\"will-change: transform;\">\n\t\t\t\t\t\t\t\t<path d=\"M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z\"></path>\n\t\t\t\t\t\t\t\t<title>Checkmark</title>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t");
18060
18117
  legendItem
18061
18118
  .select("g.check svg")
@@ -18080,7 +18137,7 @@ var legend_Legend = /** @class */ (function (_super) {
18080
18137
  svg.selectAll("g.legend-item")
18081
18138
  .on("mouseover", function () {
18082
18139
  self.services.events.dispatchEvent(Events.Legend.ITEM_HOVER, {
18083
- hoveredElement: src_select(this),
18140
+ hoveredElement: src_select(this)
18084
18141
  });
18085
18142
  // Configs
18086
18143
  var checkboxRadius = options.legend.checkbox.radius;
@@ -18098,7 +18155,7 @@ var legend_Legend = /** @class */ (function (_super) {
18098
18155
  })
18099
18156
  .on("click", function () {
18100
18157
  self.services.events.dispatchEvent(Events.Legend.ITEM_CLICK, {
18101
- clickedElement: src_select(this),
18158
+ clickedElement: src_select(this)
18102
18159
  });
18103
18160
  var clickedItem = src_select(this);
18104
18161
  var clickedItemData = clickedItem.datum();
@@ -18110,7 +18167,7 @@ var legend_Legend = /** @class */ (function (_super) {
18110
18167
  if (hoveredItemData.name.length > truncationThreshold) {
18111
18168
  self.services.events.dispatchEvent(Events.Tooltip.SHOW, {
18112
18169
  hoveredElement: hoveredItem,
18113
- type: TooltipTypes.LEGEND,
18170
+ type: TooltipTypes.LEGEND
18114
18171
  });
18115
18172
  }
18116
18173
  })
@@ -18119,7 +18176,7 @@ var legend_Legend = /** @class */ (function (_super) {
18119
18176
  hoveredItem.select("rect.hover-stroke").remove();
18120
18177
  self.services.events.dispatchEvent(Events.Tooltip.HIDE);
18121
18178
  self.services.events.dispatchEvent(Events.Legend.ITEM_MOUSEOUT, {
18122
- hoveredElement: hoveredItem,
18179
+ hoveredElement: hoveredItem
18123
18180
  });
18124
18181
  });
18125
18182
  };
@@ -20693,7 +20750,7 @@ var TIME_INTERVALS = [
20693
20750
  ["daily", 24 * 60 * 60 * 1000],
20694
20751
  ["monthly", 30 * 24 * 60 * 60 * 1000],
20695
20752
  ["quarterly", 3 * 30 * 24 * 60 * 60 * 1000],
20696
- ["yearly", 12 * 30 * 24 * 60 * 60 * 1000],
20753
+ ["yearly", 12 * 30 * 24 * 60 * 60 * 1000]
20697
20754
  ];
20698
20755
  // Return true if the tick is a primary tick, false otherwise
20699
20756
  function isTickPrimary(tick, i, interval, showDayName) {
@@ -20763,7 +20820,7 @@ function getTimeformats(timestamp) {
20763
20820
  d: date.getDate(),
20764
20821
  H: date.getHours(),
20765
20822
  m: date.getMinutes(),
20766
- s: date.getSeconds(),
20823
+ s: date.getSeconds() // seconds: 0-59
20767
20824
  };
20768
20825
  }
20769
20826
  // Find the differences between consecutive numbers in an array
@@ -20919,7 +20976,7 @@ var threshold_Threshold = /** @class */ (function (_super) {
20919
20976
  if (scaleType === ScaleTypes.TIME) {
20920
20977
  var isVertical = [
20921
20978
  AxisPositions.LEFT,
20922
- AxisPositions.RIGHT,
20979
+ AxisPositions.RIGHT
20923
20980
  ].includes(axisPosition);
20924
20981
  var mainXScale = this.services.cartesianScales.getMainXScale();
20925
20982
  var mainYScale = this.services.cartesianScales.getMainYScale();
@@ -20950,20 +21007,20 @@ var threshold_Threshold = /** @class */ (function (_super) {
20950
21007
  // Find out whether threshold label should be shown on the left or right side
20951
21008
  var bestPlacementOption = this.positionService.findBestPlacementAt({
20952
21009
  left: mouseRelativePos[0],
20953
- top: mouseRelativePos[1],
21010
+ top: mouseRelativePos[1]
20954
21011
  }, target, [
20955
21012
  PLACEMENTS.RIGHT,
20956
21013
  PLACEMENTS.LEFT,
20957
21014
  PLACEMENTS.TOP,
20958
- PLACEMENTS.BOTTOM,
21015
+ PLACEMENTS.BOTTOM
20959
21016
  ], function () { return ({
20960
21017
  width: holder.offsetWidth,
20961
- height: holder.offsetHeight,
21018
+ height: holder.offsetHeight
20962
21019
  }); });
20963
21020
  // Get coordinates to where label should be positioned
20964
21021
  var pos = this.positionService.findPositionAt({
20965
21022
  left: mouseRelativePos[0],
20966
- top: mouseRelativePos[1],
21023
+ top: mouseRelativePos[1]
20967
21024
  }, target, bestPlacementOption);
20968
21025
  this.positionService.setElement(target, pos);
20969
21026
  };
@@ -20974,13 +21031,13 @@ var threshold_Threshold = /** @class */ (function (_super) {
20974
21031
  .on("mouseover mousemove", function () {
20975
21032
  self.threshold.classed("active", true);
20976
21033
  self.services.events.dispatchEvent(Events.Threshold.SHOW, {
20977
- hoveredElement: src_select(self.threshold),
21034
+ hoveredElement: src_select(self.threshold)
20978
21035
  });
20979
21036
  })
20980
21037
  .on("mouseout", function () {
20981
21038
  self.threshold.classed("active", false);
20982
21039
  self.services.events.dispatchEvent(Events.Threshold.HIDE, {
20983
- hoveredElement: src_select(self.threshold),
21040
+ hoveredElement: src_select(self.threshold)
20984
21041
  });
20985
21042
  });
20986
21043
  };
@@ -21048,12 +21105,12 @@ var title_Title = /** @class */ (function (_super) {
21048
21105
  .on("mouseenter", function () {
21049
21106
  self_1.services.events.dispatchEvent(Events.Tooltip.SHOW, {
21050
21107
  hoveredElement: title,
21051
- type: TooltipTypes.TITLE,
21108
+ type: TooltipTypes.TITLE
21052
21109
  });
21053
21110
  })
21054
21111
  .on("mouseout", function () {
21055
21112
  self_1.services.events.dispatchEvent(Events.Tooltip.HIDE, {
21056
- hoveredElement: title,
21113
+ hoveredElement: title
21057
21114
  });
21058
21115
  });
21059
21116
  }
@@ -21140,8 +21197,8 @@ var tooltip_Tooltip = /** @class */ (function (_super) {
21140
21197
  tools_Tools.getProperty(_this.model.getOptions(), "tooltip", "datapoint", "enabled")) ||
21141
21198
  (e.detail.type === TooltipTypes.GRIDLINE &&
21142
21199
  tools_Tools.getProperty(_this.model.getOptions(), "tooltip", "gridline", "enabled")) ||
21143
- (e.detail.type === TooltipTypes.LEGEND) ||
21144
- (e.detail.type === TooltipTypes.AXISLABEL)) {
21200
+ e.detail.type === TooltipTypes.LEGEND ||
21201
+ e.detail.type === TooltipTypes.AXISLABEL) {
21145
21202
  var data = src_select(on_event.target).datum();
21146
21203
  // Generate default tooltip
21147
21204
  var defaultHTML = void 0;
@@ -21245,7 +21302,7 @@ var tooltip_Tooltip = /** @class */ (function (_super) {
21245
21302
  left: elementPosition.left -
21246
21303
  holderPosition.left +
21247
21304
  elementPosition.width / 2,
21248
- top: elementPosition.top - holderPosition.top - verticalOffset,
21305
+ top: elementPosition.top - holderPosition.top - verticalOffset
21249
21306
  };
21250
21307
  return { placement: TooltipPosition.BOTTOM, position: tooltipPos };
21251
21308
  };
@@ -21266,15 +21323,15 @@ var tooltip_Tooltip = /** @class */ (function (_super) {
21266
21323
  // Find out whether tooltip should be shown on the left or right side
21267
21324
  var bestPlacementOption = this.positionService.findBestPlacementAt({
21268
21325
  left: mouseRelativePos[0],
21269
- top: mouseRelativePos[1],
21326
+ top: mouseRelativePos[1]
21270
21327
  }, target, [
21271
21328
  PLACEMENTS.RIGHT,
21272
21329
  PLACEMENTS.LEFT,
21273
21330
  PLACEMENTS.TOP,
21274
- PLACEMENTS.BOTTOM,
21331
+ PLACEMENTS.BOTTOM
21275
21332
  ], function () { return ({
21276
21333
  width: holder.offsetWidth,
21277
- height: holder.offsetHeight,
21334
+ height: holder.offsetHeight
21278
21335
  }); });
21279
21336
  var horizontalOffset = this.model.getOptions().tooltip.datapoint.horizontalOffset;
21280
21337
  if (bestPlacementOption === PLACEMENTS.LEFT) {
@@ -21283,7 +21340,7 @@ var tooltip_Tooltip = /** @class */ (function (_super) {
21283
21340
  // Get coordinates to where tooltip should be positioned
21284
21341
  pos = this.positionService.findPositionAt({
21285
21342
  left: mouseRelativePos[0] + horizontalOffset,
21286
- top: mouseRelativePos[1],
21343
+ top: mouseRelativePos[1]
21287
21344
  }, target, bestPlacementOption);
21288
21345
  }
21289
21346
  this.positionService.setElement(target, pos);
@@ -21335,8 +21392,8 @@ var tooltip_bar_TooltipBar = /** @class */ (function (_super) {
21335
21392
  tools_Tools.getProperty(_this.model.getOptions(), "tooltip", "datapoint", "enabled")) ||
21336
21393
  (e.detail.type === TooltipTypes.GRIDLINE &&
21337
21394
  tools_Tools.getProperty(_this.model.getOptions(), "tooltip", "gridline", "enabled")) ||
21338
- (e.detail.type === TooltipTypes.LEGEND) ||
21339
- (e.detail.type === TooltipTypes.AXISLABEL)) {
21395
+ e.detail.type === TooltipTypes.LEGEND ||
21396
+ e.detail.type === TooltipTypes.AXISLABEL) {
21340
21397
  var data = e.detail.hoveredElement.datum();
21341
21398
  var hoveredElement = e.detail.hoveredElement.node();
21342
21399
  var defaultHTML = void 0;
@@ -21364,7 +21421,8 @@ var tooltip_bar_TooltipBar = /** @class */ (function (_super) {
21364
21421
  // default tooltip
21365
21422
  tooltipTextContainer.html(defaultHTML);
21366
21423
  }
21367
- if ((e.detail.type === TooltipTypes.LEGEND) || (e.detail.type === TooltipTypes.AXISLABEL)) {
21424
+ if (e.detail.type === TooltipTypes.LEGEND ||
21425
+ e.detail.type === TooltipTypes.AXISLABEL) {
21368
21426
  _this.positionTooltip();
21369
21427
  }
21370
21428
  else {
@@ -21415,7 +21473,7 @@ var tooltip_bar_TooltipBar = /** @class */ (function (_super) {
21415
21473
  left: barPosition.left -
21416
21474
  holderPosition.left +
21417
21475
  barPosition.width / 2,
21418
- top: barPosition.bottom - holderPosition.top + verticalOffset,
21476
+ top: barPosition.bottom - holderPosition.top + verticalOffset
21419
21477
  };
21420
21478
  return { placement: TooltipPosition.BOTTOM, position: tooltipPos };
21421
21479
  }
@@ -21425,7 +21483,7 @@ var tooltip_bar_TooltipBar = /** @class */ (function (_super) {
21425
21483
  left: barPosition.left -
21426
21484
  holderPosition.left +
21427
21485
  barPosition.width / 2,
21428
- top: barPosition.top - holderPosition.top - verticalOffset,
21486
+ top: barPosition.top - holderPosition.top - verticalOffset
21429
21487
  };
21430
21488
  return { placement: TooltipPosition.TOP, position: tooltipPos };
21431
21489
  }
@@ -22113,9 +22171,7 @@ var area_stacked_StackedArea = /** @class */ (function (_super) {
22113
22171
  if (!isTimeSeries) {
22114
22172
  return;
22115
22173
  }
22116
- var percentage = Object.keys(options.axes).some(function (axis) {
22117
- return options.axes[axis].percentage;
22118
- });
22174
+ var percentage = Object.keys(options.axes).some(function (axis) { return options.axes[axis].percentage; });
22119
22175
  var stackedData = this.model.getStackedData({ percentage: percentage });
22120
22176
  var areas = svg
22121
22177
  .selectAll("path.area")
@@ -22299,25 +22355,25 @@ var bar_simple_SimpleBar = /** @class */ (function (_super) {
22299
22355
  // Dispatch mouse event
22300
22356
  self.services.events.dispatchEvent(Events.Bar.BAR_MOUSEOVER, {
22301
22357
  element: hoveredElement,
22302
- datum: datum,
22358
+ datum: datum
22303
22359
  });
22304
22360
  self.services.events.dispatchEvent(Events.Tooltip.SHOW, {
22305
22361
  hoveredElement: hoveredElement,
22306
- type: TooltipTypes.DATAPOINT,
22362
+ type: TooltipTypes.DATAPOINT
22307
22363
  });
22308
22364
  })
22309
22365
  .on("mousemove", function (datum) {
22310
22366
  // Dispatch mouse event
22311
22367
  self.services.events.dispatchEvent(Events.Bar.BAR_MOUSEMOVE, {
22312
22368
  element: src_select(this),
22313
- datum: datum,
22369
+ datum: datum
22314
22370
  });
22315
22371
  })
22316
22372
  .on("click", function (datum) {
22317
22373
  // Dispatch mouse event
22318
22374
  self.services.events.dispatchEvent(Events.Bar.BAR_CLICK, {
22319
22375
  element: src_select(this),
22320
- datum: datum,
22376
+ datum: datum
22321
22377
  });
22322
22378
  })
22323
22379
  .on("mouseout", function (datum) {
@@ -22331,11 +22387,11 @@ var bar_simple_SimpleBar = /** @class */ (function (_super) {
22331
22387
  // Dispatch mouse event
22332
22388
  self.services.events.dispatchEvent(Events.Bar.BAR_MOUSEOUT, {
22333
22389
  element: hoveredElement,
22334
- datum: datum,
22390
+ datum: datum
22335
22391
  });
22336
22392
  // Hide tooltip
22337
22393
  self.services.events.dispatchEvent(Events.Tooltip.HIDE, {
22338
- hoveredElement: hoveredElement,
22394
+ hoveredElement: hoveredElement
22339
22395
  });
22340
22396
  });
22341
22397
  };
@@ -22505,26 +22561,26 @@ var bar_grouped_GroupedBar = /** @class */ (function (_super) {
22505
22561
  // Dispatch mouse event
22506
22562
  self.services.events.dispatchEvent(Events.Bar.BAR_MOUSEOVER, {
22507
22563
  element: hoveredElement,
22508
- datum: datum,
22564
+ datum: datum
22509
22565
  });
22510
22566
  // Show tooltip
22511
22567
  self.services.events.dispatchEvent(Events.Tooltip.SHOW, {
22512
22568
  hoveredElement: hoveredElement,
22513
- type: TooltipTypes.DATAPOINT,
22569
+ type: TooltipTypes.DATAPOINT
22514
22570
  });
22515
22571
  })
22516
22572
  .on("mousemove", function (datum) {
22517
22573
  // Dispatch mouse event
22518
22574
  self.services.events.dispatchEvent(Events.Bar.BAR_MOUSEMOVE, {
22519
22575
  element: src_select(this),
22520
- datum: datum,
22576
+ datum: datum
22521
22577
  });
22522
22578
  })
22523
22579
  .on("click", function (datum) {
22524
22580
  // Dispatch mouse event
22525
22581
  self.services.events.dispatchEvent(Events.Bar.BAR_CLICK, {
22526
22582
  element: src_select(this),
22527
- datum: datum,
22583
+ datum: datum
22528
22584
  });
22529
22585
  })
22530
22586
  .on("mouseout", function (datum) {
@@ -22539,11 +22595,11 @@ var bar_grouped_GroupedBar = /** @class */ (function (_super) {
22539
22595
  // Dispatch mouse event
22540
22596
  self.services.events.dispatchEvent(Events.Bar.BAR_MOUSEOUT, {
22541
22597
  element: hoveredElement,
22542
- datum: datum,
22598
+ datum: datum
22543
22599
  });
22544
22600
  // Hide tooltip
22545
22601
  self.services.events.dispatchEvent(Events.Tooltip.HIDE, {
22546
- hoveredElement: hoveredElement,
22602
+ hoveredElement: hoveredElement
22547
22603
  });
22548
22604
  });
22549
22605
  };
@@ -22754,7 +22810,7 @@ var bar_stacked_StackedBar = /** @class */ (function (_super) {
22754
22810
  // Dispatch mouse event
22755
22811
  self.services.events.dispatchEvent(Events.Bar.BAR_MOUSEOVER, {
22756
22812
  element: hoveredElement,
22757
- datum: datum,
22813
+ datum: datum
22758
22814
  });
22759
22815
  })
22760
22816
  .on("mousemove", function (datum) {
@@ -22781,14 +22837,14 @@ var bar_stacked_StackedBar = /** @class */ (function (_super) {
22781
22837
  self.services.events.dispatchEvent(Events.Tooltip.SHOW, {
22782
22838
  hoveredElement: hoveredElement,
22783
22839
  data: matchingDataPoint,
22784
- type: TooltipTypes.DATAPOINT,
22840
+ type: TooltipTypes.DATAPOINT
22785
22841
  });
22786
22842
  })
22787
22843
  .on("click", function (datum) {
22788
22844
  // Dispatch mouse event
22789
22845
  self.services.events.dispatchEvent(Events.Bar.BAR_CLICK, {
22790
22846
  element: src_select(this),
22791
- datum: datum,
22847
+ datum: datum
22792
22848
  });
22793
22849
  })
22794
22850
  .on("mouseout", function (datum) {
@@ -22802,11 +22858,11 @@ var bar_stacked_StackedBar = /** @class */ (function (_super) {
22802
22858
  // Dispatch mouse event
22803
22859
  self.services.events.dispatchEvent(Events.Bar.BAR_MOUSEOUT, {
22804
22860
  element: hoveredElement,
22805
- datum: datum,
22861
+ datum: datum
22806
22862
  });
22807
22863
  // Hide tooltip
22808
22864
  self.services.events.dispatchEvent(Events.Tooltip.HIDE, {
22809
- hoveredElement: hoveredElement,
22865
+ hoveredElement: hoveredElement
22810
22866
  });
22811
22867
  });
22812
22868
  };
@@ -22905,9 +22961,7 @@ var scatter_Scatter = /** @class */ (function (_super) {
22905
22961
  var stacked = this.configs.stacked;
22906
22962
  var scatterData;
22907
22963
  if (stacked) {
22908
- var percentage = Object.keys(options.axes).some(function (axis) {
22909
- return options.axes[axis].percentage;
22910
- });
22964
+ var percentage = Object.keys(options.axes).some(function (axis) { return options.axes[axis].percentage; });
22911
22965
  scatterData = this.model.getStackedData({ percentage: percentage });
22912
22966
  }
22913
22967
  else {
@@ -23037,7 +23091,7 @@ var scatter_Scatter = /** @class */ (function (_super) {
23037
23091
  self.services.events.dispatchEvent(Events.Tooltip.SHOW, {
23038
23092
  hoveredElement: hoveredElement,
23039
23093
  multidata: overlappingData.length > 1 ? overlappingData : null,
23040
- type: TooltipTypes.DATAPOINT,
23094
+ type: TooltipTypes.DATAPOINT
23041
23095
  });
23042
23096
  var eventNameToDispatch = on_event.type === "mouseover"
23043
23097
  ? Events.Scatter.SCATTER_MOUSEOVER
@@ -23045,14 +23099,14 @@ var scatter_Scatter = /** @class */ (function (_super) {
23045
23099
  // Dispatch mouse event
23046
23100
  self.services.events.dispatchEvent(eventNameToDispatch, {
23047
23101
  element: hoveredElement,
23048
- datum: datum,
23102
+ datum: datum
23049
23103
  });
23050
23104
  })
23051
23105
  .on("click", function (datum) {
23052
23106
  // Dispatch mouse event
23053
23107
  self.services.events.dispatchEvent(Events.Scatter.SCATTER_CLICK, {
23054
23108
  element: src_select(this),
23055
- datum: datum,
23109
+ datum: datum
23056
23110
  });
23057
23111
  })
23058
23112
  .on("mouseout", function (datum) {
@@ -23064,11 +23118,11 @@ var scatter_Scatter = /** @class */ (function (_super) {
23064
23118
  // Dispatch mouse event
23065
23119
  self.services.events.dispatchEvent(Events.Scatter.SCATTER_MOUSEOUT, {
23066
23120
  element: hoveredElement,
23067
- datum: datum,
23121
+ datum: datum
23068
23122
  });
23069
23123
  // Hide tooltip
23070
23124
  self.services.events.dispatchEvent(Events.Tooltip.HIDE, {
23071
- hoveredElement: hoveredElement,
23125
+ hoveredElement: hoveredElement
23072
23126
  });
23073
23127
  });
23074
23128
  };
@@ -23246,9 +23300,7 @@ var line_Line = /** @class */ (function (_super) {
23246
23300
  });
23247
23301
  var data = [];
23248
23302
  if (this.configs.stacked) {
23249
- var percentage = Object.keys(options.axes).some(function (axis) {
23250
- return options.axes[axis].percentage;
23251
- });
23303
+ var percentage = Object.keys(options.axes).some(function (axis) { return options.axes[axis].percentage; });
23252
23304
  var groupMapsTo_1 = options.data.groupMapsTo;
23253
23305
  var stackedData = this.model.getStackedData({ percentage: percentage });
23254
23306
  var domainIdentifier_1 = this.services.cartesianScales.getDomainIdentifier();
@@ -23355,9 +23407,7 @@ var scatter_stacked_StackedScatter = /** @class */ (function (_super) {
23355
23407
  var groupMapsTo = options.data.groupMapsTo;
23356
23408
  var domainIdentifier = this.services.cartesianScales.getDomainIdentifier();
23357
23409
  var rangeIdentifier = this.services.cartesianScales.getRangeIdentifier();
23358
- var percentage = Object.keys(options.axes).some(function (axis) {
23359
- return options.axes[axis].percentage;
23360
- });
23410
+ var percentage = Object.keys(options.axes).some(function (axis) { return options.axes[axis].percentage; });
23361
23411
  var stackedData = this.model.getStackedData({ percentage: percentage });
23362
23412
  // Update data on dot groups
23363
23413
  var circleGroups = svg
@@ -23982,12 +24032,12 @@ var pie_Pie = /** @class */ (function (_super) {
23982
24032
  if (direction === CalloutDirections.RIGHT) {
23983
24033
  d.startPos = {
23984
24034
  x: xPosition,
23985
- y: yPosition + d.textOffsetY,
24035
+ y: yPosition + d.textOffsetY
23986
24036
  };
23987
24037
  // end position for the callout line
23988
24038
  d.endPos = {
23989
24039
  x: xPosition + options.pie.callout.offsetX,
23990
- y: yPosition - options.pie.callout.offsetY + d.textOffsetY,
24040
+ y: yPosition - options.pie.callout.offsetY + d.textOffsetY
23991
24041
  };
23992
24042
  // the intersection point of the vertical and horizontal line
23993
24043
  d.intersectPointX =
@@ -23997,12 +24047,12 @@ var pie_Pie = /** @class */ (function (_super) {
23997
24047
  // start position for the callout line
23998
24048
  d.startPos = {
23999
24049
  x: xPosition,
24000
- y: yPosition + d.textOffsetY,
24050
+ y: yPosition + d.textOffsetY
24001
24051
  };
24002
24052
  // end position for the callout line should be bottom aligned to the title
24003
24053
  d.endPos = {
24004
24054
  x: xPosition - options.pie.callout.offsetX,
24005
- y: yPosition - options.pie.callout.offsetY + d.textOffsetY,
24055
+ y: yPosition - options.pie.callout.offsetY + d.textOffsetY
24006
24056
  };
24007
24057
  // the intersection point of the vertical and horizontal line
24008
24058
  d.intersectPointX =
@@ -24048,7 +24098,7 @@ var pie_Pie = /** @class */ (function (_super) {
24048
24098
  // Dispatch mouse event
24049
24099
  self.services.events.dispatchEvent(Events.Pie.SLICE_MOUSEOVER, {
24050
24100
  element: src_select(this),
24051
- datum: datum,
24101
+ datum: datum
24052
24102
  });
24053
24103
  })
24054
24104
  .on("mousemove", function (datum) {
@@ -24060,19 +24110,19 @@ var pie_Pie = /** @class */ (function (_super) {
24060
24110
  // Dispatch mouse event
24061
24111
  self.services.events.dispatchEvent(Events.Pie.SLICE_MOUSEMOVE, {
24062
24112
  element: hoveredElement,
24063
- datum: datum,
24113
+ datum: datum
24064
24114
  });
24065
24115
  // Show tooltip
24066
24116
  self.services.events.dispatchEvent(Events.Tooltip.SHOW, {
24067
24117
  hoveredElement: hoveredElement,
24068
- type: TooltipTypes.DATAPOINT,
24118
+ type: TooltipTypes.DATAPOINT
24069
24119
  });
24070
24120
  })
24071
24121
  .on("click", function (datum) {
24072
24122
  // Dispatch mouse event
24073
24123
  self.services.events.dispatchEvent(Events.Pie.SLICE_CLICK, {
24074
24124
  element: src_select(this),
24075
- datum: datum,
24125
+ datum: datum
24076
24126
  });
24077
24127
  })
24078
24128
  .on("mouseout", function (datum) {
@@ -24084,11 +24134,11 @@ var pie_Pie = /** @class */ (function (_super) {
24084
24134
  // Dispatch mouse event
24085
24135
  self.services.events.dispatchEvent(Events.Pie.SLICE_MOUSEOUT, {
24086
24136
  element: hoveredElement,
24087
- datum: datum,
24137
+ datum: datum
24088
24138
  });
24089
24139
  // Hide tooltip
24090
24140
  self.services.events.dispatchEvent(Events.Tooltip.HIDE, {
24091
- hoveredElement: hoveredElement,
24141
+ hoveredElement: hoveredElement
24092
24142
  });
24093
24143
  });
24094
24144
  };
@@ -24096,7 +24146,7 @@ var pie_Pie = /** @class */ (function (_super) {
24096
24146
  Pie.prototype.computeRadius = function () {
24097
24147
  var options = this.model.getOptions();
24098
24148
  var _a = dom_utils_DOMUtils.getSVGElementSize(this.parent, {
24099
- useAttrs: true,
24149
+ useAttrs: true
24100
24150
  }), width = _a.width, height = _a.height;
24101
24151
  var radius = Math.min(width, height) / 2;
24102
24152
  return radius + options.pie.radiusOffset;
@@ -24302,15 +24352,16 @@ var gauge_Gauge = /** @class */ (function (_super) {
24302
24352
  ? tools_Tools.getProperty(options, "gauge", "deltaFontSize")
24303
24353
  : function () { return 0; };
24304
24354
  // use numberFormatter here only if there is a delta supplied
24305
- var numberFormatter = delta ? tools_Tools.getProperty(options, "gauge", "numberFormatter") : function () { return null; };
24355
+ var numberFormatter = delta
24356
+ ? tools_Tools.getProperty(options, "gauge", "numberFormatter")
24357
+ : function () { return null; };
24306
24358
  var arrowSize = tools_Tools.getProperty(options, "gauge", "deltaArrow", "size");
24307
24359
  var numberSpacing = tools_Tools.getProperty(options, "gauge", "numberSpacing");
24308
24360
  var numbersGroup = dom_utils_DOMUtils.appendOrSelect(svg, "g.gauge-numbers");
24309
24361
  // Add the smaller number of the delta
24310
24362
  var deltaGroup = dom_utils_DOMUtils.appendOrSelect(numbersGroup, "g.gauge-delta").attr("transform", "translate(0, " + (deltaFontSize(radius) + numberSpacing) + ")");
24311
24363
  var deltaNumber = dom_utils_DOMUtils.appendOrSelect(deltaGroup, "text.gauge-delta-number");
24312
- deltaNumber
24313
- .data(delta === null ? [] : [delta]);
24364
+ deltaNumber.data(delta === null ? [] : [delta]);
24314
24365
  deltaNumber
24315
24366
  .enter()
24316
24367
  .append("text")
@@ -24542,7 +24593,7 @@ var skeleton_Skeleton = /** @class */ (function (_super) {
24542
24593
  var svg = this.parent;
24543
24594
  var parent = svg.node().parentNode;
24544
24595
  var _a = dom_utils_DOMUtils.getSVGElementSize(parent, {
24545
- useAttrs: true,
24596
+ useAttrs: true
24546
24597
  }), width = _a.width, height = _a.height;
24547
24598
  svg.attr("width", width).attr("height", height);
24548
24599
  var isDataEmpty = this.model.isDataEmpty();
@@ -24621,7 +24672,7 @@ var skeleton_Skeleton = /** @class */ (function (_super) {
24621
24672
  var svg = this.parent;
24622
24673
  var parent = svg.node().parentNode;
24623
24674
  var _a = dom_utils_DOMUtils.getSVGElementSize(parent, {
24624
- useAttrs: true,
24675
+ useAttrs: true
24625
24676
  }), width = _a.width, height = _a.height;
24626
24677
  this.backdrop = dom_utils_DOMUtils.appendOrSelect(svg, "svg.chart-skeleton.DAII")
24627
24678
  .attr("width", width)
@@ -24728,7 +24779,7 @@ var skeleton_Skeleton = /** @class */ (function (_super) {
24728
24779
  var stopShimmerClass = "stop-shimmer";
24729
24780
  var container = this.parent.select(".chart-skeleton");
24730
24781
  var width = dom_utils_DOMUtils.getSVGElementSize(this.parent, {
24731
- useAttrs: true,
24782
+ useAttrs: true
24732
24783
  }).width;
24733
24784
  var startPoint = 0;
24734
24785
  var endPoint = width;
@@ -25329,10 +25380,10 @@ var layout_LayoutComponent = /** @class */ (function (_super) {
25329
25380
  // Get parent SVG to render inside of
25330
25381
  var svg = this.parent;
25331
25382
  var _a = dom_utils_DOMUtils.getSVGElementSize(svg, {
25332
- useAttrs: true,
25383
+ useAttrs: true
25333
25384
  }), width = _a.width, height = _a.height;
25334
25385
  var root = hierarchy({
25335
- children: this.children,
25386
+ children: this.children
25336
25387
  }).sum(function (d) { return d.size; });
25337
25388
  // Grab the correct treemap tile function based on direction
25338
25389
  var tileType = this.configs.direction === LayoutDirection.ROW ||
@@ -25378,6 +25429,12 @@ var layout_LayoutComponent = /** @class */ (function (_super) {
25378
25429
  // Calculate preffered children sizes after internal rendering
25379
25430
  var growth = tools_Tools.getProperty(d, "data", "growth", "x");
25380
25431
  var matchingSVGDimensions = dom_utils_DOMUtils.getSVGElementSize(src_select(this), { useBBox: true });
25432
+ if (d.data.id === "legend") {
25433
+ var svgSize = dom_utils_DOMUtils.getSVGElementSize(src_select(this), { useAttrs: true });
25434
+ if (svgSize.height < 40) {
25435
+ matchingSVGDimensions.height = svgSize.height;
25436
+ }
25437
+ }
25381
25438
  if (growth === LayoutGrowth.PREFERRED) {
25382
25439
  var matchingSVGWidth = horizontal
25383
25440
  ? matchingSVGDimensions.width
@@ -25401,7 +25458,7 @@ var layout_LayoutComponent = /** @class */ (function (_super) {
25401
25458
  // Pass children data to the hierarchy layout
25402
25459
  // And calculate sum of sizes
25403
25460
  root = hierarchy({
25404
- children: this.children,
25461
+ children: this.children
25405
25462
  }).sum(function (d) { return d.size; });
25406
25463
  // Compute the position of all elements within the layout
25407
25464
  src_treemap().tile(tileType).size([width, height]).padding(0)(root);
@@ -25688,7 +25745,7 @@ var axis_Axis = /** @class */ (function (_super) {
25688
25745
  var timeScaleOptions = tools_Tools.getProperty(options, "timeScale");
25689
25746
  var svg = this.getContainerSVG();
25690
25747
  var _a = dom_utils_DOMUtils.getSVGElementSize(this.parent, {
25691
- useAttrs: true,
25748
+ useAttrs: true
25692
25749
  }), width = _a.width, height = _a.height;
25693
25750
  var startPosition, endPosition;
25694
25751
  if (axisPosition === AxisPositions.BOTTOM ||
@@ -25746,7 +25803,7 @@ var axis_Axis = /** @class */ (function (_super) {
25746
25803
  var fakeTick = dom_utils_DOMUtils.appendOrSelect(invisibleAxisRef, "g.tick");
25747
25804
  var fakeTickText = dom_utils_DOMUtils.appendOrSelect(fakeTick, "text").text("0");
25748
25805
  var tickHeight = dom_utils_DOMUtils.getSVGElementSize(fakeTickText.node(), {
25749
- useBBox: true,
25806
+ useBBox: true
25750
25807
  }).height;
25751
25808
  fakeTick.remove();
25752
25809
  var isTimeScaleType = this.scaleType === ScaleTypes.TIME ||
@@ -25777,13 +25834,15 @@ var axis_Axis = /** @class */ (function (_super) {
25777
25834
  axis.tickValues([]);
25778
25835
  }
25779
25836
  else {
25780
- var tickValues = scale
25781
- .nice(numberOfTicks)
25782
- .ticks(numberOfTicks);
25837
+ var addSpaceOnEdges = tools_Tools.getProperty(options, "timeScale", "addSpaceOnEdges");
25838
+ var tickValues = void 0;
25839
+ if (addSpaceOnEdges) {
25840
+ tickValues = scale.nice(numberOfTicks);
25841
+ }
25842
+ tickValues = scale.ticks(numberOfTicks);
25783
25843
  // Remove labels on the edges
25784
25844
  // If there are more than 2 labels to show
25785
- if (tools_Tools.getProperty(options, "timeScale", "addSpaceOnEdges") &&
25786
- tickValues.length > 2) {
25845
+ if (addSpaceOnEdges && tickValues.length > 2) {
25787
25846
  tickValues.splice(tickValues.length - 1, 1);
25788
25847
  tickValues.splice(0, 1);
25789
25848
  }
@@ -25863,7 +25922,7 @@ var axis_Axis = /** @class */ (function (_super) {
25863
25922
  break;
25864
25923
  case AxisPositions.TOP:
25865
25924
  var titleHeight = dom_utils_DOMUtils.getSVGElementSize(axisTitleRef, {
25866
- useBBox: true,
25925
+ useBBox: true
25867
25926
  }).height;
25868
25927
  axisTitleRef
25869
25928
  .attr("transform", "translate(" + (this.margins.left / 2 + scale.range()[1] / 2) + ", " + titleHeight / 2 + ")")
@@ -25953,14 +26012,15 @@ var axis_Axis = /** @class */ (function (_super) {
25953
26012
  }
25954
26013
  // truncate the label if it's too long
25955
26014
  // only applies to discrete type
25956
- if (truncationType !== TruncationTypes.NONE && axisScaleType === ScaleTypes.LABELS) {
26015
+ if (truncationType !== TruncationTypes.NONE &&
26016
+ axisScaleType === ScaleTypes.LABELS) {
25957
26017
  var dataGroups = this.model.getDataValuesGroupedByKeys();
25958
26018
  if (dataGroups.length > 0) {
25959
26019
  var activeDataGroups = dataGroups.map(function (d) { return d.sharedStackKey; });
25960
- var tick_html = svg.select("g.axis." + axisPosition + " g.ticks g.tick").html();
25961
- container
25962
- .selectAll("g.ticks g.tick")
25963
- .html(tick_html);
26020
+ var tick_html = svg
26021
+ .select("g.axis." + axisPosition + " g.ticks g.tick")
26022
+ .html();
26023
+ container.selectAll("g.ticks g.tick").html(tick_html);
25964
26024
  container
25965
26025
  .selectAll("g.tick text")
25966
26026
  .data(activeDataGroups)
@@ -25986,9 +26046,7 @@ var axis_Axis = /** @class */ (function (_super) {
25986
26046
  container
25987
26047
  .selectAll("g.ticks")
25988
26048
  .html(this.getInvisibleAxisRef().html());
25989
- container
25990
- .selectAll("g.tick text")
25991
- .data(activeDataGroups);
26049
+ container.selectAll("g.tick text").data(activeDataGroups);
25992
26050
  }
25993
26051
  }
25994
26052
  // Add event listeners to elements drawn
@@ -26011,19 +26069,20 @@ var axis_Axis = /** @class */ (function (_super) {
26011
26069
  // Dispatch mouse event
26012
26070
  self.services.events.dispatchEvent(Events.Axis.LABEL_MOUSEOVER, {
26013
26071
  element: src_select(this),
26014
- datum: datum,
26072
+ datum: datum
26015
26073
  });
26016
26074
  })
26017
26075
  .on("mousemove", function (datum) {
26018
26076
  // Dispatch mouse event
26019
26077
  self.services.events.dispatchEvent(Events.Axis.LABEL_MOUSEMOVE, {
26020
26078
  element: src_select(this),
26021
- datum: datum,
26079
+ datum: datum
26022
26080
  });
26023
- if (axisScaleType === ScaleTypes.LABELS && datum.length > truncationThreshold) {
26081
+ if (axisScaleType === ScaleTypes.LABELS &&
26082
+ datum.length > truncationThreshold) {
26024
26083
  self.services.events.dispatchEvent(Events.Tooltip.SHOW, {
26025
26084
  hoveredElement: src_select(this),
26026
- type: TooltipTypes.AXISLABEL,
26085
+ type: TooltipTypes.AXISLABEL
26027
26086
  });
26028
26087
  }
26029
26088
  })
@@ -26031,14 +26090,14 @@ var axis_Axis = /** @class */ (function (_super) {
26031
26090
  // Dispatch mouse event
26032
26091
  self.services.events.dispatchEvent(Events.Axis.LABEL_CLICK, {
26033
26092
  element: src_select(this),
26034
- datum: datum,
26093
+ datum: datum
26035
26094
  });
26036
26095
  })
26037
26096
  .on("mouseout", function (datum) {
26038
26097
  // Dispatch mouse event
26039
26098
  self.services.events.dispatchEvent(Events.Axis.LABEL_MOUSEOUT, {
26040
26099
  element: src_select(this),
26041
- datum: datum,
26100
+ datum: datum
26042
26101
  });
26043
26102
  if (axisScaleType === ScaleTypes.LABELS) {
26044
26103
  self.services.events.dispatchEvent(Events.Tooltip.HIDE);
@@ -26115,7 +26174,7 @@ var two_dimensional_axes_TwoDimensionalAxes = /** @class */ (function (_super) {
26115
26174
  top: 0,
26116
26175
  right: 0,
26117
26176
  bottom: 0,
26118
- left: 0,
26177
+ left: 0
26119
26178
  };
26120
26179
  return _this;
26121
26180
  }
@@ -26140,7 +26199,7 @@ var two_dimensional_axes_TwoDimensionalAxes = /** @class */ (function (_super) {
26140
26199
  var axisComponent = new axis_Axis(_this.model, _this.services, {
26141
26200
  position: axisPosition,
26142
26201
  axes: _this.configs.axes,
26143
- margins: _this.margins,
26202
+ margins: _this.margins
26144
26203
  });
26145
26204
  // Set model, services & parent for the new axis component
26146
26205
  axisComponent.setModel(_this.model);
@@ -26170,7 +26229,7 @@ var two_dimensional_axes_TwoDimensionalAxes = /** @class */ (function (_super) {
26170
26229
  }
26171
26230
  else {
26172
26231
  offset = dom_utils_DOMUtils.getSVGElementSize(child.getTitleRef(), {
26173
- useBBox: true,
26232
+ useBBox: true
26174
26233
  }).height;
26175
26234
  }
26176
26235
  switch (axisPosition) {
@@ -26370,7 +26429,7 @@ var grid_Grid = /** @class */ (function (_super) {
26370
26429
  // threshold for when to display a gridline tooltip
26371
26430
  var bounds = {
26372
26431
  min: Number(translations.tx) - threshold,
26373
- max: Number(translations.tx) + threshold,
26432
+ max: Number(translations.tx) + threshold
26374
26433
  };
26375
26434
  return bounds.min <= position[0] && position[0] <= bounds.max;
26376
26435
  });
@@ -26456,7 +26515,7 @@ var ruler_Ruler = /** @class */ (function (_super) {
26456
26515
  var _b = rangeScale.range(), yScaleEnd = _b[0], yScaleStart = _b[1];
26457
26516
  var scaledData = displayData.map(function (d) { return ({
26458
26517
  domainValue: _this.services.cartesianScales.getDomainValue(d),
26459
- originalData: d,
26518
+ originalData: d
26460
26519
  }); });
26461
26520
  /**
26462
26521
  * Find matches, reduce is used instead of filter
@@ -26519,7 +26578,7 @@ var ruler_Ruler = /** @class */ (function (_super) {
26519
26578
  this.services.events.dispatchEvent("show-tooltip", {
26520
26579
  hoveredElement: rulerLine,
26521
26580
  multidata: tooltipData,
26522
- type: TooltipTypes.GRIDLINE,
26581
+ type: TooltipTypes.GRIDLINE
26523
26582
  });
26524
26583
  ruler.attr("opacity", 1);
26525
26584
  // line snaps to matching point
@@ -26637,7 +26696,7 @@ var zero_line_ZeroLine = /** @class */ (function (_super) {
26637
26696
  x0: x0,
26638
26697
  x1: x1,
26639
26698
  y0: yPosition,
26640
- y1: yPosition,
26699
+ y1: yPosition
26641
26700
  }, this.services.cartesianScales.getOrientation());
26642
26701
  var line = dom_utils_DOMUtils.appendOrSelect(svg, "line.domain");
26643
26702
  line.transition(this.services.transitions.getTransition("zero-line-update", animate))
@@ -26898,7 +26957,7 @@ var axis_chart_AxisChart = /** @class */ (function (_super) {
26898
26957
  var _this = _super.call(this, holder, chartConfigs) || this;
26899
26958
  _this.services = Object.assign(_this.services, {
26900
26959
  cartesianScales: scales_cartesian_CartesianScales,
26901
- curves: curves_Curves,
26960
+ curves: curves_Curves
26902
26961
  });
26903
26962
  return _this;
26904
26963
  }
@@ -26908,24 +26967,24 @@ var axis_chart_AxisChart = /** @class */ (function (_super) {
26908
26967
  components: [new title_Title(this.model, this.services)],
26909
26968
  growth: {
26910
26969
  x: LayoutGrowth.PREFERRED,
26911
- y: LayoutGrowth.FIXED,
26912
- },
26970
+ y: LayoutGrowth.FIXED
26971
+ }
26913
26972
  };
26914
26973
  var legendComponent = {
26915
26974
  id: "legend",
26916
26975
  components: [new legend_Legend(this.model, this.services)],
26917
26976
  growth: {
26918
26977
  x: LayoutGrowth.PREFERRED,
26919
- y: LayoutGrowth.FIXED,
26920
- },
26978
+ y: LayoutGrowth.FIXED
26979
+ }
26921
26980
  };
26922
26981
  var graphFrameComponent = {
26923
26982
  id: "graph-frame",
26924
26983
  components: graphFrameComponents,
26925
26984
  growth: {
26926
26985
  x: LayoutGrowth.STRETCH,
26927
- y: LayoutGrowth.FIXED,
26928
- },
26986
+ y: LayoutGrowth.FIXED
26987
+ }
26929
26988
  };
26930
26989
  var isLegendEnabled = this.model.getOptions().legend.enabled !== false;
26931
26990
  // Decide the position of the legend in reference to the chart
@@ -26955,23 +27014,23 @@ var axis_chart_AxisChart = /** @class */ (function (_super) {
26955
27014
  components: [new spacer_Spacer(this.model, this.services)],
26956
27015
  growth: {
26957
27016
  x: LayoutGrowth.PREFERRED,
26958
- y: LayoutGrowth.FIXED,
26959
- },
27017
+ y: LayoutGrowth.FIXED
27018
+ }
26960
27019
  };
26961
27020
  var fullFrameComponent = {
26962
27021
  id: "full-frame",
26963
27022
  components: [
26964
27023
  new layout_LayoutComponent(this.model, this.services, axis_chart_spreadArrays((isLegendEnabled ? [legendComponent] : []), [
26965
27024
  legendSpacerComponent,
26966
- graphFrameComponent,
27025
+ graphFrameComponent
26967
27026
  ]), {
26968
- direction: fullFrameComponentDirection,
26969
- }),
27027
+ direction: fullFrameComponentDirection
27028
+ })
26970
27029
  ],
26971
27030
  growth: {
26972
27031
  x: LayoutGrowth.STRETCH,
26973
- y: LayoutGrowth.FIXED,
26974
- },
27032
+ y: LayoutGrowth.FIXED
27033
+ }
26975
27034
  };
26976
27035
  // Add chart title if it exists
26977
27036
  var topLevelLayoutComponents = [];
@@ -26982,16 +27041,16 @@ var axis_chart_AxisChart = /** @class */ (function (_super) {
26982
27041
  components: [new spacer_Spacer(this.model, this.services)],
26983
27042
  growth: {
26984
27043
  x: LayoutGrowth.PREFERRED,
26985
- y: LayoutGrowth.FIXED,
26986
- },
27044
+ y: LayoutGrowth.FIXED
27045
+ }
26987
27046
  };
26988
27047
  topLevelLayoutComponents.push(titleSpacerComponent);
26989
27048
  }
26990
27049
  topLevelLayoutComponents.push(fullFrameComponent);
26991
27050
  return [
26992
27051
  new layout_LayoutComponent(this.model, this.services, topLevelLayoutComponents, {
26993
- direction: LayoutDirection.COLUMN,
26994
- }),
27052
+ direction: LayoutDirection.COLUMN
27053
+ })
26995
27054
  ];
26996
27055
  };
26997
27056
  return AxisChart;
@@ -27039,8 +27098,8 @@ var area_AreaChart = /** @class */ (function (_super) {
27039
27098
  new area_Area(this.model, this.services),
27040
27099
  new scatter_Scatter(this.model, this.services, {
27041
27100
  fadeInOnChartHolderMouseover: true,
27042
- handleThresholds: true,
27043
- }),
27101
+ handleThresholds: true
27102
+ })
27044
27103
  ];
27045
27104
  var components = this.getAxisChartComponents(graphFrameComponents);
27046
27105
  components.push(new tooltip_scatter_TooltipScatter(this.model, this.services));
@@ -27092,8 +27151,8 @@ var area_stacked_StackedAreaChart = /** @class */ (function (_super) {
27092
27151
  new scatter_stacked_StackedScatter(this.model, this.services, {
27093
27152
  fadeInOnChartHolderMouseover: true,
27094
27153
  handleThresholds: true,
27095
- stacked: true,
27096
- }),
27154
+ stacked: true
27155
+ })
27097
27156
  ];
27098
27157
  var components = this.getAxisChartComponents(graphFrameComponents);
27099
27158
  // TODO add tooltip
@@ -27144,8 +27203,8 @@ var bar_simple_SimpleBarChart = /** @class */ (function (_super) {
27144
27203
  new bar_simple_SimpleBar(this.model, this.services),
27145
27204
  new zero_line_ZeroLine(this.model, this.services),
27146
27205
  new skeleton_Skeleton(this.model, this.services, {
27147
- skeleton: Skeletons.VERT_OR_HORIZ,
27148
- }),
27206
+ skeleton: Skeletons.VERT_OR_HORIZ
27207
+ })
27149
27208
  ];
27150
27209
  var components = this.getAxisChartComponents(graphFrameComponents);
27151
27210
  components.push(new tooltip_bar_TooltipBar(this.model, this.services));
@@ -27195,8 +27254,8 @@ var bar_grouped_GroupedBarChart = /** @class */ (function (_super) {
27195
27254
  new bar_grouped_GroupedBar(this.model, this.services),
27196
27255
  new zero_line_ZeroLine(this.model, this.services),
27197
27256
  new skeleton_Skeleton(this.model, this.services, {
27198
- skeleton: Skeletons.VERT_OR_HORIZ,
27199
- }),
27257
+ skeleton: Skeletons.VERT_OR_HORIZ
27258
+ })
27200
27259
  ];
27201
27260
  var components = this.getAxisChartComponents(graphFrameComponents);
27202
27261
  components.push(new tooltip_bar_TooltipBar(this.model, this.services));
@@ -27245,8 +27304,8 @@ var bar_stacked_StackedBarChart = /** @class */ (function (_super) {
27245
27304
  new grid_Grid(this.model, this.services),
27246
27305
  new bar_stacked_StackedBar(this.model, this.services),
27247
27306
  new skeleton_Skeleton(this.model, this.services, {
27248
- skeleton: Skeletons.VERT_OR_HORIZ,
27249
- }),
27307
+ skeleton: Skeletons.VERT_OR_HORIZ
27308
+ })
27250
27309
  ];
27251
27310
  var components = this.getAxisChartComponents(graphFrameComponents);
27252
27311
  components.push(new tooltip_bar_TooltipBar(this.model, this.services));
@@ -27296,8 +27355,8 @@ var bubble_BubbleChart = /** @class */ (function (_super) {
27296
27355
  new ruler_Ruler(this.model, this.services),
27297
27356
  new bubble_Bubble(this.model, this.services),
27298
27357
  new skeleton_Skeleton(this.model, this.services, {
27299
- skeleton: Skeletons.GRID,
27300
- }),
27358
+ skeleton: Skeletons.GRID
27359
+ })
27301
27360
  ];
27302
27361
  var components = this.getAxisChartComponents(graphFrameComponents);
27303
27362
  components.push(new tooltip_scatter_TooltipScatter(this.model, this.services));
@@ -27348,8 +27407,8 @@ var line_LineChart = /** @class */ (function (_super) {
27348
27407
  new line_Line(this.model, this.services),
27349
27408
  new scatter_Scatter(this.model, this.services, { handleThresholds: true }),
27350
27409
  new skeleton_Skeleton(this.model, this.services, {
27351
- skeleton: Skeletons.GRID,
27352
- }),
27410
+ skeleton: Skeletons.GRID
27411
+ })
27353
27412
  ];
27354
27413
  var components = this.getAxisChartComponents(graphFrameComponents);
27355
27414
  components.push(new tooltip_scatter_TooltipScatter(this.model, this.services));
@@ -27399,8 +27458,8 @@ var scatter_ScatterChart = /** @class */ (function (_super) {
27399
27458
  new ruler_Ruler(this.model, this.services),
27400
27459
  new scatter_Scatter(this.model, this.services),
27401
27460
  new skeleton_Skeleton(this.model, this.services, {
27402
- skeleton: Skeletons.GRID,
27403
- }),
27461
+ skeleton: Skeletons.GRID
27462
+ })
27404
27463
  ];
27405
27464
  var components = this.getAxisChartComponents(graphFrameComponents);
27406
27465
  components.push(new tooltip_scatter_TooltipScatter(this.model, this.services));
@@ -27501,8 +27560,8 @@ var pie_PieChart = /** @class */ (function (_super) {
27501
27560
  var graphFrameComponents = [
27502
27561
  new pie_Pie(this.model, this.services),
27503
27562
  new skeleton_Skeleton(this.model, this.services, {
27504
- skeleton: Skeletons.PIE,
27505
- }),
27563
+ skeleton: Skeletons.PIE
27564
+ })
27506
27565
  ];
27507
27566
  // get the base chart components and export with tooltip
27508
27567
  var components = this.getChartComponents(graphFrameComponents);
@@ -27550,8 +27609,8 @@ var donut_DonutChart = /** @class */ (function (_super) {
27550
27609
  var graphFrameComponents = [
27551
27610
  new donut_Donut(this.model, this.services),
27552
27611
  new skeleton_Skeleton(this.model, this.services, {
27553
- skeleton: Skeletons.DONUT,
27554
- }),
27612
+ skeleton: Skeletons.DONUT
27613
+ })
27555
27614
  ];
27556
27615
  var components = this.getChartComponents(graphFrameComponents);
27557
27616
  components.push(new tooltip_pie_TooltipPie(this.model, this.services));
@@ -27568,50 +27627,50 @@ function radialLabelPlacement(angleRadians) {
27568
27627
  if (isInRange(angle, [0, 10]) || isInRange(angle, [350, 0])) {
27569
27628
  return {
27570
27629
  textAnchor: TextAnchor.START,
27571
- dominantBaseline: DominantBaseline.MIDDLE,
27630
+ dominantBaseline: DominantBaseline.MIDDLE
27572
27631
  };
27573
27632
  }
27574
27633
  else if (isInRange(angle, [10, 80])) {
27575
27634
  return {
27576
27635
  textAnchor: TextAnchor.START,
27577
- dominantBaseline: DominantBaseline.HANGING,
27636
+ dominantBaseline: DominantBaseline.HANGING
27578
27637
  };
27579
27638
  }
27580
27639
  else if (isInRange(angle, [80, 100])) {
27581
27640
  return {
27582
27641
  textAnchor: TextAnchor.MIDDLE,
27583
- dominantBaseline: DominantBaseline.HANGING,
27642
+ dominantBaseline: DominantBaseline.HANGING
27584
27643
  };
27585
27644
  }
27586
27645
  else if (isInRange(angle, [100, 170])) {
27587
27646
  return {
27588
27647
  textAnchor: TextAnchor.END,
27589
- dominantBaseline: DominantBaseline.HANGING,
27648
+ dominantBaseline: DominantBaseline.HANGING
27590
27649
  };
27591
27650
  }
27592
27651
  else if (isInRange(angle, [170, 190])) {
27593
27652
  return {
27594
27653
  textAnchor: TextAnchor.END,
27595
- dominantBaseline: DominantBaseline.MIDDLE,
27654
+ dominantBaseline: DominantBaseline.MIDDLE
27596
27655
  };
27597
27656
  }
27598
27657
  else if (isInRange(angle, [190, 260])) {
27599
27658
  return {
27600
27659
  textAnchor: TextAnchor.END,
27601
- dominantBaseline: DominantBaseline.BASELINE,
27660
+ dominantBaseline: DominantBaseline.BASELINE
27602
27661
  };
27603
27662
  }
27604
27663
  else if (isInRange(angle, [260, 280])) {
27605
27664
  return {
27606
27665
  textAnchor: TextAnchor.MIDDLE,
27607
- dominantBaseline: DominantBaseline.BASELINE,
27666
+ dominantBaseline: DominantBaseline.BASELINE
27608
27667
  };
27609
27668
  }
27610
27669
  else {
27611
27670
  // 280 - 350
27612
27671
  return {
27613
27672
  textAnchor: TextAnchor.START,
27614
- dominantBaseline: DominantBaseline.BASELINE,
27673
+ dominantBaseline: DominantBaseline.BASELINE
27615
27674
  };
27616
27675
  }
27617
27676
  }
@@ -27812,7 +27871,7 @@ var radar_Radar = /** @class */ (function (_super) {
27812
27871
  if (animate === void 0) { animate = true; }
27813
27872
  this.svg = this.getContainerSVG();
27814
27873
  var _a = dom_utils_DOMUtils.getSVGElementSize(this.parent, {
27815
- useAttrs: true,
27874
+ useAttrs: true
27816
27875
  }), width = _a.width, height = _a.height;
27817
27876
  var data = this.model.getData();
27818
27877
  var displayData = this.model.getDisplayData();
@@ -27841,7 +27900,7 @@ var radar_Radar = /** @class */ (function (_super) {
27841
27900
  var yScale = linear_linear()
27842
27901
  .domain([
27843
27902
  0,
27844
- src_max(this.displayDataNormalized.map(function (d) { return d[value]; })),
27903
+ src_max(this.displayDataNormalized.map(function (d) { return d[value]; }))
27845
27904
  ])
27846
27905
  .range([minRange, radius])
27847
27906
  .nice(yTicksNumber);
@@ -27874,7 +27933,7 @@ var radar_Radar = /** @class */ (function (_super) {
27874
27933
  // center coordinates
27875
27934
  var c = {
27876
27935
  x: leftPadding + xLabelPadding,
27877
- y: height / 2,
27936
+ y: height / 2
27878
27937
  };
27879
27938
  /////////////////////////////
27880
27939
  // Drawing the radar
@@ -28176,7 +28235,7 @@ var radar_Radar = /** @class */ (function (_super) {
28176
28235
  // Dispatch mouse event
28177
28236
  self.services.events.dispatchEvent(Events.Radar.X_AXIS_MOUSEOVER, {
28178
28237
  element: src_select(this),
28179
- datum: datum,
28238
+ datum: datum
28180
28239
  });
28181
28240
  })
28182
28241
  .on("mousemove", function (datum) {
@@ -28193,7 +28252,7 @@ var radar_Radar = /** @class */ (function (_super) {
28193
28252
  // Dispatch mouse event
28194
28253
  self.services.events.dispatchEvent(Events.Radar.X_AXIS_MOUSEMOVE, {
28195
28254
  element: hoveredElement,
28196
- datum: datum,
28255
+ datum: datum
28197
28256
  });
28198
28257
  // get the items that should be highlighted
28199
28258
  var itemsToHighlight = self.displayDataNormalized.filter(function (d) { return d[angle] === datum; });
@@ -28201,14 +28260,14 @@ var radar_Radar = /** @class */ (function (_super) {
28201
28260
  self.services.events.dispatchEvent(Events.Tooltip.SHOW, {
28202
28261
  hoveredElement: hoveredElement,
28203
28262
  multidata: itemsToHighlight,
28204
- type: TooltipTypes.GRIDLINE,
28263
+ type: TooltipTypes.GRIDLINE
28205
28264
  });
28206
28265
  })
28207
28266
  .on("click", function (datum) {
28208
28267
  // Dispatch mouse event
28209
28268
  self.services.events.dispatchEvent(Events.Radar.X_AXIS_CLICK, {
28210
28269
  element: src_select(this),
28211
- datum: datum,
28270
+ datum: datum
28212
28271
  });
28213
28272
  })
28214
28273
  .on("mouseout", function (datum) {
@@ -28223,14 +28282,14 @@ var radar_Radar = /** @class */ (function (_super) {
28223
28282
  // Dispatch mouse event
28224
28283
  self.services.events.dispatchEvent(Events.Radar.X_AXIS_MOUSEOUT, {
28225
28284
  element: hoveredElement,
28226
- datum: datum,
28285
+ datum: datum
28227
28286
  });
28228
28287
  // Hide tooltip
28229
28288
  self.services.events.dispatchEvent("hide-tooltip", {
28230
- hoveredElement: hoveredElement,
28289
+ hoveredElement: hoveredElement
28231
28290
  });
28232
28291
  self.services.events.dispatchEvent(Events.Tooltip.HIDE, {
28233
- hoveredElement: hoveredElement,
28292
+ hoveredElement: hoveredElement
28234
28293
  });
28235
28294
  });
28236
28295
  };