@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.
package/charts-vue.umd.js CHANGED
@@ -6843,7 +6843,7 @@ var tools_Tools;
6843
6843
  function getDimensions(el) {
6844
6844
  return {
6845
6845
  width: parseFloat(el.style.width.replace("px", "") || el.offsetWidth),
6846
- height: parseFloat(el.style.height.replace("px", "") || el.offsetHeight),
6846
+ height: parseFloat(el.style.height.replace("px", "") || el.offsetHeight)
6847
6847
  };
6848
6848
  }
6849
6849
  Tools.getDimensions = getDimensions;
@@ -6873,7 +6873,7 @@ var tools_Tools;
6873
6873
  .split(",");
6874
6874
  return {
6875
6875
  tx: transforms[0],
6876
- ty: transforms[1],
6876
+ ty: transforms[1]
6877
6877
  };
6878
6878
  }
6879
6879
  return null;
@@ -6895,7 +6895,7 @@ var tools_Tools;
6895
6895
  var xyString = match.split(",");
6896
6896
  return {
6897
6897
  x: parseFloat(xyString[0]),
6898
- y: parseFloat(xyString[1]),
6898
+ y: parseFloat(xyString[1])
6899
6899
  };
6900
6900
  }
6901
6901
  Tools.getTranformOffsets = getTranformOffsets;
@@ -6942,19 +6942,21 @@ var tools_Tools;
6942
6942
  }
6943
6943
  Tools.convertValueToPercentage = convertValueToPercentage;
6944
6944
  /**
6945
- * Truncate the labels
6946
- * @export
6947
- * @param {any} fullText
6948
- * @param {any} truncationType
6949
- * @param {any} numCharacter
6950
- * @returns Truncated text
6951
- */
6945
+ * Truncate the labels
6946
+ * @export
6947
+ * @param {any} fullText
6948
+ * @param {any} truncationType
6949
+ * @param {any} numCharacter
6950
+ * @returns Truncated text
6951
+ */
6952
6952
  function truncateLabel(fullText, truncationType, numCharacter) {
6953
6953
  if (numCharacter > fullText.length) {
6954
6954
  return fullText;
6955
6955
  }
6956
6956
  if (truncationType === TruncationTypes.MID_LINE) {
6957
- return fullText.substr(0, numCharacter / 2) + "..." + fullText.substr(-numCharacter / 2);
6957
+ return (fullText.substr(0, numCharacter / 2) +
6958
+ "..." +
6959
+ fullText.substr(-numCharacter / 2));
6958
6960
  }
6959
6961
  else if (truncationType === TruncationTypes.FRONT_LINE) {
6960
6962
  return "..." + fullText.substr(-numCharacter);
@@ -6979,7 +6981,7 @@ var tools_Tools;
6979
6981
  function arrayDifferences(oldArray, newArray) {
6980
6982
  var difference = {
6981
6983
  missing: [],
6982
- added: [],
6984
+ added: []
6983
6985
  };
6984
6986
  oldArray.forEach(function (element) {
6985
6987
  if (newArray.indexOf(element) === -1) {
@@ -7066,7 +7068,7 @@ var tools_Tools;
7066
7068
  y0: verticalCoordinates.x0,
7067
7069
  y1: verticalCoordinates.x1,
7068
7070
  x0: verticalCoordinates.y0,
7069
- x1: verticalCoordinates.y1,
7071
+ x1: verticalCoordinates.y1
7070
7072
  };
7071
7073
  }
7072
7074
  return verticalCoordinates;
@@ -7105,7 +7107,7 @@ var en_US_default = /*#__PURE__*/__webpack_require__.n(en_US);
7105
7107
  var standardTruncationOptions = {
7106
7108
  type: TruncationTypes.END_LINE,
7107
7109
  threshold: 16,
7108
- numCharacter: 14,
7110
+ numCharacter: 14
7109
7111
  };
7110
7112
  /**
7111
7113
  * Legend options
@@ -7125,9 +7127,9 @@ var legend = {
7125
7127
  },
7126
7128
  checkbox: {
7127
7129
  radius: 6.5,
7128
- spaceAfter: 4,
7130
+ spaceAfter: 4
7129
7131
  },
7130
- truncation: standardTruncationOptions,
7132
+ truncation: standardTruncationOptions
7131
7133
  };
7132
7134
  /**
7133
7135
  * Grid options
@@ -7173,19 +7175,19 @@ var barChartTooltip = tools_Tools.merge({}, axisChartTooltip, {
7173
7175
  var configuration_axes = {
7174
7176
  top: {
7175
7177
  includeZero: true,
7176
- truncation: standardTruncationOptions,
7178
+ truncation: standardTruncationOptions
7177
7179
  },
7178
7180
  bottom: {
7179
7181
  includeZero: true,
7180
- truncation: standardTruncationOptions,
7182
+ truncation: standardTruncationOptions
7181
7183
  },
7182
7184
  left: {
7183
7185
  includeZero: true,
7184
- truncation: standardTruncationOptions,
7186
+ truncation: standardTruncationOptions
7185
7187
  },
7186
7188
  right: {
7187
7189
  includeZero: true,
7188
- truncation: standardTruncationOptions,
7190
+ truncation: standardTruncationOptions
7189
7191
  }
7190
7192
  };
7191
7193
  var timeScale = {
@@ -7218,7 +7220,8 @@ var configuration_chart = {
7218
7220
  },
7219
7221
  data: {
7220
7222
  groupMapsTo: "group",
7221
- loading: false
7223
+ loading: false,
7224
+ selectedGroups: []
7222
7225
  },
7223
7226
  color: {
7224
7227
  scale: null
@@ -7354,7 +7357,11 @@ var gaugeChart = tools_Tools.merge({}, configuration_chart, {
7354
7357
  numberSpacing: 10,
7355
7358
  deltaFontSize: function (radius) { return radius / 8; },
7356
7359
  valueFontSize: function (radius) { return radius / 2.5; },
7357
- numberFormatter: function (number) { return (number.toFixed(2) % 1 !== 0) ? number.toFixed(2).toLocaleString() : number.toFixed().toLocaleString(); }
7360
+ numberFormatter: function (number) {
7361
+ return number.toFixed(2) % 1 !== 0
7362
+ ? number.toFixed(2).toLocaleString()
7363
+ : number.toFixed().toLocaleString();
7364
+ }
7358
7365
  }
7359
7366
  });
7360
7367
  /**
@@ -7781,7 +7788,7 @@ var getColor = function (obj, shade) { return obj[shade]; };
7781
7788
  magenta: function (shade) { return getColor(magenta, shade); },
7782
7789
  purple: function (shade) { return getColor(purple, shade); },
7783
7790
  red: function (shade) { return getColor(red, shade); },
7784
- teal: function (shade) { return getColor(teal, shade); },
7791
+ teal: function (shade) { return getColor(teal, shade); }
7785
7792
  });
7786
7793
  //# sourceMappingURL=../../src/services/colors.js.map
7787
7794
  // CONCATENATED MODULE: ./node_modules/@carbon/charts/services/colorPalettes.js
@@ -7803,7 +7810,7 @@ var WHITE = [
7803
7810
  services_colors.teal(50),
7804
7811
  services_colors.cyan(90),
7805
7812
  "#8a3800",
7806
- services_colors.purple(50),
7813
+ services_colors.purple(50)
7807
7814
  ];
7808
7815
  var DARK = [
7809
7816
  services_colors.purple(60),
@@ -7819,7 +7826,7 @@ var DARK = [
7819
7826
  services_colors.teal(40),
7820
7827
  services_colors.cyan(20),
7821
7828
  "#ba4e00",
7822
- services_colors.purple(30),
7829
+ services_colors.purple(30)
7823
7830
  ];
7824
7831
  var G10 = WHITE;
7825
7832
  var G90 = DARK;
@@ -12191,11 +12198,10 @@ var model_ChartModel = /** @class */ (function () {
12191
12198
  this.colorScale = {};
12192
12199
  this.services = services;
12193
12200
  }
12194
- ChartModel.prototype.getDisplayData = function () {
12201
+ ChartModel.prototype.getAllDataFromDomain = function () {
12195
12202
  if (!this.get("data")) {
12196
12203
  return null;
12197
12204
  }
12198
- var ACTIVE = legend.items.status.ACTIVE;
12199
12205
  var dataGroups = this.getDataGroups();
12200
12206
  // Remove datasets that have been disabled
12201
12207
  var displayData = tools_Tools.clone(this.get("data"));
@@ -12214,12 +12220,26 @@ var model_ChartModel = /** @class */ (function () {
12214
12220
  else {
12215
12221
  var _a = axesOptions[axis].domain, start_1 = _a[0], end_1 = _a[1];
12216
12222
  // Filter out data outside domain
12217
- displayData = displayData.filter(function (datum) { return datum[mapsTo_1] >= start_1 && datum[mapsTo_1] <= end_1; });
12223
+ displayData = displayData.filter(function (datum) {
12224
+ return datum[mapsTo_1] >= start_1 && datum[mapsTo_1] <= end_1;
12225
+ });
12218
12226
  }
12219
12227
  }
12220
12228
  });
12221
12229
  }
12222
12230
  return displayData.filter(function (datum) {
12231
+ return dataGroups.find(function (group) { return group.name === datum[groupMapsTo]; });
12232
+ });
12233
+ };
12234
+ ChartModel.prototype.getDisplayData = function () {
12235
+ if (!this.get("data")) {
12236
+ return null;
12237
+ }
12238
+ var ACTIVE = legend.items.status.ACTIVE;
12239
+ var dataGroups = this.getDataGroups();
12240
+ var groupMapsTo = this.getOptions().data.groupMapsTo;
12241
+ var allDataFromDomain = this.getAllDataFromDomain();
12242
+ return allDataFromDomain.filter(function (datum) {
12223
12243
  var group = dataGroups.find(function (group) { return group.name === datum[groupMapsTo]; });
12224
12244
  return group.status === ACTIVE;
12225
12245
  });
@@ -12296,7 +12316,6 @@ var model_ChartModel = /** @class */ (function () {
12296
12316
  scaleType === ScaleTypes.LINEAR) {
12297
12317
  stackKeys.sort(function (a, b) { return a - b; });
12298
12318
  }
12299
- ;
12300
12319
  var dataGroupNames = this.getDataGroupNames();
12301
12320
  return stackKeys.map(function (key) {
12302
12321
  var correspondingValues = { sharedStackKey: key };
@@ -12425,6 +12444,19 @@ var model_ChartModel = /** @class */ (function () {
12425
12444
  group.name === changedLabel ? ACTIVE : DISABLED;
12426
12445
  });
12427
12446
  }
12447
+ // Updates selected groups
12448
+ var updatedActiveItems = dataGroups.filter(function (group) { return group.status === ACTIVE; });
12449
+ var options = this.getOptions();
12450
+ var hasUpdatedDeactivatedItems = dataGroups.some(function (group) { return group.status === DISABLED; });
12451
+ // If there are deactivated items, map the item name into selected groups
12452
+ if (hasUpdatedDeactivatedItems) {
12453
+ options.data.selectedGroups = updatedActiveItems.map(function (activeItem) { return activeItem.name; });
12454
+ }
12455
+ else {
12456
+ // If every item is active, clear array
12457
+ options.data.selectedGroups = [];
12458
+ }
12459
+ ;
12428
12460
  // dispatch legend filtering event with the status of all the dataLabels
12429
12461
  this.services.events.dispatchEvent(Events.Legend.ITEMS_UPDATE, {
12430
12462
  dataGroups: dataGroups
@@ -12552,11 +12584,27 @@ var model_ChartModel = /** @class */ (function () {
12552
12584
  };
12553
12585
  ChartModel.prototype.generateDataGroups = function (data) {
12554
12586
  var groupMapsTo = this.getOptions().data.groupMapsTo;
12555
- var ACTIVE = legend.items.status.ACTIVE;
12587
+ var _a = legend.items.status, ACTIVE = _a.ACTIVE, DISABLED = _a.DISABLED;
12588
+ var options = this.getOptions();
12556
12589
  var uniqueDataGroups = src_map(data, function (datum) { return datum[groupMapsTo]; }).keys();
12590
+ // check if selectedGroups can be applied to chart with current data groups
12591
+ if (options.data.selectedGroups.length) {
12592
+ var hasAllSelectedGroups = options.data.selectedGroups
12593
+ .every(function (groupName) { return uniqueDataGroups.includes(groupName); });
12594
+ if (!hasAllSelectedGroups) {
12595
+ options.data.selectedGroups = [];
12596
+ }
12597
+ ;
12598
+ }
12599
+ // Get group status based on items in selected groups
12600
+ var getStatus = function (groupName) {
12601
+ return !options.data.selectedGroups.length || options.data.selectedGroups.includes(groupName)
12602
+ ? ACTIVE
12603
+ : DISABLED;
12604
+ };
12557
12605
  return uniqueDataGroups.map(function (groupName) { return ({
12558
12606
  name: groupName,
12559
- status: ACTIVE
12607
+ status: getStatus(groupName)
12560
12608
  }); });
12561
12609
  };
12562
12610
  /*
@@ -13687,7 +13735,7 @@ var dom_utils_DOMUtils = /** @class */ (function (_super) {
13687
13735
  }
13688
13736
  var finalDimensions = {
13689
13737
  width: 0,
13690
- height: 0,
13738
+ height: 0
13691
13739
  };
13692
13740
  var validateAndSetDimensions = function (dimensions) {
13693
13741
  if (dimensions) {
@@ -13706,7 +13754,7 @@ var dom_utils_DOMUtils = /** @class */ (function (_super) {
13706
13754
  };
13707
13755
  var attrDimensions = {
13708
13756
  width: svgSelector.attr("width"),
13709
- height: svgSelector.attr("height"),
13757
+ height: svgSelector.attr("height")
13710
13758
  };
13711
13759
  var bbox, bboxDimensions, boundingRect, boundingRectDimensions;
13712
13760
  // In many versions of Firefox
@@ -13715,7 +13763,7 @@ var dom_utils_DOMUtils = /** @class */ (function (_super) {
13715
13763
  bbox = svgSelector.node().getBBox();
13716
13764
  bboxDimensions = {
13717
13765
  width: bbox.width,
13718
- height: bbox.height,
13766
+ height: bbox.height
13719
13767
  };
13720
13768
  }
13721
13769
  catch (e) { }
@@ -13723,13 +13771,13 @@ var dom_utils_DOMUtils = /** @class */ (function (_super) {
13723
13771
  boundingRect = svgSelector.node().getBoundingClientRect();
13724
13772
  boundingRectDimensions = {
13725
13773
  width: boundingRect.width,
13726
- height: boundingRect.height,
13774
+ height: boundingRect.height
13727
13775
  };
13728
13776
  }
13729
13777
  catch (e) { }
13730
13778
  var clientDimensions = {
13731
13779
  width: svgSelector.node().clientWidth,
13732
- height: svgSelector.node().clientHeight,
13780
+ height: svgSelector.node().clientHeight
13733
13781
  };
13734
13782
  // If both attribute values are numbers
13735
13783
  // And not percentages or NaN
@@ -13762,7 +13810,7 @@ var dom_utils_DOMUtils = /** @class */ (function (_super) {
13762
13810
  try {
13763
13811
  var nativeDimensions = {
13764
13812
  width: tools_Tools.getProperty(svgSelector.node(), "width", "baseVal", "value"),
13765
- height: tools_Tools.getProperty(svgSelector.node(), "height", "baseVal", "value"),
13813
+ height: tools_Tools.getProperty(svgSelector.node(), "height", "baseVal", "value")
13766
13814
  };
13767
13815
  validateAndSetDimensions(nativeDimensions);
13768
13816
  }
@@ -13917,7 +13965,7 @@ var events_Events = /** @class */ (function (_super) {
13917
13965
  var newEvent;
13918
13966
  if (eventDetail) {
13919
13967
  newEvent = new CustomEvent(eventType, {
13920
- detail: eventDetail,
13968
+ detail: eventDetail
13921
13969
  });
13922
13970
  }
13923
13971
  else {
@@ -16460,13 +16508,13 @@ var scales_cartesian_CartesianScales = /** @class */ (function (_super) {
16460
16508
  top: null,
16461
16509
  right: null,
16462
16510
  bottom: null,
16463
- left: null,
16511
+ left: null
16464
16512
  };
16465
16513
  _this.scales = {
16466
16514
  top: null,
16467
16515
  right: null,
16468
16516
  bottom: null,
16469
- left: null,
16517
+ left: null
16470
16518
  };
16471
16519
  return _this;
16472
16520
  }
@@ -16526,7 +16574,7 @@ var scales_cartesian_CartesianScales = /** @class */ (function (_super) {
16526
16574
  CartesianScales.prototype.getMainXAxisPosition = function () {
16527
16575
  var possibleXAxisPositions = [
16528
16576
  AxisPositions.BOTTOM,
16529
- AxisPositions.TOP,
16577
+ AxisPositions.TOP
16530
16578
  ];
16531
16579
  return [this.domainAxisPosition, this.rangeAxisPosition].find(function (position) { return possibleXAxisPositions.indexOf(position) > -1; });
16532
16580
  };
@@ -16534,7 +16582,7 @@ var scales_cartesian_CartesianScales = /** @class */ (function (_super) {
16534
16582
  CartesianScales.prototype.getMainYAxisPosition = function () {
16535
16583
  var possibleYAxisPositions = [
16536
16584
  AxisPositions.LEFT,
16537
- AxisPositions.RIGHT,
16585
+ AxisPositions.RIGHT
16538
16586
  ];
16539
16587
  return [this.domainAxisPosition, this.rangeAxisPosition].find(function (position) { return possibleYAxisPositions.indexOf(position) > -1; });
16540
16588
  };
@@ -16634,7 +16682,7 @@ var scales_cartesian_CartesianScales = /** @class */ (function (_super) {
16634
16682
  var mainHorizontalScaleType = mainHorizontalAxisOptions.scaleType || ScaleTypes.LINEAR;
16635
16683
  var result = {
16636
16684
  domainAxisPosition: null,
16637
- rangeAxisPosition: null,
16685
+ rangeAxisPosition: null
16638
16686
  };
16639
16687
  if (mainHorizontalScaleType === ScaleTypes.LABELS ||
16640
16688
  mainHorizontalScaleType === ScaleTypes.TIME) {
@@ -16740,7 +16788,7 @@ var scales_cartesian_CartesianScales = /** @class */ (function (_super) {
16740
16788
  }
16741
16789
  return {
16742
16790
  threshold: highestThreshold,
16743
- scaleValue: domainScale(highestThreshold.value),
16791
+ scaleValue: domainScale(highestThreshold.value)
16744
16792
  };
16745
16793
  };
16746
16794
  CartesianScales.prototype.getHighestRangeThreshold = function () {
@@ -16755,7 +16803,7 @@ var scales_cartesian_CartesianScales = /** @class */ (function (_super) {
16755
16803
  var highestThreshold = thresholds.sort(function (a, b) { return b.value - a.value; })[0];
16756
16804
  return {
16757
16805
  threshold: highestThreshold,
16758
- scaleValue: rangeScale(highestThreshold.value),
16806
+ scaleValue: rangeScale(highestThreshold.value)
16759
16807
  };
16760
16808
  };
16761
16809
  return CartesianScales;
@@ -16767,49 +16815,49 @@ function addSpacingToTimeDomain(domain, spaceToAddToEdges) {
16767
16815
  if (differenceInYears(endDate, startDate) > 1) {
16768
16816
  return [
16769
16817
  subYears(startDate, spaceToAddToEdges),
16770
- addYears(endDate, spaceToAddToEdges),
16818
+ addYears(endDate, spaceToAddToEdges)
16771
16819
  ];
16772
16820
  }
16773
16821
  if (differenceInMonths(endDate, startDate) > 1) {
16774
16822
  return [
16775
16823
  subMonths(startDate, spaceToAddToEdges),
16776
- addMonths(endDate, spaceToAddToEdges),
16824
+ addMonths(endDate, spaceToAddToEdges)
16777
16825
  ];
16778
16826
  }
16779
16827
  if (differenceInDays(endDate, startDate) > 1) {
16780
16828
  return [
16781
16829
  subDays(startDate, spaceToAddToEdges),
16782
- addDays(endDate, spaceToAddToEdges),
16830
+ addDays(endDate, spaceToAddToEdges)
16783
16831
  ];
16784
16832
  }
16785
16833
  if (differenceInHours(endDate, startDate) > 1) {
16786
16834
  return [
16787
16835
  subHours(startDate, spaceToAddToEdges),
16788
- addHours(endDate, spaceToAddToEdges),
16836
+ addHours(endDate, spaceToAddToEdges)
16789
16837
  ];
16790
16838
  }
16791
16839
  if (differenceInMinutes(endDate, startDate) > 30) {
16792
16840
  return [
16793
16841
  subMinutes(startDate, spaceToAddToEdges * 30),
16794
- addMinutes(endDate, spaceToAddToEdges * 30),
16842
+ addMinutes(endDate, spaceToAddToEdges * 30)
16795
16843
  ];
16796
16844
  }
16797
16845
  if (differenceInMinutes(endDate, startDate) > 1) {
16798
16846
  return [
16799
16847
  subMinutes(startDate, spaceToAddToEdges),
16800
- addMinutes(endDate, spaceToAddToEdges),
16848
+ addMinutes(endDate, spaceToAddToEdges)
16801
16849
  ];
16802
16850
  }
16803
16851
  if (differenceInSeconds(endDate, startDate) > 15) {
16804
16852
  return [
16805
16853
  subSeconds(startDate, spaceToAddToEdges * 15),
16806
- addSeconds(endDate, spaceToAddToEdges * 15),
16854
+ addSeconds(endDate, spaceToAddToEdges * 15)
16807
16855
  ];
16808
16856
  }
16809
16857
  if (differenceInSeconds(endDate, startDate) > 1) {
16810
16858
  return [
16811
16859
  subSeconds(startDate, spaceToAddToEdges),
16812
- addSeconds(endDate, spaceToAddToEdges),
16860
+ addSeconds(endDate, spaceToAddToEdges)
16813
16861
  ];
16814
16862
  }
16815
16863
  return [startDate, endDate];
@@ -17790,7 +17838,7 @@ var curves_Curves = /** @class */ (function (_super) {
17790
17838
  curveNatural: natural,
17791
17839
  curveStep: curve_step,
17792
17840
  curveStepAfter: stepAfter,
17793
- curveStepBefore: stepBefore,
17841
+ curveStepBefore: stepBefore
17794
17842
  };
17795
17843
  return _this;
17796
17844
  }
@@ -17939,7 +17987,10 @@ var legend_Legend = /** @class */ (function (_super) {
17939
17987
  var addedLegendItems = legendItems
17940
17988
  .enter()
17941
17989
  .append("g")
17942
- .classed("legend-item", true);
17990
+ .classed("legend-item", true)
17991
+ .classed("active", function (d, i) {
17992
+ return d.status === options.legend.items.status.ACTIVE;
17993
+ });
17943
17994
  // Configs
17944
17995
  var checkboxRadius = options.legend.checkbox.radius;
17945
17996
  // Truncation
@@ -17968,8 +18019,7 @@ var legend_Legend = /** @class */ (function (_super) {
17968
18019
  .merge(legendItems.select("text"));
17969
18020
  // truncate the legend label if it's too long
17970
18021
  if (truncationType !== TruncationTypes.NONE) {
17971
- addedLegendItemsText
17972
- .html(function (d) {
18022
+ addedLegendItemsText.html(function (d) {
17973
18023
  if (d.name.length > truncationThreshold) {
17974
18024
  return tools_Tools.truncateLabel(d.name, truncationType, truncationNumCharacter);
17975
18025
  }
@@ -17979,8 +18029,7 @@ var legend_Legend = /** @class */ (function (_super) {
17979
18029
  });
17980
18030
  }
17981
18031
  else {
17982
- addedLegendItemsText
17983
- .html(function (d) { return d.name; });
18032
+ addedLegendItemsText.html(function (d) { return d.name; });
17984
18033
  }
17985
18034
  this.breakItemsIntoLines(addedLegendItems);
17986
18035
  // Remove old elements as needed.
@@ -18060,11 +18109,19 @@ var legend_Legend = /** @class */ (function (_super) {
18060
18109
  legendItem
18061
18110
  .select("text")
18062
18111
  .attr("x", startingPoint + spaceNeededForCheckbox)
18063
- .attr("y", yOffset + yPosition + 2);
18112
+ .attr("y", yOffset + yPosition + 3);
18064
18113
  lastYPosition = yPosition;
18114
+ // Test if legendItems are placed in the correct direction
18115
+ var testHorizontal = (!legendOrientation ||
18116
+ legendOrientation === LegendOrientations.HORIZONTAL) &&
18117
+ legendItem.select("rect.checkbox").attr("y") === '0';
18118
+ var testVertical = legendOrientation === LegendOrientations.VERTICAL &&
18119
+ legendItem.select("rect.checkbox").attr("x") === '0';
18120
+ var hasCorrectLegendDirection = testHorizontal || testVertical;
18065
18121
  // Render checkbox check icon
18066
18122
  if (hasDeactivatedItems &&
18067
- legendItem.select("g.check").empty()) {
18123
+ legendItem.select("g.check").empty() &&
18124
+ hasCorrectLegendDirection) {
18068
18125
  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");
18069
18126
  legendItem
18070
18127
  .select("g.check svg")
@@ -18089,7 +18146,7 @@ var legend_Legend = /** @class */ (function (_super) {
18089
18146
  svg.selectAll("g.legend-item")
18090
18147
  .on("mouseover", function () {
18091
18148
  self.services.events.dispatchEvent(Events.Legend.ITEM_HOVER, {
18092
- hoveredElement: src_select(this),
18149
+ hoveredElement: src_select(this)
18093
18150
  });
18094
18151
  // Configs
18095
18152
  var checkboxRadius = options.legend.checkbox.radius;
@@ -18107,7 +18164,7 @@ var legend_Legend = /** @class */ (function (_super) {
18107
18164
  })
18108
18165
  .on("click", function () {
18109
18166
  self.services.events.dispatchEvent(Events.Legend.ITEM_CLICK, {
18110
- clickedElement: src_select(this),
18167
+ clickedElement: src_select(this)
18111
18168
  });
18112
18169
  var clickedItem = src_select(this);
18113
18170
  var clickedItemData = clickedItem.datum();
@@ -18119,7 +18176,7 @@ var legend_Legend = /** @class */ (function (_super) {
18119
18176
  if (hoveredItemData.name.length > truncationThreshold) {
18120
18177
  self.services.events.dispatchEvent(Events.Tooltip.SHOW, {
18121
18178
  hoveredElement: hoveredItem,
18122
- type: TooltipTypes.LEGEND,
18179
+ type: TooltipTypes.LEGEND
18123
18180
  });
18124
18181
  }
18125
18182
  })
@@ -18128,7 +18185,7 @@ var legend_Legend = /** @class */ (function (_super) {
18128
18185
  hoveredItem.select("rect.hover-stroke").remove();
18129
18186
  self.services.events.dispatchEvent(Events.Tooltip.HIDE);
18130
18187
  self.services.events.dispatchEvent(Events.Legend.ITEM_MOUSEOUT, {
18131
- hoveredElement: hoveredItem,
18188
+ hoveredElement: hoveredItem
18132
18189
  });
18133
18190
  });
18134
18191
  };
@@ -20702,7 +20759,7 @@ var TIME_INTERVALS = [
20702
20759
  ["daily", 24 * 60 * 60 * 1000],
20703
20760
  ["monthly", 30 * 24 * 60 * 60 * 1000],
20704
20761
  ["quarterly", 3 * 30 * 24 * 60 * 60 * 1000],
20705
- ["yearly", 12 * 30 * 24 * 60 * 60 * 1000],
20762
+ ["yearly", 12 * 30 * 24 * 60 * 60 * 1000]
20706
20763
  ];
20707
20764
  // Return true if the tick is a primary tick, false otherwise
20708
20765
  function isTickPrimary(tick, i, interval, showDayName) {
@@ -20772,7 +20829,7 @@ function getTimeformats(timestamp) {
20772
20829
  d: date.getDate(),
20773
20830
  H: date.getHours(),
20774
20831
  m: date.getMinutes(),
20775
- s: date.getSeconds(),
20832
+ s: date.getSeconds() // seconds: 0-59
20776
20833
  };
20777
20834
  }
20778
20835
  // Find the differences between consecutive numbers in an array
@@ -20928,7 +20985,7 @@ var threshold_Threshold = /** @class */ (function (_super) {
20928
20985
  if (scaleType === ScaleTypes.TIME) {
20929
20986
  var isVertical = [
20930
20987
  AxisPositions.LEFT,
20931
- AxisPositions.RIGHT,
20988
+ AxisPositions.RIGHT
20932
20989
  ].includes(axisPosition);
20933
20990
  var mainXScale = this.services.cartesianScales.getMainXScale();
20934
20991
  var mainYScale = this.services.cartesianScales.getMainYScale();
@@ -20959,20 +21016,20 @@ var threshold_Threshold = /** @class */ (function (_super) {
20959
21016
  // Find out whether threshold label should be shown on the left or right side
20960
21017
  var bestPlacementOption = this.positionService.findBestPlacementAt({
20961
21018
  left: mouseRelativePos[0],
20962
- top: mouseRelativePos[1],
21019
+ top: mouseRelativePos[1]
20963
21020
  }, target, [
20964
21021
  PLACEMENTS.RIGHT,
20965
21022
  PLACEMENTS.LEFT,
20966
21023
  PLACEMENTS.TOP,
20967
- PLACEMENTS.BOTTOM,
21024
+ PLACEMENTS.BOTTOM
20968
21025
  ], function () { return ({
20969
21026
  width: holder.offsetWidth,
20970
- height: holder.offsetHeight,
21027
+ height: holder.offsetHeight
20971
21028
  }); });
20972
21029
  // Get coordinates to where label should be positioned
20973
21030
  var pos = this.positionService.findPositionAt({
20974
21031
  left: mouseRelativePos[0],
20975
- top: mouseRelativePos[1],
21032
+ top: mouseRelativePos[1]
20976
21033
  }, target, bestPlacementOption);
20977
21034
  this.positionService.setElement(target, pos);
20978
21035
  };
@@ -20983,13 +21040,13 @@ var threshold_Threshold = /** @class */ (function (_super) {
20983
21040
  .on("mouseover mousemove", function () {
20984
21041
  self.threshold.classed("active", true);
20985
21042
  self.services.events.dispatchEvent(Events.Threshold.SHOW, {
20986
- hoveredElement: src_select(self.threshold),
21043
+ hoveredElement: src_select(self.threshold)
20987
21044
  });
20988
21045
  })
20989
21046
  .on("mouseout", function () {
20990
21047
  self.threshold.classed("active", false);
20991
21048
  self.services.events.dispatchEvent(Events.Threshold.HIDE, {
20992
- hoveredElement: src_select(self.threshold),
21049
+ hoveredElement: src_select(self.threshold)
20993
21050
  });
20994
21051
  });
20995
21052
  };
@@ -21057,12 +21114,12 @@ var title_Title = /** @class */ (function (_super) {
21057
21114
  .on("mouseenter", function () {
21058
21115
  self_1.services.events.dispatchEvent(Events.Tooltip.SHOW, {
21059
21116
  hoveredElement: title,
21060
- type: TooltipTypes.TITLE,
21117
+ type: TooltipTypes.TITLE
21061
21118
  });
21062
21119
  })
21063
21120
  .on("mouseout", function () {
21064
21121
  self_1.services.events.dispatchEvent(Events.Tooltip.HIDE, {
21065
- hoveredElement: title,
21122
+ hoveredElement: title
21066
21123
  });
21067
21124
  });
21068
21125
  }
@@ -21149,8 +21206,8 @@ var tooltip_Tooltip = /** @class */ (function (_super) {
21149
21206
  tools_Tools.getProperty(_this.model.getOptions(), "tooltip", "datapoint", "enabled")) ||
21150
21207
  (e.detail.type === TooltipTypes.GRIDLINE &&
21151
21208
  tools_Tools.getProperty(_this.model.getOptions(), "tooltip", "gridline", "enabled")) ||
21152
- (e.detail.type === TooltipTypes.LEGEND) ||
21153
- (e.detail.type === TooltipTypes.AXISLABEL)) {
21209
+ e.detail.type === TooltipTypes.LEGEND ||
21210
+ e.detail.type === TooltipTypes.AXISLABEL) {
21154
21211
  var data = src_select(on_event.target).datum();
21155
21212
  // Generate default tooltip
21156
21213
  var defaultHTML = void 0;
@@ -21254,7 +21311,7 @@ var tooltip_Tooltip = /** @class */ (function (_super) {
21254
21311
  left: elementPosition.left -
21255
21312
  holderPosition.left +
21256
21313
  elementPosition.width / 2,
21257
- top: elementPosition.top - holderPosition.top - verticalOffset,
21314
+ top: elementPosition.top - holderPosition.top - verticalOffset
21258
21315
  };
21259
21316
  return { placement: TooltipPosition.BOTTOM, position: tooltipPos };
21260
21317
  };
@@ -21275,15 +21332,15 @@ var tooltip_Tooltip = /** @class */ (function (_super) {
21275
21332
  // Find out whether tooltip should be shown on the left or right side
21276
21333
  var bestPlacementOption = this.positionService.findBestPlacementAt({
21277
21334
  left: mouseRelativePos[0],
21278
- top: mouseRelativePos[1],
21335
+ top: mouseRelativePos[1]
21279
21336
  }, target, [
21280
21337
  PLACEMENTS.RIGHT,
21281
21338
  PLACEMENTS.LEFT,
21282
21339
  PLACEMENTS.TOP,
21283
- PLACEMENTS.BOTTOM,
21340
+ PLACEMENTS.BOTTOM
21284
21341
  ], function () { return ({
21285
21342
  width: holder.offsetWidth,
21286
- height: holder.offsetHeight,
21343
+ height: holder.offsetHeight
21287
21344
  }); });
21288
21345
  var horizontalOffset = this.model.getOptions().tooltip.datapoint.horizontalOffset;
21289
21346
  if (bestPlacementOption === PLACEMENTS.LEFT) {
@@ -21292,7 +21349,7 @@ var tooltip_Tooltip = /** @class */ (function (_super) {
21292
21349
  // Get coordinates to where tooltip should be positioned
21293
21350
  pos = this.positionService.findPositionAt({
21294
21351
  left: mouseRelativePos[0] + horizontalOffset,
21295
- top: mouseRelativePos[1],
21352
+ top: mouseRelativePos[1]
21296
21353
  }, target, bestPlacementOption);
21297
21354
  }
21298
21355
  this.positionService.setElement(target, pos);
@@ -21344,8 +21401,8 @@ var tooltip_bar_TooltipBar = /** @class */ (function (_super) {
21344
21401
  tools_Tools.getProperty(_this.model.getOptions(), "tooltip", "datapoint", "enabled")) ||
21345
21402
  (e.detail.type === TooltipTypes.GRIDLINE &&
21346
21403
  tools_Tools.getProperty(_this.model.getOptions(), "tooltip", "gridline", "enabled")) ||
21347
- (e.detail.type === TooltipTypes.LEGEND) ||
21348
- (e.detail.type === TooltipTypes.AXISLABEL)) {
21404
+ e.detail.type === TooltipTypes.LEGEND ||
21405
+ e.detail.type === TooltipTypes.AXISLABEL) {
21349
21406
  var data = e.detail.hoveredElement.datum();
21350
21407
  var hoveredElement = e.detail.hoveredElement.node();
21351
21408
  var defaultHTML = void 0;
@@ -21373,7 +21430,8 @@ var tooltip_bar_TooltipBar = /** @class */ (function (_super) {
21373
21430
  // default tooltip
21374
21431
  tooltipTextContainer.html(defaultHTML);
21375
21432
  }
21376
- if ((e.detail.type === TooltipTypes.LEGEND) || (e.detail.type === TooltipTypes.AXISLABEL)) {
21433
+ if (e.detail.type === TooltipTypes.LEGEND ||
21434
+ e.detail.type === TooltipTypes.AXISLABEL) {
21377
21435
  _this.positionTooltip();
21378
21436
  }
21379
21437
  else {
@@ -21424,7 +21482,7 @@ var tooltip_bar_TooltipBar = /** @class */ (function (_super) {
21424
21482
  left: barPosition.left -
21425
21483
  holderPosition.left +
21426
21484
  barPosition.width / 2,
21427
- top: barPosition.bottom - holderPosition.top + verticalOffset,
21485
+ top: barPosition.bottom - holderPosition.top + verticalOffset
21428
21486
  };
21429
21487
  return { placement: TooltipPosition.BOTTOM, position: tooltipPos };
21430
21488
  }
@@ -21434,7 +21492,7 @@ var tooltip_bar_TooltipBar = /** @class */ (function (_super) {
21434
21492
  left: barPosition.left -
21435
21493
  holderPosition.left +
21436
21494
  barPosition.width / 2,
21437
- top: barPosition.top - holderPosition.top - verticalOffset,
21495
+ top: barPosition.top - holderPosition.top - verticalOffset
21438
21496
  };
21439
21497
  return { placement: TooltipPosition.TOP, position: tooltipPos };
21440
21498
  }
@@ -22122,9 +22180,7 @@ var area_stacked_StackedArea = /** @class */ (function (_super) {
22122
22180
  if (!isTimeSeries) {
22123
22181
  return;
22124
22182
  }
22125
- var percentage = Object.keys(options.axes).some(function (axis) {
22126
- return options.axes[axis].percentage;
22127
- });
22183
+ var percentage = Object.keys(options.axes).some(function (axis) { return options.axes[axis].percentage; });
22128
22184
  var stackedData = this.model.getStackedData({ percentage: percentage });
22129
22185
  var areas = svg
22130
22186
  .selectAll("path.area")
@@ -22308,25 +22364,25 @@ var bar_simple_SimpleBar = /** @class */ (function (_super) {
22308
22364
  // Dispatch mouse event
22309
22365
  self.services.events.dispatchEvent(Events.Bar.BAR_MOUSEOVER, {
22310
22366
  element: hoveredElement,
22311
- datum: datum,
22367
+ datum: datum
22312
22368
  });
22313
22369
  self.services.events.dispatchEvent(Events.Tooltip.SHOW, {
22314
22370
  hoveredElement: hoveredElement,
22315
- type: TooltipTypes.DATAPOINT,
22371
+ type: TooltipTypes.DATAPOINT
22316
22372
  });
22317
22373
  })
22318
22374
  .on("mousemove", function (datum) {
22319
22375
  // Dispatch mouse event
22320
22376
  self.services.events.dispatchEvent(Events.Bar.BAR_MOUSEMOVE, {
22321
22377
  element: src_select(this),
22322
- datum: datum,
22378
+ datum: datum
22323
22379
  });
22324
22380
  })
22325
22381
  .on("click", function (datum) {
22326
22382
  // Dispatch mouse event
22327
22383
  self.services.events.dispatchEvent(Events.Bar.BAR_CLICK, {
22328
22384
  element: src_select(this),
22329
- datum: datum,
22385
+ datum: datum
22330
22386
  });
22331
22387
  })
22332
22388
  .on("mouseout", function (datum) {
@@ -22340,11 +22396,11 @@ var bar_simple_SimpleBar = /** @class */ (function (_super) {
22340
22396
  // Dispatch mouse event
22341
22397
  self.services.events.dispatchEvent(Events.Bar.BAR_MOUSEOUT, {
22342
22398
  element: hoveredElement,
22343
- datum: datum,
22399
+ datum: datum
22344
22400
  });
22345
22401
  // Hide tooltip
22346
22402
  self.services.events.dispatchEvent(Events.Tooltip.HIDE, {
22347
- hoveredElement: hoveredElement,
22403
+ hoveredElement: hoveredElement
22348
22404
  });
22349
22405
  });
22350
22406
  };
@@ -22514,26 +22570,26 @@ var bar_grouped_GroupedBar = /** @class */ (function (_super) {
22514
22570
  // Dispatch mouse event
22515
22571
  self.services.events.dispatchEvent(Events.Bar.BAR_MOUSEOVER, {
22516
22572
  element: hoveredElement,
22517
- datum: datum,
22573
+ datum: datum
22518
22574
  });
22519
22575
  // Show tooltip
22520
22576
  self.services.events.dispatchEvent(Events.Tooltip.SHOW, {
22521
22577
  hoveredElement: hoveredElement,
22522
- type: TooltipTypes.DATAPOINT,
22578
+ type: TooltipTypes.DATAPOINT
22523
22579
  });
22524
22580
  })
22525
22581
  .on("mousemove", function (datum) {
22526
22582
  // Dispatch mouse event
22527
22583
  self.services.events.dispatchEvent(Events.Bar.BAR_MOUSEMOVE, {
22528
22584
  element: src_select(this),
22529
- datum: datum,
22585
+ datum: datum
22530
22586
  });
22531
22587
  })
22532
22588
  .on("click", function (datum) {
22533
22589
  // Dispatch mouse event
22534
22590
  self.services.events.dispatchEvent(Events.Bar.BAR_CLICK, {
22535
22591
  element: src_select(this),
22536
- datum: datum,
22592
+ datum: datum
22537
22593
  });
22538
22594
  })
22539
22595
  .on("mouseout", function (datum) {
@@ -22548,11 +22604,11 @@ var bar_grouped_GroupedBar = /** @class */ (function (_super) {
22548
22604
  // Dispatch mouse event
22549
22605
  self.services.events.dispatchEvent(Events.Bar.BAR_MOUSEOUT, {
22550
22606
  element: hoveredElement,
22551
- datum: datum,
22607
+ datum: datum
22552
22608
  });
22553
22609
  // Hide tooltip
22554
22610
  self.services.events.dispatchEvent(Events.Tooltip.HIDE, {
22555
- hoveredElement: hoveredElement,
22611
+ hoveredElement: hoveredElement
22556
22612
  });
22557
22613
  });
22558
22614
  };
@@ -22763,7 +22819,7 @@ var bar_stacked_StackedBar = /** @class */ (function (_super) {
22763
22819
  // Dispatch mouse event
22764
22820
  self.services.events.dispatchEvent(Events.Bar.BAR_MOUSEOVER, {
22765
22821
  element: hoveredElement,
22766
- datum: datum,
22822
+ datum: datum
22767
22823
  });
22768
22824
  })
22769
22825
  .on("mousemove", function (datum) {
@@ -22790,14 +22846,14 @@ var bar_stacked_StackedBar = /** @class */ (function (_super) {
22790
22846
  self.services.events.dispatchEvent(Events.Tooltip.SHOW, {
22791
22847
  hoveredElement: hoveredElement,
22792
22848
  data: matchingDataPoint,
22793
- type: TooltipTypes.DATAPOINT,
22849
+ type: TooltipTypes.DATAPOINT
22794
22850
  });
22795
22851
  })
22796
22852
  .on("click", function (datum) {
22797
22853
  // Dispatch mouse event
22798
22854
  self.services.events.dispatchEvent(Events.Bar.BAR_CLICK, {
22799
22855
  element: src_select(this),
22800
- datum: datum,
22856
+ datum: datum
22801
22857
  });
22802
22858
  })
22803
22859
  .on("mouseout", function (datum) {
@@ -22811,11 +22867,11 @@ var bar_stacked_StackedBar = /** @class */ (function (_super) {
22811
22867
  // Dispatch mouse event
22812
22868
  self.services.events.dispatchEvent(Events.Bar.BAR_MOUSEOUT, {
22813
22869
  element: hoveredElement,
22814
- datum: datum,
22870
+ datum: datum
22815
22871
  });
22816
22872
  // Hide tooltip
22817
22873
  self.services.events.dispatchEvent(Events.Tooltip.HIDE, {
22818
- hoveredElement: hoveredElement,
22874
+ hoveredElement: hoveredElement
22819
22875
  });
22820
22876
  });
22821
22877
  };
@@ -22914,9 +22970,7 @@ var scatter_Scatter = /** @class */ (function (_super) {
22914
22970
  var stacked = this.configs.stacked;
22915
22971
  var scatterData;
22916
22972
  if (stacked) {
22917
- var percentage = Object.keys(options.axes).some(function (axis) {
22918
- return options.axes[axis].percentage;
22919
- });
22973
+ var percentage = Object.keys(options.axes).some(function (axis) { return options.axes[axis].percentage; });
22920
22974
  scatterData = this.model.getStackedData({ percentage: percentage });
22921
22975
  }
22922
22976
  else {
@@ -23046,7 +23100,7 @@ var scatter_Scatter = /** @class */ (function (_super) {
23046
23100
  self.services.events.dispatchEvent(Events.Tooltip.SHOW, {
23047
23101
  hoveredElement: hoveredElement,
23048
23102
  multidata: overlappingData.length > 1 ? overlappingData : null,
23049
- type: TooltipTypes.DATAPOINT,
23103
+ type: TooltipTypes.DATAPOINT
23050
23104
  });
23051
23105
  var eventNameToDispatch = on_event.type === "mouseover"
23052
23106
  ? Events.Scatter.SCATTER_MOUSEOVER
@@ -23054,14 +23108,14 @@ var scatter_Scatter = /** @class */ (function (_super) {
23054
23108
  // Dispatch mouse event
23055
23109
  self.services.events.dispatchEvent(eventNameToDispatch, {
23056
23110
  element: hoveredElement,
23057
- datum: datum,
23111
+ datum: datum
23058
23112
  });
23059
23113
  })
23060
23114
  .on("click", function (datum) {
23061
23115
  // Dispatch mouse event
23062
23116
  self.services.events.dispatchEvent(Events.Scatter.SCATTER_CLICK, {
23063
23117
  element: src_select(this),
23064
- datum: datum,
23118
+ datum: datum
23065
23119
  });
23066
23120
  })
23067
23121
  .on("mouseout", function (datum) {
@@ -23073,11 +23127,11 @@ var scatter_Scatter = /** @class */ (function (_super) {
23073
23127
  // Dispatch mouse event
23074
23128
  self.services.events.dispatchEvent(Events.Scatter.SCATTER_MOUSEOUT, {
23075
23129
  element: hoveredElement,
23076
- datum: datum,
23130
+ datum: datum
23077
23131
  });
23078
23132
  // Hide tooltip
23079
23133
  self.services.events.dispatchEvent(Events.Tooltip.HIDE, {
23080
- hoveredElement: hoveredElement,
23134
+ hoveredElement: hoveredElement
23081
23135
  });
23082
23136
  });
23083
23137
  };
@@ -23255,9 +23309,7 @@ var line_Line = /** @class */ (function (_super) {
23255
23309
  });
23256
23310
  var data = [];
23257
23311
  if (this.configs.stacked) {
23258
- var percentage = Object.keys(options.axes).some(function (axis) {
23259
- return options.axes[axis].percentage;
23260
- });
23312
+ var percentage = Object.keys(options.axes).some(function (axis) { return options.axes[axis].percentage; });
23261
23313
  var groupMapsTo_1 = options.data.groupMapsTo;
23262
23314
  var stackedData = this.model.getStackedData({ percentage: percentage });
23263
23315
  var domainIdentifier_1 = this.services.cartesianScales.getDomainIdentifier();
@@ -23364,9 +23416,7 @@ var scatter_stacked_StackedScatter = /** @class */ (function (_super) {
23364
23416
  var groupMapsTo = options.data.groupMapsTo;
23365
23417
  var domainIdentifier = this.services.cartesianScales.getDomainIdentifier();
23366
23418
  var rangeIdentifier = this.services.cartesianScales.getRangeIdentifier();
23367
- var percentage = Object.keys(options.axes).some(function (axis) {
23368
- return options.axes[axis].percentage;
23369
- });
23419
+ var percentage = Object.keys(options.axes).some(function (axis) { return options.axes[axis].percentage; });
23370
23420
  var stackedData = this.model.getStackedData({ percentage: percentage });
23371
23421
  // Update data on dot groups
23372
23422
  var circleGroups = svg
@@ -23991,12 +24041,12 @@ var pie_Pie = /** @class */ (function (_super) {
23991
24041
  if (direction === CalloutDirections.RIGHT) {
23992
24042
  d.startPos = {
23993
24043
  x: xPosition,
23994
- y: yPosition + d.textOffsetY,
24044
+ y: yPosition + d.textOffsetY
23995
24045
  };
23996
24046
  // end position for the callout line
23997
24047
  d.endPos = {
23998
24048
  x: xPosition + options.pie.callout.offsetX,
23999
- y: yPosition - options.pie.callout.offsetY + d.textOffsetY,
24049
+ y: yPosition - options.pie.callout.offsetY + d.textOffsetY
24000
24050
  };
24001
24051
  // the intersection point of the vertical and horizontal line
24002
24052
  d.intersectPointX =
@@ -24006,12 +24056,12 @@ var pie_Pie = /** @class */ (function (_super) {
24006
24056
  // start position for the callout line
24007
24057
  d.startPos = {
24008
24058
  x: xPosition,
24009
- y: yPosition + d.textOffsetY,
24059
+ y: yPosition + d.textOffsetY
24010
24060
  };
24011
24061
  // end position for the callout line should be bottom aligned to the title
24012
24062
  d.endPos = {
24013
24063
  x: xPosition - options.pie.callout.offsetX,
24014
- y: yPosition - options.pie.callout.offsetY + d.textOffsetY,
24064
+ y: yPosition - options.pie.callout.offsetY + d.textOffsetY
24015
24065
  };
24016
24066
  // the intersection point of the vertical and horizontal line
24017
24067
  d.intersectPointX =
@@ -24057,7 +24107,7 @@ var pie_Pie = /** @class */ (function (_super) {
24057
24107
  // Dispatch mouse event
24058
24108
  self.services.events.dispatchEvent(Events.Pie.SLICE_MOUSEOVER, {
24059
24109
  element: src_select(this),
24060
- datum: datum,
24110
+ datum: datum
24061
24111
  });
24062
24112
  })
24063
24113
  .on("mousemove", function (datum) {
@@ -24069,19 +24119,19 @@ var pie_Pie = /** @class */ (function (_super) {
24069
24119
  // Dispatch mouse event
24070
24120
  self.services.events.dispatchEvent(Events.Pie.SLICE_MOUSEMOVE, {
24071
24121
  element: hoveredElement,
24072
- datum: datum,
24122
+ datum: datum
24073
24123
  });
24074
24124
  // Show tooltip
24075
24125
  self.services.events.dispatchEvent(Events.Tooltip.SHOW, {
24076
24126
  hoveredElement: hoveredElement,
24077
- type: TooltipTypes.DATAPOINT,
24127
+ type: TooltipTypes.DATAPOINT
24078
24128
  });
24079
24129
  })
24080
24130
  .on("click", function (datum) {
24081
24131
  // Dispatch mouse event
24082
24132
  self.services.events.dispatchEvent(Events.Pie.SLICE_CLICK, {
24083
24133
  element: src_select(this),
24084
- datum: datum,
24134
+ datum: datum
24085
24135
  });
24086
24136
  })
24087
24137
  .on("mouseout", function (datum) {
@@ -24093,11 +24143,11 @@ var pie_Pie = /** @class */ (function (_super) {
24093
24143
  // Dispatch mouse event
24094
24144
  self.services.events.dispatchEvent(Events.Pie.SLICE_MOUSEOUT, {
24095
24145
  element: hoveredElement,
24096
- datum: datum,
24146
+ datum: datum
24097
24147
  });
24098
24148
  // Hide tooltip
24099
24149
  self.services.events.dispatchEvent(Events.Tooltip.HIDE, {
24100
- hoveredElement: hoveredElement,
24150
+ hoveredElement: hoveredElement
24101
24151
  });
24102
24152
  });
24103
24153
  };
@@ -24105,7 +24155,7 @@ var pie_Pie = /** @class */ (function (_super) {
24105
24155
  Pie.prototype.computeRadius = function () {
24106
24156
  var options = this.model.getOptions();
24107
24157
  var _a = dom_utils_DOMUtils.getSVGElementSize(this.parent, {
24108
- useAttrs: true,
24158
+ useAttrs: true
24109
24159
  }), width = _a.width, height = _a.height;
24110
24160
  var radius = Math.min(width, height) / 2;
24111
24161
  return radius + options.pie.radiusOffset;
@@ -24311,15 +24361,16 @@ var gauge_Gauge = /** @class */ (function (_super) {
24311
24361
  ? tools_Tools.getProperty(options, "gauge", "deltaFontSize")
24312
24362
  : function () { return 0; };
24313
24363
  // use numberFormatter here only if there is a delta supplied
24314
- var numberFormatter = delta ? tools_Tools.getProperty(options, "gauge", "numberFormatter") : function () { return null; };
24364
+ var numberFormatter = delta
24365
+ ? tools_Tools.getProperty(options, "gauge", "numberFormatter")
24366
+ : function () { return null; };
24315
24367
  var arrowSize = tools_Tools.getProperty(options, "gauge", "deltaArrow", "size");
24316
24368
  var numberSpacing = tools_Tools.getProperty(options, "gauge", "numberSpacing");
24317
24369
  var numbersGroup = dom_utils_DOMUtils.appendOrSelect(svg, "g.gauge-numbers");
24318
24370
  // Add the smaller number of the delta
24319
24371
  var deltaGroup = dom_utils_DOMUtils.appendOrSelect(numbersGroup, "g.gauge-delta").attr("transform", "translate(0, " + (deltaFontSize(radius) + numberSpacing) + ")");
24320
24372
  var deltaNumber = dom_utils_DOMUtils.appendOrSelect(deltaGroup, "text.gauge-delta-number");
24321
- deltaNumber
24322
- .data(delta === null ? [] : [delta]);
24373
+ deltaNumber.data(delta === null ? [] : [delta]);
24323
24374
  deltaNumber
24324
24375
  .enter()
24325
24376
  .append("text")
@@ -24551,7 +24602,7 @@ var skeleton_Skeleton = /** @class */ (function (_super) {
24551
24602
  var svg = this.parent;
24552
24603
  var parent = svg.node().parentNode;
24553
24604
  var _a = dom_utils_DOMUtils.getSVGElementSize(parent, {
24554
- useAttrs: true,
24605
+ useAttrs: true
24555
24606
  }), width = _a.width, height = _a.height;
24556
24607
  svg.attr("width", width).attr("height", height);
24557
24608
  var isDataEmpty = this.model.isDataEmpty();
@@ -24630,7 +24681,7 @@ var skeleton_Skeleton = /** @class */ (function (_super) {
24630
24681
  var svg = this.parent;
24631
24682
  var parent = svg.node().parentNode;
24632
24683
  var _a = dom_utils_DOMUtils.getSVGElementSize(parent, {
24633
- useAttrs: true,
24684
+ useAttrs: true
24634
24685
  }), width = _a.width, height = _a.height;
24635
24686
  this.backdrop = dom_utils_DOMUtils.appendOrSelect(svg, "svg.chart-skeleton.DAII")
24636
24687
  .attr("width", width)
@@ -24737,7 +24788,7 @@ var skeleton_Skeleton = /** @class */ (function (_super) {
24737
24788
  var stopShimmerClass = "stop-shimmer";
24738
24789
  var container = this.parent.select(".chart-skeleton");
24739
24790
  var width = dom_utils_DOMUtils.getSVGElementSize(this.parent, {
24740
- useAttrs: true,
24791
+ useAttrs: true
24741
24792
  }).width;
24742
24793
  var startPoint = 0;
24743
24794
  var endPoint = width;
@@ -25338,10 +25389,10 @@ var layout_LayoutComponent = /** @class */ (function (_super) {
25338
25389
  // Get parent SVG to render inside of
25339
25390
  var svg = this.parent;
25340
25391
  var _a = dom_utils_DOMUtils.getSVGElementSize(svg, {
25341
- useAttrs: true,
25392
+ useAttrs: true
25342
25393
  }), width = _a.width, height = _a.height;
25343
25394
  var root = hierarchy({
25344
- children: this.children,
25395
+ children: this.children
25345
25396
  }).sum(function (d) { return d.size; });
25346
25397
  // Grab the correct treemap tile function based on direction
25347
25398
  var tileType = this.configs.direction === LayoutDirection.ROW ||
@@ -25387,6 +25438,12 @@ var layout_LayoutComponent = /** @class */ (function (_super) {
25387
25438
  // Calculate preffered children sizes after internal rendering
25388
25439
  var growth = tools_Tools.getProperty(d, "data", "growth", "x");
25389
25440
  var matchingSVGDimensions = dom_utils_DOMUtils.getSVGElementSize(src_select(this), { useBBox: true });
25441
+ if (d.data.id === "legend") {
25442
+ var svgSize = dom_utils_DOMUtils.getSVGElementSize(src_select(this), { useAttrs: true });
25443
+ if (svgSize.height < 40) {
25444
+ matchingSVGDimensions.height = svgSize.height;
25445
+ }
25446
+ }
25390
25447
  if (growth === LayoutGrowth.PREFERRED) {
25391
25448
  var matchingSVGWidth = horizontal
25392
25449
  ? matchingSVGDimensions.width
@@ -25410,7 +25467,7 @@ var layout_LayoutComponent = /** @class */ (function (_super) {
25410
25467
  // Pass children data to the hierarchy layout
25411
25468
  // And calculate sum of sizes
25412
25469
  root = hierarchy({
25413
- children: this.children,
25470
+ children: this.children
25414
25471
  }).sum(function (d) { return d.size; });
25415
25472
  // Compute the position of all elements within the layout
25416
25473
  src_treemap().tile(tileType).size([width, height]).padding(0)(root);
@@ -25697,7 +25754,7 @@ var axis_Axis = /** @class */ (function (_super) {
25697
25754
  var timeScaleOptions = tools_Tools.getProperty(options, "timeScale");
25698
25755
  var svg = this.getContainerSVG();
25699
25756
  var _a = dom_utils_DOMUtils.getSVGElementSize(this.parent, {
25700
- useAttrs: true,
25757
+ useAttrs: true
25701
25758
  }), width = _a.width, height = _a.height;
25702
25759
  var startPosition, endPosition;
25703
25760
  if (axisPosition === AxisPositions.BOTTOM ||
@@ -25755,7 +25812,7 @@ var axis_Axis = /** @class */ (function (_super) {
25755
25812
  var fakeTick = dom_utils_DOMUtils.appendOrSelect(invisibleAxisRef, "g.tick");
25756
25813
  var fakeTickText = dom_utils_DOMUtils.appendOrSelect(fakeTick, "text").text("0");
25757
25814
  var tickHeight = dom_utils_DOMUtils.getSVGElementSize(fakeTickText.node(), {
25758
- useBBox: true,
25815
+ useBBox: true
25759
25816
  }).height;
25760
25817
  fakeTick.remove();
25761
25818
  var isTimeScaleType = this.scaleType === ScaleTypes.TIME ||
@@ -25786,13 +25843,15 @@ var axis_Axis = /** @class */ (function (_super) {
25786
25843
  axis.tickValues([]);
25787
25844
  }
25788
25845
  else {
25789
- var tickValues = scale
25790
- .nice(numberOfTicks)
25791
- .ticks(numberOfTicks);
25846
+ var addSpaceOnEdges = tools_Tools.getProperty(options, "timeScale", "addSpaceOnEdges");
25847
+ var tickValues = void 0;
25848
+ if (addSpaceOnEdges) {
25849
+ tickValues = scale.nice(numberOfTicks);
25850
+ }
25851
+ tickValues = scale.ticks(numberOfTicks);
25792
25852
  // Remove labels on the edges
25793
25853
  // If there are more than 2 labels to show
25794
- if (tools_Tools.getProperty(options, "timeScale", "addSpaceOnEdges") &&
25795
- tickValues.length > 2) {
25854
+ if (addSpaceOnEdges && tickValues.length > 2) {
25796
25855
  tickValues.splice(tickValues.length - 1, 1);
25797
25856
  tickValues.splice(0, 1);
25798
25857
  }
@@ -25872,7 +25931,7 @@ var axis_Axis = /** @class */ (function (_super) {
25872
25931
  break;
25873
25932
  case AxisPositions.TOP:
25874
25933
  var titleHeight = dom_utils_DOMUtils.getSVGElementSize(axisTitleRef, {
25875
- useBBox: true,
25934
+ useBBox: true
25876
25935
  }).height;
25877
25936
  axisTitleRef
25878
25937
  .attr("transform", "translate(" + (this.margins.left / 2 + scale.range()[1] / 2) + ", " + titleHeight / 2 + ")")
@@ -25962,14 +26021,15 @@ var axis_Axis = /** @class */ (function (_super) {
25962
26021
  }
25963
26022
  // truncate the label if it's too long
25964
26023
  // only applies to discrete type
25965
- if (truncationType !== TruncationTypes.NONE && axisScaleType === ScaleTypes.LABELS) {
26024
+ if (truncationType !== TruncationTypes.NONE &&
26025
+ axisScaleType === ScaleTypes.LABELS) {
25966
26026
  var dataGroups = this.model.getDataValuesGroupedByKeys();
25967
26027
  if (dataGroups.length > 0) {
25968
26028
  var activeDataGroups = dataGroups.map(function (d) { return d.sharedStackKey; });
25969
- var tick_html = svg.select("g.axis." + axisPosition + " g.ticks g.tick").html();
25970
- container
25971
- .selectAll("g.ticks g.tick")
25972
- .html(tick_html);
26029
+ var tick_html = svg
26030
+ .select("g.axis." + axisPosition + " g.ticks g.tick")
26031
+ .html();
26032
+ container.selectAll("g.ticks g.tick").html(tick_html);
25973
26033
  container
25974
26034
  .selectAll("g.tick text")
25975
26035
  .data(activeDataGroups)
@@ -25995,9 +26055,7 @@ var axis_Axis = /** @class */ (function (_super) {
25995
26055
  container
25996
26056
  .selectAll("g.ticks")
25997
26057
  .html(this.getInvisibleAxisRef().html());
25998
- container
25999
- .selectAll("g.tick text")
26000
- .data(activeDataGroups);
26058
+ container.selectAll("g.tick text").data(activeDataGroups);
26001
26059
  }
26002
26060
  }
26003
26061
  // Add event listeners to elements drawn
@@ -26020,19 +26078,20 @@ var axis_Axis = /** @class */ (function (_super) {
26020
26078
  // Dispatch mouse event
26021
26079
  self.services.events.dispatchEvent(Events.Axis.LABEL_MOUSEOVER, {
26022
26080
  element: src_select(this),
26023
- datum: datum,
26081
+ datum: datum
26024
26082
  });
26025
26083
  })
26026
26084
  .on("mousemove", function (datum) {
26027
26085
  // Dispatch mouse event
26028
26086
  self.services.events.dispatchEvent(Events.Axis.LABEL_MOUSEMOVE, {
26029
26087
  element: src_select(this),
26030
- datum: datum,
26088
+ datum: datum
26031
26089
  });
26032
- if (axisScaleType === ScaleTypes.LABELS && datum.length > truncationThreshold) {
26090
+ if (axisScaleType === ScaleTypes.LABELS &&
26091
+ datum.length > truncationThreshold) {
26033
26092
  self.services.events.dispatchEvent(Events.Tooltip.SHOW, {
26034
26093
  hoveredElement: src_select(this),
26035
- type: TooltipTypes.AXISLABEL,
26094
+ type: TooltipTypes.AXISLABEL
26036
26095
  });
26037
26096
  }
26038
26097
  })
@@ -26040,14 +26099,14 @@ var axis_Axis = /** @class */ (function (_super) {
26040
26099
  // Dispatch mouse event
26041
26100
  self.services.events.dispatchEvent(Events.Axis.LABEL_CLICK, {
26042
26101
  element: src_select(this),
26043
- datum: datum,
26102
+ datum: datum
26044
26103
  });
26045
26104
  })
26046
26105
  .on("mouseout", function (datum) {
26047
26106
  // Dispatch mouse event
26048
26107
  self.services.events.dispatchEvent(Events.Axis.LABEL_MOUSEOUT, {
26049
26108
  element: src_select(this),
26050
- datum: datum,
26109
+ datum: datum
26051
26110
  });
26052
26111
  if (axisScaleType === ScaleTypes.LABELS) {
26053
26112
  self.services.events.dispatchEvent(Events.Tooltip.HIDE);
@@ -26124,7 +26183,7 @@ var two_dimensional_axes_TwoDimensionalAxes = /** @class */ (function (_super) {
26124
26183
  top: 0,
26125
26184
  right: 0,
26126
26185
  bottom: 0,
26127
- left: 0,
26186
+ left: 0
26128
26187
  };
26129
26188
  return _this;
26130
26189
  }
@@ -26149,7 +26208,7 @@ var two_dimensional_axes_TwoDimensionalAxes = /** @class */ (function (_super) {
26149
26208
  var axisComponent = new axis_Axis(_this.model, _this.services, {
26150
26209
  position: axisPosition,
26151
26210
  axes: _this.configs.axes,
26152
- margins: _this.margins,
26211
+ margins: _this.margins
26153
26212
  });
26154
26213
  // Set model, services & parent for the new axis component
26155
26214
  axisComponent.setModel(_this.model);
@@ -26179,7 +26238,7 @@ var two_dimensional_axes_TwoDimensionalAxes = /** @class */ (function (_super) {
26179
26238
  }
26180
26239
  else {
26181
26240
  offset = dom_utils_DOMUtils.getSVGElementSize(child.getTitleRef(), {
26182
- useBBox: true,
26241
+ useBBox: true
26183
26242
  }).height;
26184
26243
  }
26185
26244
  switch (axisPosition) {
@@ -26379,7 +26438,7 @@ var grid_Grid = /** @class */ (function (_super) {
26379
26438
  // threshold for when to display a gridline tooltip
26380
26439
  var bounds = {
26381
26440
  min: Number(translations.tx) - threshold,
26382
- max: Number(translations.tx) + threshold,
26441
+ max: Number(translations.tx) + threshold
26383
26442
  };
26384
26443
  return bounds.min <= position[0] && position[0] <= bounds.max;
26385
26444
  });
@@ -26465,7 +26524,7 @@ var ruler_Ruler = /** @class */ (function (_super) {
26465
26524
  var _b = rangeScale.range(), yScaleEnd = _b[0], yScaleStart = _b[1];
26466
26525
  var scaledData = displayData.map(function (d) { return ({
26467
26526
  domainValue: _this.services.cartesianScales.getDomainValue(d),
26468
- originalData: d,
26527
+ originalData: d
26469
26528
  }); });
26470
26529
  /**
26471
26530
  * Find matches, reduce is used instead of filter
@@ -26528,7 +26587,7 @@ var ruler_Ruler = /** @class */ (function (_super) {
26528
26587
  this.services.events.dispatchEvent("show-tooltip", {
26529
26588
  hoveredElement: rulerLine,
26530
26589
  multidata: tooltipData,
26531
- type: TooltipTypes.GRIDLINE,
26590
+ type: TooltipTypes.GRIDLINE
26532
26591
  });
26533
26592
  ruler.attr("opacity", 1);
26534
26593
  // line snaps to matching point
@@ -26646,7 +26705,7 @@ var zero_line_ZeroLine = /** @class */ (function (_super) {
26646
26705
  x0: x0,
26647
26706
  x1: x1,
26648
26707
  y0: yPosition,
26649
- y1: yPosition,
26708
+ y1: yPosition
26650
26709
  }, this.services.cartesianScales.getOrientation());
26651
26710
  var line = dom_utils_DOMUtils.appendOrSelect(svg, "line.domain");
26652
26711
  line.transition(this.services.transitions.getTransition("zero-line-update", animate))
@@ -26907,7 +26966,7 @@ var axis_chart_AxisChart = /** @class */ (function (_super) {
26907
26966
  var _this = _super.call(this, holder, chartConfigs) || this;
26908
26967
  _this.services = Object.assign(_this.services, {
26909
26968
  cartesianScales: scales_cartesian_CartesianScales,
26910
- curves: curves_Curves,
26969
+ curves: curves_Curves
26911
26970
  });
26912
26971
  return _this;
26913
26972
  }
@@ -26917,24 +26976,24 @@ var axis_chart_AxisChart = /** @class */ (function (_super) {
26917
26976
  components: [new title_Title(this.model, this.services)],
26918
26977
  growth: {
26919
26978
  x: LayoutGrowth.PREFERRED,
26920
- y: LayoutGrowth.FIXED,
26921
- },
26979
+ y: LayoutGrowth.FIXED
26980
+ }
26922
26981
  };
26923
26982
  var legendComponent = {
26924
26983
  id: "legend",
26925
26984
  components: [new legend_Legend(this.model, this.services)],
26926
26985
  growth: {
26927
26986
  x: LayoutGrowth.PREFERRED,
26928
- y: LayoutGrowth.FIXED,
26929
- },
26987
+ y: LayoutGrowth.FIXED
26988
+ }
26930
26989
  };
26931
26990
  var graphFrameComponent = {
26932
26991
  id: "graph-frame",
26933
26992
  components: graphFrameComponents,
26934
26993
  growth: {
26935
26994
  x: LayoutGrowth.STRETCH,
26936
- y: LayoutGrowth.FIXED,
26937
- },
26995
+ y: LayoutGrowth.FIXED
26996
+ }
26938
26997
  };
26939
26998
  var isLegendEnabled = this.model.getOptions().legend.enabled !== false;
26940
26999
  // Decide the position of the legend in reference to the chart
@@ -26964,23 +27023,23 @@ var axis_chart_AxisChart = /** @class */ (function (_super) {
26964
27023
  components: [new spacer_Spacer(this.model, this.services)],
26965
27024
  growth: {
26966
27025
  x: LayoutGrowth.PREFERRED,
26967
- y: LayoutGrowth.FIXED,
26968
- },
27026
+ y: LayoutGrowth.FIXED
27027
+ }
26969
27028
  };
26970
27029
  var fullFrameComponent = {
26971
27030
  id: "full-frame",
26972
27031
  components: [
26973
27032
  new layout_LayoutComponent(this.model, this.services, axis_chart_spreadArrays((isLegendEnabled ? [legendComponent] : []), [
26974
27033
  legendSpacerComponent,
26975
- graphFrameComponent,
27034
+ graphFrameComponent
26976
27035
  ]), {
26977
- direction: fullFrameComponentDirection,
26978
- }),
27036
+ direction: fullFrameComponentDirection
27037
+ })
26979
27038
  ],
26980
27039
  growth: {
26981
27040
  x: LayoutGrowth.STRETCH,
26982
- y: LayoutGrowth.FIXED,
26983
- },
27041
+ y: LayoutGrowth.FIXED
27042
+ }
26984
27043
  };
26985
27044
  // Add chart title if it exists
26986
27045
  var topLevelLayoutComponents = [];
@@ -26991,16 +27050,16 @@ var axis_chart_AxisChart = /** @class */ (function (_super) {
26991
27050
  components: [new spacer_Spacer(this.model, this.services)],
26992
27051
  growth: {
26993
27052
  x: LayoutGrowth.PREFERRED,
26994
- y: LayoutGrowth.FIXED,
26995
- },
27053
+ y: LayoutGrowth.FIXED
27054
+ }
26996
27055
  };
26997
27056
  topLevelLayoutComponents.push(titleSpacerComponent);
26998
27057
  }
26999
27058
  topLevelLayoutComponents.push(fullFrameComponent);
27000
27059
  return [
27001
27060
  new layout_LayoutComponent(this.model, this.services, topLevelLayoutComponents, {
27002
- direction: LayoutDirection.COLUMN,
27003
- }),
27061
+ direction: LayoutDirection.COLUMN
27062
+ })
27004
27063
  ];
27005
27064
  };
27006
27065
  return AxisChart;
@@ -27048,8 +27107,8 @@ var area_AreaChart = /** @class */ (function (_super) {
27048
27107
  new area_Area(this.model, this.services),
27049
27108
  new scatter_Scatter(this.model, this.services, {
27050
27109
  fadeInOnChartHolderMouseover: true,
27051
- handleThresholds: true,
27052
- }),
27110
+ handleThresholds: true
27111
+ })
27053
27112
  ];
27054
27113
  var components = this.getAxisChartComponents(graphFrameComponents);
27055
27114
  components.push(new tooltip_scatter_TooltipScatter(this.model, this.services));
@@ -27101,8 +27160,8 @@ var area_stacked_StackedAreaChart = /** @class */ (function (_super) {
27101
27160
  new scatter_stacked_StackedScatter(this.model, this.services, {
27102
27161
  fadeInOnChartHolderMouseover: true,
27103
27162
  handleThresholds: true,
27104
- stacked: true,
27105
- }),
27163
+ stacked: true
27164
+ })
27106
27165
  ];
27107
27166
  var components = this.getAxisChartComponents(graphFrameComponents);
27108
27167
  // TODO add tooltip
@@ -27153,8 +27212,8 @@ var bar_simple_SimpleBarChart = /** @class */ (function (_super) {
27153
27212
  new bar_simple_SimpleBar(this.model, this.services),
27154
27213
  new zero_line_ZeroLine(this.model, this.services),
27155
27214
  new skeleton_Skeleton(this.model, this.services, {
27156
- skeleton: Skeletons.VERT_OR_HORIZ,
27157
- }),
27215
+ skeleton: Skeletons.VERT_OR_HORIZ
27216
+ })
27158
27217
  ];
27159
27218
  var components = this.getAxisChartComponents(graphFrameComponents);
27160
27219
  components.push(new tooltip_bar_TooltipBar(this.model, this.services));
@@ -27204,8 +27263,8 @@ var bar_grouped_GroupedBarChart = /** @class */ (function (_super) {
27204
27263
  new bar_grouped_GroupedBar(this.model, this.services),
27205
27264
  new zero_line_ZeroLine(this.model, this.services),
27206
27265
  new skeleton_Skeleton(this.model, this.services, {
27207
- skeleton: Skeletons.VERT_OR_HORIZ,
27208
- }),
27266
+ skeleton: Skeletons.VERT_OR_HORIZ
27267
+ })
27209
27268
  ];
27210
27269
  var components = this.getAxisChartComponents(graphFrameComponents);
27211
27270
  components.push(new tooltip_bar_TooltipBar(this.model, this.services));
@@ -27254,8 +27313,8 @@ var bar_stacked_StackedBarChart = /** @class */ (function (_super) {
27254
27313
  new grid_Grid(this.model, this.services),
27255
27314
  new bar_stacked_StackedBar(this.model, this.services),
27256
27315
  new skeleton_Skeleton(this.model, this.services, {
27257
- skeleton: Skeletons.VERT_OR_HORIZ,
27258
- }),
27316
+ skeleton: Skeletons.VERT_OR_HORIZ
27317
+ })
27259
27318
  ];
27260
27319
  var components = this.getAxisChartComponents(graphFrameComponents);
27261
27320
  components.push(new tooltip_bar_TooltipBar(this.model, this.services));
@@ -27305,8 +27364,8 @@ var bubble_BubbleChart = /** @class */ (function (_super) {
27305
27364
  new ruler_Ruler(this.model, this.services),
27306
27365
  new bubble_Bubble(this.model, this.services),
27307
27366
  new skeleton_Skeleton(this.model, this.services, {
27308
- skeleton: Skeletons.GRID,
27309
- }),
27367
+ skeleton: Skeletons.GRID
27368
+ })
27310
27369
  ];
27311
27370
  var components = this.getAxisChartComponents(graphFrameComponents);
27312
27371
  components.push(new tooltip_scatter_TooltipScatter(this.model, this.services));
@@ -27357,8 +27416,8 @@ var line_LineChart = /** @class */ (function (_super) {
27357
27416
  new line_Line(this.model, this.services),
27358
27417
  new scatter_Scatter(this.model, this.services, { handleThresholds: true }),
27359
27418
  new skeleton_Skeleton(this.model, this.services, {
27360
- skeleton: Skeletons.GRID,
27361
- }),
27419
+ skeleton: Skeletons.GRID
27420
+ })
27362
27421
  ];
27363
27422
  var components = this.getAxisChartComponents(graphFrameComponents);
27364
27423
  components.push(new tooltip_scatter_TooltipScatter(this.model, this.services));
@@ -27408,8 +27467,8 @@ var scatter_ScatterChart = /** @class */ (function (_super) {
27408
27467
  new ruler_Ruler(this.model, this.services),
27409
27468
  new scatter_Scatter(this.model, this.services),
27410
27469
  new skeleton_Skeleton(this.model, this.services, {
27411
- skeleton: Skeletons.GRID,
27412
- }),
27470
+ skeleton: Skeletons.GRID
27471
+ })
27413
27472
  ];
27414
27473
  var components = this.getAxisChartComponents(graphFrameComponents);
27415
27474
  components.push(new tooltip_scatter_TooltipScatter(this.model, this.services));
@@ -27510,8 +27569,8 @@ var pie_PieChart = /** @class */ (function (_super) {
27510
27569
  var graphFrameComponents = [
27511
27570
  new pie_Pie(this.model, this.services),
27512
27571
  new skeleton_Skeleton(this.model, this.services, {
27513
- skeleton: Skeletons.PIE,
27514
- }),
27572
+ skeleton: Skeletons.PIE
27573
+ })
27515
27574
  ];
27516
27575
  // get the base chart components and export with tooltip
27517
27576
  var components = this.getChartComponents(graphFrameComponents);
@@ -27559,8 +27618,8 @@ var donut_DonutChart = /** @class */ (function (_super) {
27559
27618
  var graphFrameComponents = [
27560
27619
  new donut_Donut(this.model, this.services),
27561
27620
  new skeleton_Skeleton(this.model, this.services, {
27562
- skeleton: Skeletons.DONUT,
27563
- }),
27621
+ skeleton: Skeletons.DONUT
27622
+ })
27564
27623
  ];
27565
27624
  var components = this.getChartComponents(graphFrameComponents);
27566
27625
  components.push(new tooltip_pie_TooltipPie(this.model, this.services));
@@ -27577,50 +27636,50 @@ function radialLabelPlacement(angleRadians) {
27577
27636
  if (isInRange(angle, [0, 10]) || isInRange(angle, [350, 0])) {
27578
27637
  return {
27579
27638
  textAnchor: TextAnchor.START,
27580
- dominantBaseline: DominantBaseline.MIDDLE,
27639
+ dominantBaseline: DominantBaseline.MIDDLE
27581
27640
  };
27582
27641
  }
27583
27642
  else if (isInRange(angle, [10, 80])) {
27584
27643
  return {
27585
27644
  textAnchor: TextAnchor.START,
27586
- dominantBaseline: DominantBaseline.HANGING,
27645
+ dominantBaseline: DominantBaseline.HANGING
27587
27646
  };
27588
27647
  }
27589
27648
  else if (isInRange(angle, [80, 100])) {
27590
27649
  return {
27591
27650
  textAnchor: TextAnchor.MIDDLE,
27592
- dominantBaseline: DominantBaseline.HANGING,
27651
+ dominantBaseline: DominantBaseline.HANGING
27593
27652
  };
27594
27653
  }
27595
27654
  else if (isInRange(angle, [100, 170])) {
27596
27655
  return {
27597
27656
  textAnchor: TextAnchor.END,
27598
- dominantBaseline: DominantBaseline.HANGING,
27657
+ dominantBaseline: DominantBaseline.HANGING
27599
27658
  };
27600
27659
  }
27601
27660
  else if (isInRange(angle, [170, 190])) {
27602
27661
  return {
27603
27662
  textAnchor: TextAnchor.END,
27604
- dominantBaseline: DominantBaseline.MIDDLE,
27663
+ dominantBaseline: DominantBaseline.MIDDLE
27605
27664
  };
27606
27665
  }
27607
27666
  else if (isInRange(angle, [190, 260])) {
27608
27667
  return {
27609
27668
  textAnchor: TextAnchor.END,
27610
- dominantBaseline: DominantBaseline.BASELINE,
27669
+ dominantBaseline: DominantBaseline.BASELINE
27611
27670
  };
27612
27671
  }
27613
27672
  else if (isInRange(angle, [260, 280])) {
27614
27673
  return {
27615
27674
  textAnchor: TextAnchor.MIDDLE,
27616
- dominantBaseline: DominantBaseline.BASELINE,
27675
+ dominantBaseline: DominantBaseline.BASELINE
27617
27676
  };
27618
27677
  }
27619
27678
  else {
27620
27679
  // 280 - 350
27621
27680
  return {
27622
27681
  textAnchor: TextAnchor.START,
27623
- dominantBaseline: DominantBaseline.BASELINE,
27682
+ dominantBaseline: DominantBaseline.BASELINE
27624
27683
  };
27625
27684
  }
27626
27685
  }
@@ -27821,7 +27880,7 @@ var radar_Radar = /** @class */ (function (_super) {
27821
27880
  if (animate === void 0) { animate = true; }
27822
27881
  this.svg = this.getContainerSVG();
27823
27882
  var _a = dom_utils_DOMUtils.getSVGElementSize(this.parent, {
27824
- useAttrs: true,
27883
+ useAttrs: true
27825
27884
  }), width = _a.width, height = _a.height;
27826
27885
  var data = this.model.getData();
27827
27886
  var displayData = this.model.getDisplayData();
@@ -27850,7 +27909,7 @@ var radar_Radar = /** @class */ (function (_super) {
27850
27909
  var yScale = linear_linear()
27851
27910
  .domain([
27852
27911
  0,
27853
- src_max(this.displayDataNormalized.map(function (d) { return d[value]; })),
27912
+ src_max(this.displayDataNormalized.map(function (d) { return d[value]; }))
27854
27913
  ])
27855
27914
  .range([minRange, radius])
27856
27915
  .nice(yTicksNumber);
@@ -27883,7 +27942,7 @@ var radar_Radar = /** @class */ (function (_super) {
27883
27942
  // center coordinates
27884
27943
  var c = {
27885
27944
  x: leftPadding + xLabelPadding,
27886
- y: height / 2,
27945
+ y: height / 2
27887
27946
  };
27888
27947
  /////////////////////////////
27889
27948
  // Drawing the radar
@@ -28185,7 +28244,7 @@ var radar_Radar = /** @class */ (function (_super) {
28185
28244
  // Dispatch mouse event
28186
28245
  self.services.events.dispatchEvent(Events.Radar.X_AXIS_MOUSEOVER, {
28187
28246
  element: src_select(this),
28188
- datum: datum,
28247
+ datum: datum
28189
28248
  });
28190
28249
  })
28191
28250
  .on("mousemove", function (datum) {
@@ -28202,7 +28261,7 @@ var radar_Radar = /** @class */ (function (_super) {
28202
28261
  // Dispatch mouse event
28203
28262
  self.services.events.dispatchEvent(Events.Radar.X_AXIS_MOUSEMOVE, {
28204
28263
  element: hoveredElement,
28205
- datum: datum,
28264
+ datum: datum
28206
28265
  });
28207
28266
  // get the items that should be highlighted
28208
28267
  var itemsToHighlight = self.displayDataNormalized.filter(function (d) { return d[angle] === datum; });
@@ -28210,14 +28269,14 @@ var radar_Radar = /** @class */ (function (_super) {
28210
28269
  self.services.events.dispatchEvent(Events.Tooltip.SHOW, {
28211
28270
  hoveredElement: hoveredElement,
28212
28271
  multidata: itemsToHighlight,
28213
- type: TooltipTypes.GRIDLINE,
28272
+ type: TooltipTypes.GRIDLINE
28214
28273
  });
28215
28274
  })
28216
28275
  .on("click", function (datum) {
28217
28276
  // Dispatch mouse event
28218
28277
  self.services.events.dispatchEvent(Events.Radar.X_AXIS_CLICK, {
28219
28278
  element: src_select(this),
28220
- datum: datum,
28279
+ datum: datum
28221
28280
  });
28222
28281
  })
28223
28282
  .on("mouseout", function (datum) {
@@ -28232,14 +28291,14 @@ var radar_Radar = /** @class */ (function (_super) {
28232
28291
  // Dispatch mouse event
28233
28292
  self.services.events.dispatchEvent(Events.Radar.X_AXIS_MOUSEOUT, {
28234
28293
  element: hoveredElement,
28235
- datum: datum,
28294
+ datum: datum
28236
28295
  });
28237
28296
  // Hide tooltip
28238
28297
  self.services.events.dispatchEvent("hide-tooltip", {
28239
- hoveredElement: hoveredElement,
28298
+ hoveredElement: hoveredElement
28240
28299
  });
28241
28300
  self.services.events.dispatchEvent(Events.Tooltip.HIDE, {
28242
- hoveredElement: hoveredElement,
28301
+ hoveredElement: hoveredElement
28243
28302
  });
28244
28303
  });
28245
28304
  };