@sapui5/sap.chart 1.134.0 → 1.135.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.chart",
3
- "version": "1.134.0",
3
+ "version": "1.135.0",
4
4
  "description": "SAPUI5 Library sap.chart",
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-2024 SAP SE. All rights reserved.</copyright>
8
- <version>1.134.0</version>
8
+ <version>1.135.0</version>
9
9
 
10
10
  <documentation>Smart viz control based on Vizframe</documentation>
11
11
 
@@ -4,7 +4,6 @@
4
4
  */
5
5
  sap.ui.define([
6
6
  'sap/base/i18n/Formatting',
7
- 'sap/base/i18n/ResourceBundle',
8
7
  'sap/chart/library',
9
8
  'sap/viz/ui5/controls/VizFrame',
10
9
  'sap/viz/ui5/controls/common/BaseControl',
@@ -37,6 +36,7 @@ sap.ui.define([
37
36
  'sap/ui/core/LocaleData',
38
37
  'sap/ui/core/Control',
39
38
  'sap/ui/core/BusyIndicatorUtils',
39
+ 'sap/ui/core/Lib',
40
40
  'sap/ui/core/theming/Parameters',
41
41
  'sap/chart/SeriesColorTracker',
42
42
  'sap/viz/ui5/format/ChartFormatter',
@@ -48,8 +48,7 @@ sap.ui.define([
48
48
  "sap/ui/thirdparty/jquery"
49
49
  ], function(
50
50
  Formatting,
51
- ResourceBundle,
52
- library,
51
+ chartLibrary,
53
52
  VizFrame,
54
53
  BaseControl,
55
54
  Dataset,
@@ -81,6 +80,7 @@ sap.ui.define([
81
80
  LocaleData,
82
81
  Control,
83
82
  BusyIndicatorUtils,
83
+ Library,
84
84
  ThemeParameters,
85
85
  SeriesColorTracker,
86
86
  ChartFormatter,
@@ -93,8 +93,8 @@ sap.ui.define([
93
93
  ) {
94
94
  "use strict";
95
95
 
96
- var SelectionBehavior = library.SelectionBehavior,
97
- SelectionMode = library.SelectionMode;
96
+ var SelectionBehavior = chartLibrary.SelectionBehavior,
97
+ SelectionMode = chartLibrary.SelectionMode;
98
98
 
99
99
  /**
100
100
  * Constructor for a new Chart.
@@ -3395,7 +3395,7 @@ sap.ui.define([
3395
3395
  /**
3396
3396
  * @private
3397
3397
  */
3398
- Chart.getChartTypes = library.api.getChartTypes;
3398
+ Chart.getChartTypes = chartLibrary.api.getChartTypes;
3399
3399
 
3400
3400
  /**
3401
3401
  * Returns available and unavailable chart types with current Dimensions and Measures.
@@ -3610,9 +3610,7 @@ sap.ui.define([
3610
3610
 
3611
3611
  if (oColoring) {
3612
3612
  try {
3613
- const oBundle = ResourceBundle.create({
3614
- bundleName: "sap.chart.messages.messagebundle"
3615
- });
3613
+ const oBundle = Library.getResourceBundleFor("sap.chart");
3616
3614
  var options = {
3617
3615
  bFiltered: this._bFilterCalledByCustomer
3618
3616
  };
@@ -4065,13 +4063,13 @@ sap.ui.define([
4065
4063
  //var $next = $text.next();
4066
4064
  $text.css({
4067
4065
  "top": oPosition.height / 2,
4068
- "font-weight": ThemeParameters.get("sapUiChartTitleFontWeight"),
4069
- "font-size": ThemeParameters.get("sapUiChartMainTitleFontSize"),
4070
- "color": ThemeParameters.get("sapUiChartMainTitleFontSize")
4066
+ "font-weight": ThemeParameters.get({name: ["sapUiChartTitleFontWeight"], callback: function() {}}),
4067
+ "font-size": ThemeParameters.get({name: ["sapUiChartMainTitleFontSize"], callback: function() {}}),
4068
+ "color": ThemeParameters.get({name: ["sapUiChartMainTitleFontSize"], callback: function() {}})
4071
4069
  });
4072
4070
 
4073
4071
  this._$loadingIndicator.css({
4074
- "background-color": ThemeParameters.get("sapUiExtraLightBG")
4072
+ "background-color": ThemeParameters.get({name: ["sapUiExtraLightBG"], callback: function() {}})
4075
4073
  });
4076
4074
  };
4077
4075
 
@@ -8,7 +8,6 @@
8
8
  */
9
9
  sap.ui.define([
10
10
  'sap/base/i18n/Localization',
11
- 'sap/base/i18n/ResourceBundle',
12
11
  'sap/viz/ui5/format/ChartFormatter',
13
12
  'sap/ui/base/DataType',
14
13
  'sap/ui/core/Lib',
@@ -28,7 +27,6 @@ sap.ui.define([
28
27
  'sap/chart/data/MeasureRoleType'
29
28
  ], function(
30
29
  Localization,
31
- ResourceBundle,
32
30
  ChartFormatter,
33
31
  DataType,
34
32
  Library,
@@ -72,7 +70,7 @@ sap.ui.define([
72
70
  "sap.chart.data.Measure"
73
71
  ],
74
72
  noLibraryCSS: true,
75
- version: "1.134.0"
73
+ version: "1.135.0"
76
74
  });
77
75
 
78
76
  /**
@@ -164,9 +162,7 @@ sap.ui.define([
164
162
  thisLib.api.getChartTypes = function() {
165
163
  if (oLibBundle == null || sBundleLocale !== Localization.getLanguage()) {
166
164
  sBundleLocale = Localization.getLanguage();
167
- oLibBundle = ResourceBundle.create({
168
- bundleName: "sap.chart.messages.messagebundle"
169
- });
165
+ oLibBundle = Library.getResourceBundleFor("sap.chart");
170
166
  }
171
167
  return Object.keys(ChartType).reduce(function(oMap, sChartTypeKey) {
172
168
  var sChartType = ChartType[sChartTypeKey];
@@ -34,8 +34,21 @@ sap.ui.define([
34
34
  return null;
35
35
  }
36
36
  }
37
+ function getInstanceByEnLocal(sTimeUnitType) {
38
+ var sPattern = PATTERN_TABLE[sTimeUnitType];
39
+ if (sPattern) {
40
+ if (sPattern === PATTERN_TABLE[TimeUnitType.yearweek]) {
41
+ return DateFormat.getDateInstance({pattern: sPattern, calendarType: CalendarType.Gregorian},
42
+ new sap.ui.core.Locale("en"));
43
+ }
44
+ return DateFormat.getDateInstance({pattern: sPattern}, new sap.ui.core.Locale("en"));
45
+ } else {
46
+ return null;
47
+ }
48
+ }
37
49
 
38
50
  return {
39
- getInstance: getInstance
51
+ getInstance: getInstance,
52
+ getInstanceByEnLocal: getInstanceByEnLocal
40
53
  };
41
54
  });
@@ -237,12 +237,22 @@ sap.ui.define([
237
237
 
238
238
  var oDimensionDefinition = new DimensionDefinition(oDimConfig);
239
239
  if (isTimeChart && oDimension instanceof TimeDimension) {
240
- var oDateInstance = DateFormatUtil.getInstance(oDimension.getTimeUnit());
240
+ var sTimeUnit = oDimension.getTimeUnit();
241
+ var oDateInstance = DateFormatUtil.getInstance(sTimeUnit);
241
242
  if (oDateInstance) {
242
243
  var fnParser = oDateInstance.parse.bind(oDateInstance);
244
+ var fnParserbyEnLocal;
245
+ if (sTimeUnit === TimeUnitType.yearquarter) {
246
+ var oDateInstanceByEnLocal = DateFormatUtil.getInstanceByEnLocal(sTimeUnit);
247
+ fnParserbyEnLocal = oDateInstanceByEnLocal.parse.bind(oDateInstanceByEnLocal);
248
+ }
243
249
  var bUTC = oDimension._getIsUTC();
244
250
  oDimensionDefinition.getBindingInfo("value").formatter = function (oValue) {
245
- return fnParser(oValue, bUTC);
251
+ var result = fnParser(oValue, bUTC);
252
+ if (!result && fnParserbyEnLocal) {
253
+ result = fnParserbyEnLocal(oValue, bUTC);
254
+ }
255
+ return result;
246
256
  };
247
257
  }
248
258