@eclipse-scout/chart 22.0.0 → 22.0.10

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.
@@ -2196,16 +2196,28 @@ class ChartJsRenderer extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractChartR
2196
2196
 
2197
2197
  this._tooltip.$container.css('pointer-events', 'none');
2198
2198
 
2199
+ let reposition = false;
2200
+
2199
2201
  if ((tooltipOptions.titleFont || {}).family) {
2200
2202
  this._tooltip.$container.css('--chart-tooltip-font-family', tooltipOptions.titleFont.family);
2203
+
2204
+ reposition = true;
2201
2205
  }
2202
2206
 
2203
2207
  let maxLabelPrefSize = 0;
2204
2208
 
2205
- this._tooltip.$container.find('label').each((idx, elem) => maxLabelPrefSize = Math.max(maxLabelPrefSize, _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.graphics.prefSize(jquery__WEBPACK_IMPORTED_MODULE_4___default()(elem)).width));
2209
+ this._tooltip.$container.find('label').each((idx, elem) => {
2210
+ maxLabelPrefSize = Math.max(maxLabelPrefSize, _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_2__.graphics.prefSize(jquery__WEBPACK_IMPORTED_MODULE_4___default()(elem)).width);
2211
+ });
2206
2212
 
2207
2213
  if (maxLabelPrefSize > 0) {
2208
2214
  this._tooltip.$container.css('--chart-tooltip-label-width', Math.min(maxLabelPrefSize, 120) + 'px');
2215
+
2216
+ reposition = true;
2217
+ }
2218
+
2219
+ if (reposition) {
2220
+ this._tooltip.position();
2209
2221
  }
2210
2222
  }
2211
2223