@eclipse-scout/chart 22.0.26 → 22.0.33

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.
@@ -665,7 +665,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
665
665
  * All rights reserved. This program and the accompanying materials
666
666
  * are made available under the terms of the Eclipse Public License v1.0
667
667
  * which accompanies this distribution, and is available at
668
- * http://www.eclipse.org/legal/epl-v10.html
668
+ * https://www.eclipse.org/legal/epl-v10.html
669
669
  *
670
670
  * Contributors:
671
671
  * BSI Business Systems Integration AG - initial API and implementation
@@ -1037,6 +1037,7 @@ class Chart extends _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_1__.Widget {
1037
1037
  case Chart.Type.POLAR_AREA:
1038
1038
  case Chart.Type.RADAR:
1039
1039
  case Chart.Type.BUBBLE:
1040
+ case Chart.Type.SCATTER:
1040
1041
  return new _index__WEBPACK_IMPORTED_MODULE_0__.ChartJsRenderer(this);
1041
1042
  }
1042
1043
 
@@ -1081,7 +1082,8 @@ _defineProperty(Chart, "Type", {
1081
1082
  DOUGHNUT: 'doughnut',
1082
1083
  POLAR_AREA: 'polarArea',
1083
1084
  RADAR: 'radar',
1084
- BUBBLE: 'bubble'
1085
+ BUBBLE: 'bubble',
1086
+ SCATTER: 'scatter'
1085
1087
  });
1086
1088
 
1087
1089
  _defineProperty(Chart, "Position", {
@@ -1163,11 +1165,11 @@ __webpack_require__.r(__webpack_exports__);
1163
1165
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1164
1166
 
1165
1167
  /*
1166
- * Copyright (c) 2010-2021 BSI Business Systems Integration AG.
1168
+ * Copyright (c) 2010-2022 BSI Business Systems Integration AG.
1167
1169
  * All rights reserved. This program and the accompanying materials
1168
1170
  * are made available under the terms of the Eclipse Public License v1.0
1169
1171
  * which accompanies this distribution, and is available at
1170
- * http://www.eclipse.org/legal/epl-v10.html
1172
+ * https://www.eclipse.org/legal/epl-v10.html
1171
1173
  *
1172
1174
  * Contributors:
1173
1175
  * BSI Business Systems Integration AG - initial API and implementation
@@ -1261,6 +1263,13 @@ jquery__WEBPACK_IMPORTED_MODULE_4___default().extend(true, chart_js_auto__WEBPAC
1261
1263
  borderWidth: 2
1262
1264
  }
1263
1265
  }
1266
+ },
1267
+ scatter: {
1268
+ elements: {
1269
+ point: {
1270
+ radius: 3
1271
+ }
1272
+ }
1264
1273
  }
1265
1274
  });
1266
1275
  let chartJsGlobalsInitialized = false;
@@ -1325,6 +1334,7 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
1325
1334
  this._legendPointerLeaveHandler = this._onLegendLeavePointer.bind(this);
1326
1335
  this._resizeHandler = this._onResize.bind(this);
1327
1336
  this._tooltipTitleGenerator = this._generateTooltipTitle.bind(this);
1337
+ this._tooltipItemsGenerator = this._generateTooltipItems.bind(this);
1328
1338
  this._tooltipLabelGenerator = this._generateTooltipLabel.bind(this);
1329
1339
  this._tooltipLabelValueGenerator = this._generateTooltipLabelValue.bind(this);
1330
1340
  this._tooltipLabelColorGenerator = this._generateTooltipLabelColor.bind(this);
@@ -1961,7 +1971,7 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
1961
1971
  return;
1962
1972
  }
1963
1973
 
1964
- if (config.type === _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE) {
1974
+ if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(config.type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.SCATTER)) {
1965
1975
  this.onlyIntegers = config.data.datasets.every(dataset => dataset.data.every(data => _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.numbers.isInteger(data.x) && _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.numbers.isInteger(data.y)));
1966
1976
  } else {
1967
1977
  this.onlyIntegers = config.data.datasets.every(dataset => dataset.data.every(data => _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.numbers.isInteger(data)));
@@ -1978,6 +1988,7 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
1978
1988
  tooltip: {
1979
1989
  callbacks: {
1980
1990
  title: this._tooltipTitleGenerator,
1991
+ items: this._tooltipItemsGenerator,
1981
1992
  label: this._tooltipLabelGenerator,
1982
1993
  labelValue: this._tooltipLabelValueGenerator,
1983
1994
  labelColor: this._tooltipLabelColorGenerator
@@ -2006,24 +2017,23 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
2006
2017
  dataset = tooltipItem.dataset,
2007
2018
  title = [];
2008
2019
 
2009
- if (config.type === _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE) {
2020
+ if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(config.type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE)) {
2010
2021
  let xAxis = config.options.scales.x,
2011
2022
  yAxis = config.options.scales.y,
2012
- xAxisLabel = xAxis.title.text,
2013
- yAxisLabel = yAxis.title.text;
2014
- xAxisLabel = xAxisLabel ? _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.strings.encode(xAxisLabel) : ChartJsRenderer.ARROW_LEFT_RIGHT;
2015
- yAxisLabel = yAxisLabel ? _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.strings.encode(yAxisLabel) : ' ' + ChartJsRenderer.ARROW_UP_DOWN + ' ';
2023
+ axisLabels = this._getAxisLabels(config);
2024
+
2016
2025
  let xTickLabel = xAxis.ticks.callback(dataset.data[tooltipItem.dataIndex].x);
2017
2026
 
2018
2027
  if (xTickLabel) {
2019
- title.push(this._createTooltipAttribute(xAxisLabel, _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.strings.encode(xTickLabel), true));
2028
+ title.push(this._createTooltipAttribute(axisLabels.x, _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.strings.encode(xTickLabel), true));
2020
2029
  }
2021
2030
 
2022
2031
  let yTickLabel = yAxis.ticks.callback(dataset.data[tooltipItem.dataIndex].y);
2023
2032
 
2024
2033
  if (yTickLabel) {
2025
- title.push(this._createTooltipAttribute(yAxisLabel, _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.strings.encode(yTickLabel), true));
2034
+ title.push(this._createTooltipAttribute(axisLabels.y, _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.strings.encode(yTickLabel), true));
2026
2035
  }
2036
+ } else if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(config.type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.SCATTER)) {// nop, scatter has the title in the items table
2027
2037
  } else {
2028
2038
  let label = chart.data.labels[tooltipItem.dataIndex];
2029
2039
  title.push(this._createTooltipAttribute(config.options.reformatLabels ? this._formatLabel(label) : label, '', true));
@@ -2032,6 +2042,95 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
2032
2042
  return title;
2033
2043
  }
2034
2044
 
2045
+ _getAxisLabels(config) {
2046
+ let xAxisLabel = config.options.scales.x.title.text,
2047
+ yAxisLabel = config.options.scales.y.title.text;
2048
+ xAxisLabel = this._resolveAxisLabel(xAxisLabel, ChartJsRenderer.ARROW_LEFT_RIGHT);
2049
+ yAxisLabel = this._resolveAxisLabel(yAxisLabel, ' ' + ChartJsRenderer.ARROW_UP_DOWN + ' ');
2050
+ return {
2051
+ x: xAxisLabel,
2052
+ y: yAxisLabel
2053
+ };
2054
+ }
2055
+
2056
+ _resolveAxisLabel(axisLabel) {
2057
+ let defaultLabel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
2058
+
2059
+ if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.objects.isFunction(axisLabel)) {
2060
+ axisLabel = axisLabel();
2061
+ axisLabel = _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.objects.isString(axisLabel) ? axisLabel : '';
2062
+ }
2063
+
2064
+ return axisLabel ? _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.strings.encode(axisLabel) : defaultLabel;
2065
+ }
2066
+
2067
+ _generateTooltipItems(tooltipItems, tooltipLabel, tooltipLabelValue, tooltipColor) {
2068
+ if (!tooltipItems || !tooltipItems.length) {
2069
+ return '';
2070
+ }
2071
+
2072
+ let tooltipItem = tooltipItems[0],
2073
+ chart = tooltipItem.chart,
2074
+ config = chart.config,
2075
+ xAxisValues = false,
2076
+ yAxisValues = false,
2077
+ itemsText = '';
2078
+ tooltipItems.forEach(tooltipItem => {
2079
+ let {
2080
+ label,
2081
+ labelValue,
2082
+ labelColor
2083
+ } = this._getItemDetails(tooltipItem, tooltipLabel, tooltipLabelValue, tooltipColor);
2084
+
2085
+ if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(config.type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.SCATTER)) {
2086
+ xAxisValues |= _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.objects.isString(labelValue.x);
2087
+ yAxisValues |= _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.objects.isString(labelValue.y);
2088
+ itemsText += this._createTooltipScatterAttribute(label, labelValue.x, labelValue.y, false, labelColor);
2089
+ } else {
2090
+ itemsText += this._createTooltipAttribute(label, labelValue, false, labelColor);
2091
+ }
2092
+ }); // tabular representation for scatter tooltip needs an additional header and footer
2093
+
2094
+ if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(config.type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.SCATTER)) {
2095
+ let tableHeader = '<table><tbody>';
2096
+
2097
+ let axisLabels = this._getAxisLabels(config);
2098
+
2099
+ tableHeader += this._createTooltipScatterAttribute('', xAxisValues ? axisLabels.x : '', // do not show axis label if no values are shown
2100
+ yAxisValues ? axisLabels.y : '', // do not show axis label if no values are shown
2101
+ true, null);
2102
+ let tableFooter = '</tbody></table>';
2103
+ itemsText = _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.strings.box(tableHeader, itemsText, tableFooter);
2104
+ }
2105
+
2106
+ return itemsText;
2107
+ }
2108
+
2109
+ _getItemDetails(tooltipItem, tooltipLabel, tooltipLabelValue, tooltipColor) {
2110
+ let label, labelValue, labelColor;
2111
+
2112
+ if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.objects.isFunction(tooltipLabel)) {
2113
+ label = tooltipLabel(tooltipItem);
2114
+ label = _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.objects.isString(label) ? label : '';
2115
+ }
2116
+
2117
+ if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.objects.isFunction(tooltipLabelValue)) {
2118
+ labelValue = tooltipLabelValue(tooltipItem);
2119
+ labelValue = _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.objects.isString(labelValue) || _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.objects.isPlainObject(labelValue) ? labelValue : '';
2120
+ }
2121
+
2122
+ if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.objects.isFunction(tooltipColor)) {
2123
+ labelColor = tooltipColor(tooltipItem);
2124
+ labelColor = _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.objects.isPlainObject(labelColor) ? labelColor.backgroundColor || '' : '';
2125
+ }
2126
+
2127
+ return {
2128
+ label,
2129
+ labelValue,
2130
+ labelColor
2131
+ };
2132
+ }
2133
+
2035
2134
  _generateTooltipLabel(tooltipItem) {
2036
2135
  return _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.strings.encode(tooltipItem.dataset.label);
2037
2136
  }
@@ -2042,6 +2141,11 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
2042
2141
 
2043
2142
  if (config.type === _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE) {
2044
2143
  return _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.strings.encode(this._formatLabel(dataset.data[tooltipItem.dataIndex].z));
2144
+ } else if (config.type === _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.SCATTER) {
2145
+ return {
2146
+ x: _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.strings.encode(this._formatLabel(dataset.data[tooltipItem.dataIndex].x)),
2147
+ y: _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.strings.encode(this._formatLabel(dataset.data[tooltipItem.dataIndex].y))
2148
+ };
2045
2149
  }
2046
2150
 
2047
2151
  return _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.strings.encode(this._formatLabel(dataset.data[tooltipItem.dataIndex]));
@@ -2055,7 +2159,7 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
2055
2159
  borderColor,
2056
2160
  index;
2057
2161
 
2058
- if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(dataset.type || config.type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.LINE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BAR, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BAR_HORIZONTAL, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.RADAR, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE)) {
2162
+ if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(dataset.type || config.type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.LINE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BAR, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BAR_HORIZONTAL, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.RADAR, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.SCATTER)) {
2059
2163
  borderColor = dataset.borderColor;
2060
2164
  legendColor = dataset.legendColor;
2061
2165
  index = tooltipItem.datasetIndex;
@@ -2095,6 +2199,11 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
2095
2199
  return '<div class="' + cssClass + '">' + (color ? '<div class="color" style="background-color:' + color + '"></div>' : '') + (label ? '<label>' + label + '</label>' : '') + (value ? '<div class="value">' + value + '</div>' : '') + '</div>';
2096
2200
  }
2097
2201
 
2202
+ _createTooltipScatterAttribute(label, xValue, yValue, isTitle, color) {
2203
+ let cssClass = isTitle ? 'attribute title' : 'attribute';
2204
+ return '<tr class="' + cssClass + '">' + '<td class="color-cell">' + (color ? '<div class="color" style="background-color:' + color + '"></div>' : '') + '</td>' + '<td class="label">' + label + '</td>' + (xValue ? '<td class="value">' + xValue + '</td>' : '') + (yValue ? '<td class="value">' + yValue + '</td>' : '') + '</tr>';
2205
+ }
2206
+
2098
2207
  _renderTooltip(context) {
2099
2208
  let isHideTooltip = context.tooltip.opacity === 0 || context.tooltip._tooltipItems.length < 1;
2100
2209
 
@@ -2128,9 +2237,9 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
2128
2237
  }
2129
2238
 
2130
2239
  let tooltip = context.tooltip,
2131
- tooltipItems = tooltip._tooltipItems;
2240
+ dataPoints = tooltip.dataPoints;
2132
2241
 
2133
- if (tooltipItems.length < 1) {
2242
+ if (dataPoints.length < 1) {
2134
2243
  return;
2135
2244
  }
2136
2245
 
@@ -2143,37 +2252,21 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
2143
2252
  let tooltipOptions = tooltip.options || {},
2144
2253
  tooltipCallbacks = tooltipOptions.callbacks || {},
2145
2254
  tooltipTitle = tooltipCallbacks.title,
2255
+ tooltipItems = tooltipCallbacks.items,
2146
2256
  tooltipLabel = tooltipCallbacks.label,
2147
2257
  tooltipLabelValue = tooltipCallbacks.labelValue,
2148
2258
  tooltipColor = tooltipCallbacks.labelColor,
2149
2259
  tooltipText = '';
2150
2260
 
2151
2261
  if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.objects.isFunction(tooltipTitle)) {
2152
- tooltipText += _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.arrays.ensure(tooltipTitle(tooltipItems)).join('');
2262
+ tooltipText += _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.arrays.ensure(tooltipTitle(dataPoints)).join('');
2153
2263
  }
2154
2264
 
2155
- tooltipItems.forEach(tooltipItem => {
2156
- let label, labelValue, labelColor;
2157
-
2158
- if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.objects.isFunction(tooltipLabel)) {
2159
- label = tooltipLabel(tooltipItem);
2160
- label = _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.objects.isString(label) ? label : '';
2161
- }
2162
-
2163
- if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.objects.isFunction(tooltipLabelValue)) {
2164
- labelValue = tooltipLabelValue(tooltipItem);
2165
- labelValue = _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.objects.isString(labelValue) ? labelValue : '';
2166
- }
2167
-
2168
- if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.objects.isFunction(tooltipColor)) {
2169
- labelColor = tooltipColor(tooltipItem);
2170
- labelColor = _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.objects.isPlainObject(labelColor) ? labelColor.backgroundColor || '' : '';
2171
- }
2172
-
2173
- tooltipText += this._createTooltipAttribute(label, labelValue, false, labelColor);
2174
- });
2265
+ if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.objects.isFunction(tooltipItems)) {
2266
+ tooltipText += _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.arrays.ensure(tooltipItems(dataPoints, tooltipLabel, tooltipLabelValue, tooltipColor)).join('');
2267
+ }
2175
2268
 
2176
- let positionAndOffset = this._computeTooltipPositionAndOffset(tooltipItems[0]),
2269
+ let positionAndOffset = this._computeTooltipPositionAndOffset(dataPoints[0]),
2177
2270
  origin = _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.graphics.offsetBounds(this.$canvas);
2178
2271
 
2179
2272
  origin.x += tooltip.caretX + positionAndOffset.offsetX;
@@ -2260,7 +2353,7 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
2260
2353
  let angle = element.angle;
2261
2354
  tooltipPosition = 0 <= angle && angle < Math.PI ? 'bottom' : 'top';
2262
2355
  tooltipDirection = -Math.PI / 2 <= angle && angle < Math.PI / 2 ? 'right' : 'left';
2263
- } else if (config.type === _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE) {
2356
+ } else if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(config.type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.SCATTER)) {
2264
2357
  let element = chart.getDatasetMeta(datasetIndex).data[dataIndex];
2265
2358
  let chartArea = chart.chartArea,
2266
2359
  mid = chartArea.left + chartArea.width / 2;
@@ -2282,7 +2375,7 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
2282
2375
  b = width / (PHI + 1);
2283
2376
  offsetY = -height / 2;
2284
2377
  offsetX = tooltipDirection === 'left' ? b : -b;
2285
- } else if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(config.type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.LINE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.RADAR) || dataset.type === _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.LINE) {
2378
+ } else if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(config.type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.LINE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.SCATTER, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.RADAR) || dataset.type === _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.LINE) {
2286
2379
  // noinspection JSValidateTypes
2287
2380
 
2288
2381
  /**
@@ -2385,6 +2478,23 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
2385
2478
  }
2386
2479
  }
2387
2480
  }, config.options);
2481
+ } else if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(config.type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.SCATTER)) {
2482
+ config.options = jquery__WEBPACK_IMPORTED_MODULE_4___default().extend(true, {}, {
2483
+ scales: {
2484
+ x: {
2485
+ minSpaceBetweenTicks: 35,
2486
+ ticks: {
2487
+ padding: 10
2488
+ }
2489
+ },
2490
+ y: {
2491
+ minSpaceBetweenTicks: 35,
2492
+ ticks: {
2493
+ padding: 10
2494
+ }
2495
+ }
2496
+ }
2497
+ }, config.options);
2388
2498
  }
2389
2499
 
2390
2500
  this._adjustXAxis(config);
@@ -2400,7 +2510,7 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
2400
2510
  let type = config.type,
2401
2511
  scales = config.options.scales;
2402
2512
 
2403
- if (this._isHorizontalBar(config) || type === _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE) {
2513
+ if (this._isHorizontalBar(config) || _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.SCATTER)) {
2404
2514
  scales.x = jquery__WEBPACK_IMPORTED_MODULE_4___default().extend(true, {}, {
2405
2515
  beginAtZero: this._isHorizontalBar(config),
2406
2516
  offset: type === _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE,
@@ -2422,7 +2532,7 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
2422
2532
  }, scales.x);
2423
2533
  }
2424
2534
 
2425
- if (this._isHorizontalBar(config) || type === _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE || config.options.reformatLabels) {
2535
+ if (this._isHorizontalBar(config) || _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.SCATTER) || config.options.reformatLabels) {
2426
2536
  scales.x = jquery__WEBPACK_IMPORTED_MODULE_4___default().extend(true, {}, {
2427
2537
  ticks: {
2428
2538
  callback: this._xLabelFormatter
@@ -2450,7 +2560,7 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
2450
2560
  }, scales.y);
2451
2561
  } else {
2452
2562
  scales.y = jquery__WEBPACK_IMPORTED_MODULE_4___default().extend(true, {}, {
2453
- beginAtZero: type !== _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE,
2563
+ beginAtZero: !_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.SCATTER),
2454
2564
  grid: {
2455
2565
  drawBorder: false,
2456
2566
  drawTicks: false
@@ -2546,6 +2656,15 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
2546
2656
  borderRadius: 3
2547
2657
  }, plugins.datalabels);
2548
2658
  plugins.datalabels.display = 'auto';
2659
+ } else if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(config.type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.SCATTER)) {
2660
+ plugins.datalabels = jquery__WEBPACK_IMPORTED_MODULE_4___default().extend(true, {}, {
2661
+ backgroundColor: this._datalabelBackgroundColorHandler,
2662
+ borderRadius: 3,
2663
+ anchor: 'end',
2664
+ align: 'top',
2665
+ offset: 3
2666
+ }, plugins.datalabels);
2667
+ plugins.datalabels.display = 'auto';
2549
2668
  }
2550
2669
 
2551
2670
  if (config.options.reformatLabels) {
@@ -2637,7 +2756,7 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
2637
2756
  let abbreviations = [this.chart.session.text('ui.Mrd'), this.chart.session.text('ui.Bio'), this.chart.session.text('ui.Brd'), this.chart.session.text('ui.Tri'), this.chart.session.text('ui.Trd')];
2638
2757
 
2639
2758
  for (let i = 0; i < abbreviations.length; i++) {
2640
- if (abs >= 1000000) {
2759
+ if (abs >= 1000) {
2641
2760
  abs = abs / 1000;
2642
2761
  abbreviation = ' ' + abbreviations[i];
2643
2762
  } else {
@@ -2787,6 +2906,8 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
2787
2906
  _formatDatalabels(value, context) {
2788
2907
  if (context.chart.config.type === _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE) {
2789
2908
  return this._formatLabel(value.z);
2909
+ } else if (context.chart.config.type === _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.SCATTER) {
2910
+ return _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.strings.join(' / ', this._formatLabel(value.x), this._formatLabel(value.y));
2790
2911
  }
2791
2912
 
2792
2913
  return this._formatLabel(value);
@@ -2872,7 +2993,7 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
2872
2993
  if (checkable) {
2873
2994
  let datasetLength = elem.data.length;
2874
2995
 
2875
- if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.PIE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.DOUGHNUT, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.POLAR_AREA, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE) || type === _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BAR && (elem.type || _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BAR) === _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BAR) {
2996
+ if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.PIE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.DOUGHNUT, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.POLAR_AREA, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.SCATTER) || type === _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BAR && (elem.type || _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BAR) === _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BAR) {
2876
2997
  let uncheckedBackgroundColor = multipleColorsPerDataset ? colors.backgroundColors : _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.arrays.init(datasetLength, colors.backgroundColors[idx]),
2877
2998
  uncheckedHoverBackgroundColor = multipleColorsPerDataset ? colors.hoverBackgroundColors : _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.arrays.init(datasetLength, colors.hoverBackgroundColors[idx]),
2878
2999
  checkedBackgroundColor = multipleColorsPerDataset ? colors.checkedBackgroundColors : _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.arrays.init(datasetLength, colors.checkedBackgroundColors[idx]),
@@ -3076,7 +3197,7 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
3076
3197
  checkedBackgroundOpacity = 0.2;
3077
3198
  checkedHoverBackgroundOpacity = 0.35;
3078
3199
  checkedHoverBackgroundDarker = 0;
3079
- } else if (type === _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE) {
3200
+ } else if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.SCATTER)) {
3080
3201
  backgroundOpacity = 0.2;
3081
3202
  hoverBackgroundOpacity = 0.35;
3082
3203
  hoverBackgroundDarker = 0;
@@ -3196,7 +3317,7 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
3196
3317
  borderColor,
3197
3318
  backgroundColor;
3198
3319
 
3199
- if (dataset && _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(dataset.type || config.type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.LINE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BAR, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.RADAR, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE)) {
3320
+ if (dataset && _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(dataset.type || config.type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.LINE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BAR, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.RADAR, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.SCATTER)) {
3200
3321
  legendColor = dataset.legendColor;
3201
3322
  borderColor = this._adjustColorOpacity(dataset.borderColor, 1);
3202
3323
  } else if (data.datasets.length && _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(config.type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.PIE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.DOUGHNUT, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.POLAR_AREA)) {
@@ -3372,7 +3493,7 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
3372
3493
  dataIndex: itemIndex
3373
3494
  };
3374
3495
 
3375
- if (this.chartJs.config.type === _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE) {
3496
+ if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(this.chartJs.config.type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.SCATTER)) {
3376
3497
  let data = this.chartJs.config.data.datasets[datasetIndex].data[itemIndex];
3377
3498
  clickObject.xIndex = data.x;
3378
3499
  clickObject.yIndex = data.y;
@@ -3607,7 +3728,7 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
3607
3728
  dataset = datasets ? datasets[datasetIndex] : null,
3608
3729
  datasetType = dataset ? dataset.type : null;
3609
3730
 
3610
- if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.LINE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.PIE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.DOUGHNUT, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.POLAR_AREA) || datasetType === _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.LINE) {
3731
+ if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.LINE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.PIE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.DOUGHNUT, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.POLAR_AREA, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.SCATTER) || datasetType === _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.LINE) {
3611
3732
  mode = 'point';
3612
3733
  } else {
3613
3734
  mode = 'dataset';
@@ -3669,7 +3790,7 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
3669
3790
  }
3670
3791
  }));
3671
3792
 
3672
- let maxMinR = this._computeMaxMinValue(datasets, 'r', true),
3793
+ let maxMinR = this._computeMaxMinValue(config, datasets, 'r', true),
3673
3794
  maxR = maxMinR.maxValue,
3674
3795
  minR = maxMinR.minValue,
3675
3796
  // Compute a scalingFactor and an offset to get the new radius newR = r * scalingFactor + offset.
@@ -3723,33 +3844,39 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
3723
3844
  }));
3724
3845
  }
3725
3846
 
3726
- _computeMaxMinValue(datasets, identifier, exact, boundRange, padding, space) {
3847
+ _computeMaxMinValue(config, datasets, identifier, exact, boundRange, padding, space) {
3727
3848
  if (!datasets) {
3728
3849
  return;
3729
3850
  }
3730
3851
 
3731
3852
  let maxValue, minValue;
3732
3853
 
3733
- for (let i = 0; i < datasets.length; i++) {
3734
- for (let j = 0; j < datasets[i].data.length; j++) {
3735
- let value;
3854
+ if (config.type === _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.SCATTER && identifier === 'r') {
3855
+ // do not move the grid boundaries because of the radii of the points (would look weird)
3856
+ maxValue = 0;
3857
+ minValue = 0;
3858
+ } else {
3859
+ for (let i = 0; i < datasets.length; i++) {
3860
+ for (let j = 0; j < datasets[i].data.length; j++) {
3861
+ let value;
3736
3862
 
3737
- if (identifier) {
3738
- value = datasets[i].data[j][identifier];
3739
- } else {
3740
- value = datasets[i].data[j];
3741
- }
3863
+ if (identifier) {
3864
+ value = datasets[i].data[j][identifier];
3865
+ } else {
3866
+ value = datasets[i].data[j];
3867
+ }
3742
3868
 
3743
- if (isNaN(maxValue)) {
3744
- maxValue = value;
3745
- } else {
3746
- maxValue = Math.max(value, maxValue);
3747
- }
3869
+ if (isNaN(maxValue)) {
3870
+ maxValue = value;
3871
+ } else {
3872
+ maxValue = Math.max(value, maxValue);
3873
+ }
3748
3874
 
3749
- if (isNaN(minValue)) {
3750
- minValue = value;
3751
- } else {
3752
- minValue = Math.min(value, minValue);
3875
+ if (isNaN(minValue)) {
3876
+ minValue = value;
3877
+ } else {
3878
+ minValue = Math.min(value, minValue);
3879
+ }
3753
3880
  }
3754
3881
  }
3755
3882
  }
@@ -3842,7 +3969,7 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
3842
3969
 
3843
3970
  let type = config.type;
3844
3971
 
3845
- if (!_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BAR, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.LINE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.POLAR_AREA, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.RADAR, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE)) {
3972
+ if (!_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BAR, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.LINE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.POLAR_AREA, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.RADAR, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.SCATTER)) {
3846
3973
  return;
3847
3974
  }
3848
3975
 
@@ -3883,17 +4010,17 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
3883
4010
  this._adjustAxisMaxMin(yAxis, maxYTicks, yBoundary);
3884
4011
  }
3885
4012
 
3886
- if (type !== _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE) {
4013
+ if (!_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.SCATTER)) {
3887
4014
  return;
3888
4015
  }
3889
4016
 
3890
- let xBoundary = this._computeXBoundaryBubble(config, width);
4017
+ let xBoundary = this._computeXBoundaryPointElement(config, width);
3891
4018
 
3892
4019
  this._adjustAxisMaxMin(xAxis, maxXTicks, xBoundary);
3893
4020
  }
3894
4021
 
3895
- _computeBoundaryBubble(config, identifier, space) {
3896
- if (!config || !config.type || config.type !== _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE || !config.data || !config.options || !config.options.scales || !(identifier === 'x' || identifier === 'y') || !space) {
4022
+ _computeBoundaryPointElement(config, identifier, space) {
4023
+ if (!config || !config.type || !_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(config.type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.SCATTER) || !config.data || !config.options || !config.options.scales || !(identifier === 'x' || identifier === 'y') || !space) {
3897
4024
  return;
3898
4025
  }
3899
4026
 
@@ -3903,7 +4030,7 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
3903
4030
  labelMap = config.options[identifier + 'LabelMap'],
3904
4031
  boundary;
3905
4032
 
3906
- let maxR = this._computeMaxMinValue(datasets, 'r', true).maxValue,
4033
+ let maxR = this._computeMaxMinValue(config, datasets, 'r', true).maxValue,
3907
4034
  padding = maxR;
3908
4035
 
3909
4036
  if (config.options.elements && config.options.elements.point && config.options.elements.point.hoverRadius) {
@@ -3911,9 +4038,9 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
3911
4038
  }
3912
4039
 
3913
4040
  if (offset) {
3914
- boundary = this._computeMaxMinValue(datasets, identifier, labelMap, true);
4041
+ boundary = this._computeMaxMinValue(config, datasets, identifier, labelMap, true);
3915
4042
  } else {
3916
- boundary = this._computeMaxMinValue(datasets, identifier, labelMap, true, padding, space);
4043
+ boundary = this._computeMaxMinValue(config, datasets, identifier, labelMap, true, padding, space);
3917
4044
  }
3918
4045
 
3919
4046
  if (labelMap) {
@@ -3924,12 +4051,12 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
3924
4051
  return boundary;
3925
4052
  }
3926
4053
 
3927
- _computeXBoundaryBubble(config, width) {
3928
- return this._computeBoundaryBubble(config, 'x', width);
4054
+ _computeXBoundaryPointElement(config, width) {
4055
+ return this._computeBoundaryPointElement(config, 'x', width);
3929
4056
  }
3930
4057
 
3931
- _computeYBoundaryBubble(config, height) {
3932
- return this._computeBoundaryBubble(config, 'y', height);
4058
+ _computeYBoundaryPointElement(config, height) {
4059
+ return this._computeBoundaryPointElement(config, 'y', height);
3933
4060
  }
3934
4061
 
3935
4062
  _computeYBoundaries(config, height) {
@@ -3941,8 +4068,8 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
3941
4068
  yBoundary,
3942
4069
  yBoundaryDiffType;
3943
4070
 
3944
- if (type === _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE) {
3945
- yBoundary = this._computeYBoundaryBubble(config, height);
4071
+ if (_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.scout.isOneOf(type, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.BUBBLE, _index__WEBPACK_IMPORTED_MODULE_0__.Chart.Type.SCATTER)) {
4072
+ yBoundary = this._computeYBoundaryPointElement(config, height);
3946
4073
  } else {
3947
4074
  let datasets = [],
3948
4075
  datasetsDiffType = [];
@@ -3957,10 +4084,10 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
3957
4084
  });
3958
4085
  }
3959
4086
 
3960
- yBoundary = this._computeMaxMinValue(datasets);
4087
+ yBoundary = this._computeMaxMinValue(config, datasets);
3961
4088
 
3962
4089
  if (datasets.length && datasetsDiffType.length) {
3963
- yBoundaryDiffType = this._computeMaxMinValue(datasetsDiffType);
4090
+ yBoundaryDiffType = this._computeMaxMinValue(config, datasetsDiffType);
3964
4091
  let yBoundaryRange = yBoundary.maxValue - yBoundary.minValue,
3965
4092
  yBoundaryRangeDiffType = yBoundaryDiffType.maxValue - yBoundaryDiffType.minValue;
3966
4093