@sapui5/sap.chart 1.133.2 → 1.133.3

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.133.2",
3
+ "version": "1.133.3",
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.133.2</version>
8
+ <version>1.133.3</version>
9
9
 
10
10
  <documentation>Smart viz control based on Vizframe</documentation>
11
11
 
@@ -72,7 +72,7 @@ sap.ui.define([
72
72
  "sap.chart.data.Measure"
73
73
  ],
74
74
  noLibraryCSS: true,
75
- version: "1.133.2"
75
+ version: "1.133.3"
76
76
  });
77
77
 
78
78
  /**
@@ -34,8 +34,20 @@ 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}, new sap.ui.core.Locale("en"));
42
+ }
43
+ return DateFormat.getDateInstance({pattern: sPattern}, new sap.ui.core.Locale("en"));
44
+ } else {
45
+ return null;
46
+ }
47
+ }
37
48
 
38
49
  return {
39
- getInstance: getInstance
50
+ getInstance: getInstance,
51
+ getInstanceByEnLocal: getInstanceByEnLocal
40
52
  };
41
53
  });
@@ -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