@sapui5/sap.suite.ui.microchart 1.119.1 → 1.120.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.
Files changed (33) hide show
  1. package/package.json +1 -1
  2. package/src/sap/suite/ui/microchart/.library +1 -1
  3. package/src/sap/suite/ui/microchart/AreaMicroChart.js +14 -40
  4. package/src/sap/suite/ui/microchart/AreaMicroChartItem.js +1 -1
  5. package/src/sap/suite/ui/microchart/AreaMicroChartLabel.js +1 -1
  6. package/src/sap/suite/ui/microchart/AreaMicroChartPoint.js +1 -1
  7. package/src/sap/suite/ui/microchart/BulletMicroChart.js +14 -40
  8. package/src/sap/suite/ui/microchart/BulletMicroChartData.js +1 -1
  9. package/src/sap/suite/ui/microchart/ColumnMicroChart.js +9 -38
  10. package/src/sap/suite/ui/microchart/ColumnMicroChartData.js +1 -1
  11. package/src/sap/suite/ui/microchart/ColumnMicroChartLabel.js +1 -1
  12. package/src/sap/suite/ui/microchart/ComparisonMicroChart.js +12 -41
  13. package/src/sap/suite/ui/microchart/ComparisonMicroChartData.js +1 -1
  14. package/src/sap/suite/ui/microchart/DeltaMicroChart.js +12 -39
  15. package/src/sap/suite/ui/microchart/HarveyBallMicroChart.js +10 -40
  16. package/src/sap/suite/ui/microchart/HarveyBallMicroChartItem.js +1 -1
  17. package/src/sap/suite/ui/microchart/InteractiveBarChart.js +11 -15
  18. package/src/sap/suite/ui/microchart/InteractiveBarChartBar.js +4 -4
  19. package/src/sap/suite/ui/microchart/InteractiveDonutChart.js +9 -13
  20. package/src/sap/suite/ui/microchart/InteractiveDonutChartSegment.js +3 -3
  21. package/src/sap/suite/ui/microchart/InteractiveLineChart.js +11 -13
  22. package/src/sap/suite/ui/microchart/InteractiveLineChartPoint.js +4 -4
  23. package/src/sap/suite/ui/microchart/LineMicroChart.js +10 -17
  24. package/src/sap/suite/ui/microchart/LineMicroChartEmphasizedPoint.js +1 -1
  25. package/src/sap/suite/ui/microchart/LineMicroChartLine.js +1 -1
  26. package/src/sap/suite/ui/microchart/LineMicroChartPoint.js +1 -1
  27. package/src/sap/suite/ui/microchart/MicroChartRenderUtils.js +2 -4
  28. package/src/sap/suite/ui/microchart/RadialMicroChart.js +12 -18
  29. package/src/sap/suite/ui/microchart/StackedBarMicroChart.js +11 -14
  30. package/src/sap/suite/ui/microchart/StackedBarMicroChartBar.js +1 -1
  31. package/src/sap/suite/ui/microchart/library.js +5 -4
  32. package/src/sap/suite/ui/microchart/messagebundle_mk.properties +75 -0
  33. package/src/sap/suite/ui/microchart/messagebundle_sh.properties +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.suite.ui.microchart",
3
- "version": "1.119.1",
3
+ "version": "1.120.0",
4
4
  "description": "SAPUI5 Library sap.suite.ui.microchart",
5
5
  "homepage": "https://sap.github.io/ui5-tooling/pages/SAPUI5/",
6
6
  "author": "SAP SE (https://www.sap.com)",
@@ -5,7 +5,7 @@
5
5
  <vendor>SAP SE</vendor>
6
6
  <copyright>SAPUI5
7
7
  * (c) Copyright 2009-2023 SAP SE. All rights reserved.</copyright>
8
- <version>1.119.1</version>
8
+ <version>1.120.0</version>
9
9
 
10
10
  <documentation>UI5 library: sap.suite.ui.microchart</documentation>
11
11
 
@@ -13,13 +13,15 @@ sap.ui.define([
13
13
  "sap/ui/core/theming/Parameters",
14
14
  "sap/m/library",
15
15
  "sap/ui/core/ResizeHandler",
16
- "./AreaMicroChartRenderer"
16
+ "./AreaMicroChartRenderer",
17
+ "sap/ui/core/Core",
18
+ "sap/ui/core/Theming",
19
+ "sap/base/i18n/Localization"
17
20
  ], function(library, Control, FlexBox, MicroChartUtils, Log, KeyCodes, Parameters, MobileLibrary,
18
- ResizeHandler, AreaMicroChartRenderer) {
21
+ ResizeHandler, AreaMicroChartRenderer, Core, Theming, Localization) {
19
22
  "use strict";
20
23
 
21
24
  var ValueColor = MobileLibrary.ValueColor;
22
- var Size = MobileLibrary.Size;
23
25
  var AreaMicroChartViewType = library.AreaMicroChartViewType;
24
26
 
25
27
  /**
@@ -33,7 +35,7 @@ sap.ui.define([
33
35
  * @extends sap.ui.core.Control
34
36
  *
35
37
  * @author SAP SE
36
- * @version 1.119.1
38
+ * @version 1.120.0
37
39
  * @since 1.34
38
40
  *
39
41
  * @public
@@ -216,15 +218,10 @@ sap.ui.define([
216
218
  AreaMicroChart._CHARTITEM_AGGREGATIONS = ["chart", "target", "minThreshold", "maxThreshold", "innerMinThreshold", "innerMaxThreshold"];
217
219
 
218
220
  AreaMicroChart.prototype.init = function() {
219
- this._oRb = sap.ui.getCore().getLibraryResourceBundle("sap.suite.ui.microchart");
221
+ this._oRb = Core.getLibraryResourceBundle("sap.suite.ui.microchart");
220
222
  this.setAggregation("tooltip", "((AltText))", true);
221
- this._bThemeApplied = true;
222
- if (!sap.ui.getCore().isInitialized()) {
223
- this._bThemeApplied = false;
224
- sap.ui.getCore().attachInit(this._handleCoreInitialized.bind(this));
225
- } else {
226
- this._handleCoreInitialized();
227
- }
223
+ this._bThemeApplied = false;
224
+ Core.ready(this._handleCoreInitialized.bind(this));
228
225
  };
229
226
 
230
227
  /**
@@ -235,9 +232,8 @@ sap.ui.define([
235
232
  * @private
236
233
  */
237
234
  AreaMicroChart.prototype._handleCoreInitialized = function() {
238
- this._bThemeApplied = sap.ui.getCore().isThemeApplied();
239
- sap.ui.getCore().attachThemeChanged(this._handleThemeApplied, this);
240
- sap.ui.getCore().attachLocalizationChanged(this._handleThemeApplied, this); // rerender when RTL is changed
235
+ Theming.attachApplied(this._handleThemeApplied.bind(this));
236
+ Localization.attachChange(this._handleThemeApplied.bind(this)); // rerender when RTL is changed
241
237
  };
242
238
 
243
239
  /**
@@ -765,7 +761,7 @@ sap.ui.define([
765
761
  }
766
762
 
767
763
  function calculateCoordinates(line) {
768
- var bRtl = sap.ui.getCore().getConfiguration().getRTL();
764
+ var bRtl = Core.getConfiguration().getRTL();
769
765
 
770
766
  var fnCalcX = function(fValue) {
771
767
  var x = kx * (fValue - fMinX);
@@ -919,33 +915,11 @@ sap.ui.define([
919
915
 
920
916
  AreaMicroChart.prototype.setSize = function(sSize) {
921
917
  if (this.getSize() !== sSize) {
922
- if (sSize === Size.Responsive) {
923
- this.setProperty("isResponsive", true);
924
- } else {
925
- this.setProperty("isResponsive", false);
926
- }
927
918
  this.setProperty("size", sSize);
928
919
  }
929
920
  return this;
930
921
  };
931
922
 
932
- // for backward compatibilty
933
- AreaMicroChart.prototype.setIsResponsive = function(bIsResponsive) {
934
- var sSize,
935
- sCurrentSize = this.getSize();
936
-
937
- this.setProperty("isResponsive", bIsResponsive);
938
-
939
- if (bIsResponsive) {
940
- sSize = Size.Responsive;
941
- } else {
942
- sSize = sCurrentSize === Size.Responsive ? Size.Auto : sCurrentSize;
943
- }
944
-
945
- this.setProperty("size", sSize);
946
- return this;
947
- };
948
-
949
923
  /**
950
924
  * Callback function which is called when the control is visible, which means that the check via
951
925
  * library._checkControlIsVisible was successful.
@@ -1207,8 +1181,8 @@ sap.ui.define([
1207
1181
 
1208
1182
  AreaMicroChart.prototype.exit = function() {
1209
1183
  ResizeHandler.deregister(this._sChartResizeHandlerId);
1210
- sap.ui.getCore().detachThemeChanged(this._handleThemeApplied, this);
1211
- sap.ui.getCore().detachLocalizationChanged(this._handleThemeApplied, this);
1184
+ Theming.attachApplied(this._handleThemeApplied.bind(this));
1185
+ Localization.detachChange(this._handleThemeApplied.bind(this));
1212
1186
  };
1213
1187
 
1214
1188
  /**
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  * @extends sap.ui.core.Element
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.119.1
23
+ * @version 1.120.0
24
24
  * @since 1.34
25
25
  *
26
26
  * @public
@@ -17,7 +17,7 @@ sap.ui.define(['./library', 'sap/ui/core/Element'],
17
17
  * Displays or hides the labels for start and end dates, start and end values, and minimum and maximum values.
18
18
  * @extends sap.ui.core.Element
19
19
  *
20
- * @version 1.119.1
20
+ * @version 1.120.0
21
21
  * @since 1.34
22
22
  *
23
23
  * @public
@@ -18,7 +18,7 @@ sap.ui.define(['./library', 'sap/ui/core/Element'],
18
18
  * @extends sap.ui.core.Element
19
19
  *
20
20
  * @author SAP SE
21
- * @version 1.119.1
21
+ * @version 1.120.0
22
22
  * @since 1.34
23
23
  *
24
24
  * @public
@@ -11,7 +11,9 @@ sap.ui.define([
11
11
  "sap/ui/core/ResizeHandler",
12
12
  "sap/ui/events/KeyCodes",
13
13
  "sap/suite/ui/microchart/MicroChartUtils",
14
- "./BulletMicroChartRenderer"
14
+ "./BulletMicroChartRenderer",
15
+ "sap/ui/core/Core",
16
+ "sap/ui/core/Theming"
15
17
  ], function(
16
18
  library,
17
19
  MobileLibrary,
@@ -20,7 +22,9 @@ sap.ui.define([
20
22
  ResizeHandler,
21
23
  KeyCodes,
22
24
  MicroChartUtils,
23
- BulletMicroChartRenderer
25
+ BulletMicroChartRenderer,
26
+ Core,
27
+ Theming
24
28
  ) {
25
29
  "use strict";
26
30
 
@@ -38,7 +42,7 @@ sap.ui.define([
38
42
  * <br>Note: You can assign a custom tooltip for this microchart. The custom tooltip can be set using expression binding. When no custom tooltip is defined, the tooltip is generated automatically based on the logic described in {@link sap.ui.core.Element#getTooltip_AsString}. For a combination of a generated and a custom tooltip, use <code>((AltText))</code> inside of the tooltip string. The aggregated data of the microchart can also be customized.
39
43
  * @extends sap.ui.core.Control
40
44
  *
41
- * @version 1.119.1
45
+ * @version 1.120.0
42
46
  * @since 1.34
43
47
  *
44
48
  * @public
@@ -206,15 +210,10 @@ sap.ui.define([
206
210
  BulletMicroChart.THRESHOLD_THRESHOLDS = 6;
207
211
 
208
212
  BulletMicroChart.prototype.init = function() {
209
- this._oRb = sap.ui.getCore().getLibraryResourceBundle("sap.suite.ui.microchart");
213
+ this._oRb = Core.getLibraryResourceBundle("sap.suite.ui.microchart");
210
214
  this.setAggregation("tooltip", "((AltText))", true);
211
- this._bThemeApplied = true;
212
- if (!sap.ui.getCore().isInitialized()) {
213
- this._bThemeApplied = false;
214
- sap.ui.getCore().attachInit(this._handleCoreInitialized.bind(this));
215
- } else {
216
- this._handleCoreInitialized();
217
- }
215
+ this._bThemeApplied = false;
216
+ Core.ready(this._handleCoreInitialized.bind(this));
218
217
  };
219
218
 
220
219
  /**
@@ -225,10 +224,7 @@ sap.ui.define([
225
224
  * @private
226
225
  */
227
226
  BulletMicroChart.prototype._handleCoreInitialized = function() {
228
- this._bThemeApplied = sap.ui.getCore().isThemeApplied();
229
- if (!this._bThemeApplied) {
230
- sap.ui.getCore().attachThemeChanged(this._handleThemeApplied, this);
231
- }
227
+ Theming.attachApplied(this._handleThemeApplied.bind(this));
232
228
  };
233
229
 
234
230
  /**
@@ -240,7 +236,7 @@ sap.ui.define([
240
236
  BulletMicroChart.prototype._handleThemeApplied = function() {
241
237
  this._bThemeApplied = true;
242
238
  this.invalidate();
243
- sap.ui.getCore().detachThemeChanged(this._handleThemeApplied, this);
239
+ Theming.detachApplied(this._handleThemeApplied.bind(this));
244
240
  };
245
241
 
246
242
  /**
@@ -369,33 +365,11 @@ sap.ui.define([
369
365
 
370
366
  BulletMicroChart.prototype.setSize = function(size) {
371
367
  if (this.getSize() !== size) {
372
- if (size === Size.Responsive) {
373
- this.setProperty("isResponsive", true);
374
- } else {
375
- this.setProperty("isResponsive", false);
376
- }
377
368
  this.setProperty("size", size, false);
378
369
  }
379
370
  return this;
380
371
  };
381
372
 
382
- // for backward compatibilty
383
- BulletMicroChart.prototype.setIsResponsive = function(bIsResponsive) {
384
- var sSize,
385
- sCurrentSize = this.getSize();
386
-
387
- this.setProperty("isResponsive", bIsResponsive);
388
-
389
- if (bIsResponsive) {
390
- sSize = Size.Responsive;
391
- } else {
392
- sSize = sCurrentSize === Size.Responsive ? Size.Auto : sCurrentSize;
393
- }
394
-
395
- this.setProperty("size", sSize);
396
- return this;
397
- };
398
-
399
373
  BulletMicroChart.prototype.ontap = function(oEvent) {
400
374
  this.firePress();
401
375
  };
@@ -517,7 +491,7 @@ sap.ui.define([
517
491
  };
518
492
 
519
493
  BulletMicroChart.prototype._adjustLabelsPos = function() {
520
- var bRtl = sap.ui.getCore().getConfiguration().getRTL();
494
+ var bRtl = Core.getConfiguration().getRTL();
521
495
  var oTBarVal = this.$("bc-target-bar-value");
522
496
  var oChartBar = this.$("chart-bar");
523
497
  var fFullWidth = oChartBar.width();
@@ -582,7 +556,7 @@ sap.ui.define([
582
556
  var fMarkerWidth = oMarker.width();
583
557
  var fMarkerLeft = oMarker.offset().left;
584
558
 
585
- if (sap.ui.getCore().getConfiguration().getRTL()) {
559
+ if (Core.getConfiguration().getRTL()) {
586
560
  if (fMarkerLeft < fValueLeft) { // browser's subpixel problem fix
587
561
  oMarker.css("right", "");
588
562
  oMarker.offset({left: fValueLeft});
@@ -17,7 +17,7 @@ sap.ui.define(['./library', 'sap/ui/core/Element'],
17
17
  * Contains the thresholds data.
18
18
  * @extends sap.ui.core.Element
19
19
  *
20
- * @version 1.119.1
20
+ * @version 1.120.0
21
21
  * @since 1.34
22
22
  *
23
23
  * @constructor
@@ -14,8 +14,9 @@ sap.ui.define([
14
14
  "sap/m/library",
15
15
  "./ColumnMicroChartRenderer",
16
16
  // jQuery custom selectors ":focusable"
17
- "sap/ui/dom/jquery/Selectors"
18
- ], function(library, Control, ResizeHandler, Log, KeyCodes, MicroChartUtils, mobileLibrary, ColumnMicroChartRenderer) {
17
+ "sap/ui/core/Core",
18
+ "sap/ui/core/Theming"
19
+ ], function(library, Control, ResizeHandler, Log, KeyCodes, MicroChartUtils, mobileLibrary, ColumnMicroChartRenderer, Core, Theming) {
19
20
  "use strict";
20
21
 
21
22
  // shortcut for sap.m.Size
@@ -36,7 +37,7 @@ sap.ui.define([
36
37
  * @extends sap.ui.core.Control
37
38
  *
38
39
  * @author SAP SE
39
- * @version 1.119.1
40
+ * @version 1.120.0
40
41
  * @since 1.34
41
42
  *
42
43
  * @public
@@ -147,15 +148,10 @@ sap.ui.define([
147
148
  ColumnMicroChart.THRESHOLD_WIDTH_NO_LABEL = 6;
148
149
 
149
150
  ColumnMicroChart.prototype.init = function(){
150
- this._oRb = sap.ui.getCore().getLibraryResourceBundle("sap.suite.ui.microchart");
151
+ this._oRb = Core.getLibraryResourceBundle("sap.suite.ui.microchart");
151
152
  this.setAggregation("tooltip", "((AltText))", true);
152
- this._bThemeApplied = true;
153
- if (!sap.ui.getCore().isInitialized()) {
154
- this._bThemeApplied = false;
155
- sap.ui.getCore().attachInit(this._handleCoreInitialized.bind(this));
156
- } else {
157
- this._handleCoreInitialized();
158
- }
153
+ this._bThemeApplied = false;
154
+ Core.ready(this._handleCoreInitialized.bind(this));
159
155
  };
160
156
 
161
157
  /**
@@ -165,10 +161,7 @@ sap.ui.define([
165
161
  * @private
166
162
  */
167
163
  ColumnMicroChart.prototype._handleCoreInitialized = function() {
168
- this._bThemeApplied = sap.ui.getCore().isThemeApplied();
169
- if (!this._bThemeApplied) {
170
- sap.ui.getCore().attachThemeChanged(this._handleThemeApplied, this);
171
- }
164
+ Theming.attachApplied(this._handleThemeApplied.bind(this));
172
165
  };
173
166
 
174
167
  /**
@@ -180,7 +173,7 @@ sap.ui.define([
180
173
  ColumnMicroChart.prototype._handleThemeApplied = function() {
181
174
  this._bThemeApplied = true;
182
175
  this.invalidate();
183
- sap.ui.getCore().detachThemeChanged(this._handleThemeApplied, this);
176
+ Theming.detachApplied(this._handleThemeApplied.bind(this));
184
177
  };
185
178
 
186
179
  ColumnMicroChart.prototype.onBeforeRendering = function() {
@@ -405,33 +398,11 @@ sap.ui.define([
405
398
 
406
399
  ColumnMicroChart.prototype.setSize = function(size) {
407
400
  if (this.getSize() !== size) {
408
- if (size === Size.Responsive) {
409
- this.setProperty("isResponsive", true);
410
- } else {
411
- this.setProperty("isResponsive", false);
412
- }
413
401
  this.setProperty("size", size, false);
414
402
  }
415
403
  return this;
416
404
  };
417
405
 
418
- // for backward compatibilty
419
- ColumnMicroChart.prototype.setIsResponsive = function(bIsResponsive) {
420
- var sSize,
421
- sCurrentSize = this.getSize();
422
-
423
- this.setProperty("isResponsive", bIsResponsive);
424
-
425
- if (bIsResponsive) {
426
- sSize = Size.Responsive;
427
- } else {
428
- sSize = sCurrentSize === Size.Responsive ? Size.Auto : sCurrentSize;
429
- }
430
-
431
- this.setProperty("size", sSize);
432
- return this;
433
- };
434
-
435
406
  ColumnMicroChart.prototype._getAltHeaderText = function(bIsActive) {
436
407
  var sAltText = this._oRb.getText("COLUMNMICROCHART");
437
408
 
@@ -17,7 +17,7 @@ sap.ui.define(['./library', 'sap/ui/core/Element'],
17
17
  * Defines the column chart data.
18
18
  * @extends sap.ui.core.Element
19
19
  *
20
- * @version 1.119.1
20
+ * @version 1.120.0
21
21
  * @since 1.34
22
22
  *
23
23
  * @public
@@ -18,7 +18,7 @@ sap.ui.define(['./library', 'sap/ui/core/Element'],
18
18
  * Displays or hides the labels of a column micro chart.
19
19
  * @extends sap.ui.core.Element
20
20
  *
21
- * @version 1.119.1
21
+ * @version 1.120.0
22
22
  * @since 1.34
23
23
  *
24
24
  * @public
@@ -12,8 +12,10 @@ sap.ui.define([
12
12
  "sap/suite/ui/microchart/MicroChartUtils",
13
13
  "sap/m/library",
14
14
  "sap/ui/core/ResizeHandler",
15
- "./ComparisonMicroChartRenderer"
16
- ], function(jQuery, library, Control, Device, FlexBox, MicroChartUtils, mobileLibrary, ResizeHandler, ComparisonMicroChartRenderer) {
15
+ "./ComparisonMicroChartRenderer",
16
+ "sap/ui/core/Core",
17
+ "sap/ui/core/Theming"
18
+ ], function(jQuery, library, Control, Device, FlexBox, MicroChartUtils, mobileLibrary, ResizeHandler, ComparisonMicroChartRenderer, Core, Theming) {
17
19
  "use strict";
18
20
 
19
21
  // shortcut for sap.m.ValueColor
@@ -33,7 +35,7 @@ sap.ui.define([
33
35
  * <br>Note: You can assign a custom tooltip for this microchart. The custom tooltip can be set using expression binding. When no custom tooltip is defined, the tooltip is generated automatically based on the logic described in {@link sap.ui.core.Element#getTooltip_AsString}. For a combination of a generated and a custom tooltip, use <code>((AltText))</code> inside of the tooltip string. The aggregated data of the microchart can also be customized.
34
36
  * @extends sap.ui.core.Control
35
37
  *
36
- * @version 1.119.1
38
+ * @version 1.120.0
37
39
  * @since 1.34
38
40
  *
39
41
  * @public
@@ -266,50 +268,22 @@ sap.ui.define([
266
268
 
267
269
  ComparisonMicroChart.prototype.setSize = function(size) {
268
270
  if (this.getSize() !== size) {
269
- if (size === Size.Responsive) {
270
- this.setProperty("isResponsive", true);
271
- } else {
272
- this.setProperty("isResponsive", false);
273
- }
274
271
  this.setProperty("size", size, false);
275
272
  }
276
273
  return this;
277
274
  };
278
275
 
279
- // for backward compatibilty
280
- ComparisonMicroChart.prototype.setIsResponsive = function(bIsResponsive) {
281
- var sSize,
282
- sCurrentSize = this.getSize();
283
-
284
- this.setProperty("isResponsive", bIsResponsive);
285
-
286
- if (bIsResponsive) {
287
- sSize = Size.Responsive;
288
- } else {
289
- sSize = sCurrentSize === Size.Responsive ? Size.Auto : sCurrentSize;
290
- }
291
-
292
- this.setProperty("size", sSize);
293
- return this;
294
- };
295
-
296
-
297
276
  /* =========================================================== */
298
277
  /* Protected methods */
299
278
  /* =========================================================== */
300
279
 
301
280
  ComparisonMicroChart.prototype.init = function() {
302
- this._oRb = sap.ui.getCore().getLibraryResourceBundle("sap.suite.ui.microchart");
281
+ this._oRb = Core.getLibraryResourceBundle("sap.suite.ui.microchart");
303
282
  this.setAggregation("tooltip", "((AltText))", true);
304
283
  this._isMinValueSet = false;
305
284
  this._isMaxValueSet = false;
306
- this._bThemeApplied = true;
307
- if (!sap.ui.getCore().isInitialized()) {
308
- this._bThemeApplied = false;
309
- sap.ui.getCore().attachInit(this._handleCoreInitialized.bind(this));
310
- } else {
311
- this._handleCoreInitialized();
312
- }
285
+ this._bThemeApplied = false;
286
+ Core.ready(this._handleCoreInitialized.bind(this));
313
287
  };
314
288
 
315
289
  /**
@@ -320,10 +294,7 @@ sap.ui.define([
320
294
  * @private
321
295
  */
322
296
  ComparisonMicroChart.prototype._handleCoreInitialized = function() {
323
- this._bThemeApplied = sap.ui.getCore().isThemeApplied();
324
- if (!this._bThemeApplied) {
325
- sap.ui.getCore().attachThemeChanged(this._handleThemeApplied, this);
326
- }
297
+ Theming.attachApplied(this._handleThemeApplied.bind(this));
327
298
  };
328
299
 
329
300
  /**
@@ -335,7 +306,7 @@ sap.ui.define([
335
306
  ComparisonMicroChart.prototype._handleThemeApplied = function() {
336
307
  this._bThemeApplied = true;
337
308
  this.invalidate();
338
- sap.ui.getCore().detachThemeChanged(this._handleThemeApplied, this);
309
+ Theming.detachApplied(this._handleThemeApplied.bind(this));
339
310
  };
340
311
 
341
312
  ComparisonMicroChart.prototype.onBeforeRendering = function() {
@@ -754,7 +725,7 @@ sap.ui.define([
754
725
  ComparisonMicroChart.prototype._addTitleAttribute = function() {
755
726
  var sTooltip = this.getTooltip_AsString();
756
727
  if (!library._isTooltipSuppressed(sTooltip) && this._hasData()) {
757
- if (this.getIsResponsive()){
728
+ if (this._isResponsive()){
758
729
  this.$().find(".sapSuiteCpMCVerticalAlignmentContainer").attr("title", sTooltip);
759
730
  } else {
760
731
  this.$().attr("title", sTooltip);
@@ -768,7 +739,7 @@ sap.ui.define([
768
739
  * @private
769
740
  */
770
741
  ComparisonMicroChart.prototype._removeTitleAttribute = function() {
771
- if (this.getIsResponsive()){
742
+ if (this._isResponsive()){
772
743
  this.$().find(".sapSuiteCpMCVerticalAlignmentContainer").removeAttr("title");
773
744
  } else {
774
745
  this.$().removeAttr("title");
@@ -17,7 +17,7 @@ sap.ui.define(['./library', 'sap/ui/core/Element', 'sap/ui/core/Control'],
17
17
  * Contains the values of the comparison chart.
18
18
  * @extends sap.ui.core.Element
19
19
  *
20
- * @version 1.119.1
20
+ * @version 1.120.0
21
21
  * @since 1.34
22
22
  *
23
23
  * @constructor
@@ -11,7 +11,9 @@ sap.ui.define([
11
11
  "sap/ui/core/ResizeHandler",
12
12
  "sap/ui/events/KeyCodes",
13
13
  "sap/suite/ui/microchart/MicroChartUtils",
14
- "./DeltaMicroChartRenderer"
14
+ "./DeltaMicroChartRenderer",
15
+ "sap/ui/core/Core",
16
+ "sap/ui/core/Theming"
15
17
  ], function(
16
18
  library,
17
19
  MobileLibrary,
@@ -20,13 +22,14 @@ sap.ui.define([
20
22
  ResizeHandler,
21
23
  KeyCodes,
22
24
  MicroChartUtils,
23
- DeltaMicroChartRenderer
25
+ DeltaMicroChartRenderer,
26
+ Core,
27
+ Theming
24
28
  ) {
25
29
  "use strict";
26
30
 
27
31
  // shortcut for sap.m.ValueColor
28
32
  var ValueColor = MobileLibrary.ValueColor;
29
- var Size = MobileLibrary.Size;
30
33
  var DeltaMicroChartViewType = library.DeltaMicroChartViewType;
31
34
 
32
35
  /**
@@ -41,7 +44,7 @@ sap.ui.define([
41
44
  * @extends sap.ui.core.Control
42
45
  *
43
46
  * @author SAP SE
44
- * @version 1.119.1
47
+ * @version 1.120.0
45
48
  * @since 1.34
46
49
  *
47
50
  * @public
@@ -159,46 +162,19 @@ sap.ui.define([
159
162
  DeltaMicroChart.THRESHOLD_WIDTH_WIDE_MODE = 12;
160
163
 
161
164
  DeltaMicroChart.prototype.init = function() {
162
- this._oRb = sap.ui.getCore().getLibraryResourceBundle("sap.suite.ui.microchart");
165
+ this._oRb = Core.getLibraryResourceBundle("sap.suite.ui.microchart");
163
166
  this.setAggregation("tooltip", "((AltText))", true);
164
- this._bThemeApplied = true;
165
- if (!sap.ui.getCore().isInitialized()) {
166
- this._bThemeApplied = false;
167
- sap.ui.getCore().attachInit(this._handleCoreInitialized.bind(this));
168
- } else {
169
- this._handleCoreInitialized();
170
- }
167
+ this._bThemeApplied = false;
168
+ Core.ready(this._handleCoreInitialized.bind(this));
171
169
  };
172
170
 
173
171
  DeltaMicroChart.prototype.setSize = function(size) {
174
172
  if (this.getSize() !== size) {
175
- if (size === Size.Responsive) {
176
- this.setProperty("isResponsive", true, true);
177
- } else {
178
- this.setProperty("isResponsive", false, true);
179
- }
180
173
  this.setProperty("size", size, false);
181
174
  }
182
175
  return this;
183
176
  };
184
177
 
185
- // for backward compatibilty
186
- DeltaMicroChart.prototype.setIsResponsive = function(bIsResponsive) {
187
- var sSize,
188
- sCurrentSize = this.getSize();
189
-
190
- this.setProperty("isResponsive", bIsResponsive);
191
-
192
- if (bIsResponsive) {
193
- sSize = Size.Responsive;
194
- } else {
195
- sSize = sCurrentSize === Size.Responsive ? Size.Auto : sCurrentSize;
196
- }
197
-
198
- this.setProperty("size", sSize);
199
- return this;
200
- };
201
-
202
178
  /**
203
179
  * Handler for the core's init event. The control will only be rendered if all themes are loaded
204
180
  * and everything is properly initialized. We attach a theme check here.
@@ -206,10 +182,7 @@ sap.ui.define([
206
182
  * @private
207
183
  */
208
184
  DeltaMicroChart.prototype._handleCoreInitialized = function() {
209
- this._bThemeApplied = sap.ui.getCore().isThemeApplied();
210
- if (!this._bThemeApplied) {
211
- sap.ui.getCore().attachThemeChanged(this._handleThemeApplied, this);
212
- }
185
+ Theming.attachApplied(this._handleThemeApplied.bind(this));
213
186
  };
214
187
 
215
188
  /**
@@ -221,7 +194,7 @@ sap.ui.define([
221
194
  DeltaMicroChart.prototype._handleThemeApplied = function() {
222
195
  this._bThemeApplied = true;
223
196
  this.invalidate();
224
- sap.ui.getCore().detachThemeChanged(this._handleThemeApplied, this);
197
+ Theming.detachApplied(this._handleThemeApplied.bind(this));
225
198
  };
226
199
 
227
200
  DeltaMicroChart.prototype._calcChartData = function() {