@sapui5/sap.suite.ui.microchart 1.142.4 → 1.142.5
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 +1 -1
- package/src/sap/suite/ui/microchart/.library +1 -1
- package/src/sap/suite/ui/microchart/AreaMicroChart.js +1 -1
- package/src/sap/suite/ui/microchart/AreaMicroChartItem.js +1 -1
- package/src/sap/suite/ui/microchart/AreaMicroChartLabel.js +1 -1
- package/src/sap/suite/ui/microchart/AreaMicroChartPoint.js +1 -1
- package/src/sap/suite/ui/microchart/BulletMicroChart.js +1 -1
- package/src/sap/suite/ui/microchart/BulletMicroChartData.js +1 -1
- package/src/sap/suite/ui/microchart/ColumnMicroChart.js +1 -1
- package/src/sap/suite/ui/microchart/ColumnMicroChartData.js +1 -1
- package/src/sap/suite/ui/microchart/ColumnMicroChartLabel.js +1 -1
- package/src/sap/suite/ui/microchart/ComparisonMicroChart.js +1 -1
- package/src/sap/suite/ui/microchart/ComparisonMicroChartData.js +1 -1
- package/src/sap/suite/ui/microchart/DeltaMicroChart.js +1 -1
- package/src/sap/suite/ui/microchart/HarveyBallMicroChart.js +20 -3
- package/src/sap/suite/ui/microchart/HarveyBallMicroChartItem.js +1 -1
- package/src/sap/suite/ui/microchart/HarveyBallMicroChartRenderer.js +4 -2
- package/src/sap/suite/ui/microchart/InteractiveBarChart.js +1 -1
- package/src/sap/suite/ui/microchart/InteractiveBarChartBar.js +1 -1
- package/src/sap/suite/ui/microchart/InteractiveDonutChart.js +1 -1
- package/src/sap/suite/ui/microchart/InteractiveDonutChartSegment.js +1 -1
- package/src/sap/suite/ui/microchart/InteractiveLineChart.js +1 -1
- package/src/sap/suite/ui/microchart/InteractiveLineChartPoint.js +1 -1
- package/src/sap/suite/ui/microchart/LineMicroChart.js +1 -1
- package/src/sap/suite/ui/microchart/LineMicroChartEmphasizedPoint.js +1 -1
- package/src/sap/suite/ui/microchart/LineMicroChartLine.js +1 -1
- package/src/sap/suite/ui/microchart/LineMicroChartPoint.js +1 -1
- package/src/sap/suite/ui/microchart/RadialMicroChart.js +1 -1
- package/src/sap/suite/ui/microchart/StackedBarMicroChart.js +1 -1
- package/src/sap/suite/ui/microchart/StackedBarMicroChartBar.js +1 -1
- package/src/sap/suite/ui/microchart/library.js +2 -2
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ sap.ui.define(['./library', 'sap/ui/core/Element', "sap/suite/ui/microchart/Micr
|
|
|
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.142.
|
|
20
|
+
* @version 1.142.5
|
|
21
21
|
* @since 1.34
|
|
22
22
|
*
|
|
23
23
|
* @public
|
|
@@ -46,7 +46,7 @@ sap.ui.define([
|
|
|
46
46
|
* <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.
|
|
47
47
|
* @extends sap.ui.core.Control
|
|
48
48
|
*
|
|
49
|
-
* @version 1.142.
|
|
49
|
+
* @version 1.142.5
|
|
50
50
|
* @since 1.34
|
|
51
51
|
*
|
|
52
52
|
* @public
|
|
@@ -40,7 +40,7 @@ sap.ui.define([
|
|
|
40
40
|
* <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.
|
|
41
41
|
* @extends sap.ui.core.Control
|
|
42
42
|
*
|
|
43
|
-
* @version 1.142.
|
|
43
|
+
* @version 1.142.5
|
|
44
44
|
* @since 1.34
|
|
45
45
|
*
|
|
46
46
|
* @public
|
|
@@ -13,8 +13,9 @@ sap.ui.define([
|
|
|
13
13
|
"./HarveyBallMicroChartRenderer",
|
|
14
14
|
"sap/ui/core/Core",
|
|
15
15
|
"sap/ui/core/Theming",
|
|
16
|
-
"./HarveyBallMicroChartItem"
|
|
17
|
-
|
|
16
|
+
"./HarveyBallMicroChartItem",
|
|
17
|
+
"sap/base/i18n/Localization"
|
|
18
|
+
], function (library, Control, Device, KeyCodes, MicroChartUtils, ResizeHandler, HarveyBallMicroChartRenderer, Core, Theming, HarveyBallMicroChartItem, Localization) {
|
|
18
19
|
"use strict";
|
|
19
20
|
|
|
20
21
|
const MicroChartColorType = library.MicroChartColorType;
|
|
@@ -30,10 +31,11 @@ sap.ui.define([
|
|
|
30
31
|
* <br>Unlike a pie chart, which shows multiple values or sectors, a Harvey Ball microchart shows only one value from a total.
|
|
31
32
|
* <br>The sector that represents a value being compared to a total is defined by {@link sap.suite.ui.microchart.HarveyBallMicroChartItem}.
|
|
32
33
|
* <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
|
+
* <br>Note: The default value of truncation is 5 digit and varies between languages.
|
|
33
35
|
* @extends sap.ui.core.Control
|
|
34
36
|
*
|
|
35
37
|
* @author SAP SE
|
|
36
|
-
* @version 1.142.
|
|
38
|
+
* @version 1.142.5
|
|
37
39
|
* @since 1.34
|
|
38
40
|
*
|
|
39
41
|
* @public
|
|
@@ -154,6 +156,21 @@ sap.ui.define([
|
|
|
154
156
|
|
|
155
157
|
HarveyBallMicroChart.VALUE_TRUNCATION_DIGITS = 5;
|
|
156
158
|
|
|
159
|
+
HarveyBallMicroChart.prototype._getValueTruncationDigits = function () {
|
|
160
|
+
var sLang = Localization.getLanguage().toLowerCase();
|
|
161
|
+
|
|
162
|
+
/* Map of truncation digits per language */
|
|
163
|
+
var LANG_TRUNCATION_MAP = {
|
|
164
|
+
"de": 8,
|
|
165
|
+
"de-de": 8,
|
|
166
|
+
"de_at": 8,
|
|
167
|
+
"de_ch": 8
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
// fallback to default
|
|
171
|
+
return LANG_TRUNCATION_MAP[sLang] || HarveyBallMicroChart.VALUE_TRUNCATION_DIGITS;
|
|
172
|
+
};
|
|
173
|
+
|
|
157
174
|
// numbers are in rem units
|
|
158
175
|
HarveyBallMicroChart.THRESHOLD_LOOK_XS = 1.125;
|
|
159
176
|
HarveyBallMicroChart.THRESHOLD_LOOK_S = 3.5;
|
|
@@ -105,11 +105,13 @@ sap.ui.define([
|
|
|
105
105
|
sTotalLabel = oFormattedTotal.value;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
/* language based truncation digit */
|
|
109
|
+
var iTruncDigits = oControl._getValueTruncationDigits();
|
|
108
110
|
if (sValueLabel) {
|
|
109
|
-
sValueLabel = HarveyBallMicroChart._truncateValue(sValueLabel,
|
|
111
|
+
sValueLabel = HarveyBallMicroChart._truncateValue(sValueLabel, iTruncDigits);
|
|
110
112
|
}
|
|
111
113
|
if (sTotalLabel) {
|
|
112
|
-
sTotalLabel = HarveyBallMicroChart._truncateValue(sTotalLabel,
|
|
114
|
+
sTotalLabel = HarveyBallMicroChart._truncateValue(sTotalLabel, iTruncDigits);
|
|
113
115
|
}
|
|
114
116
|
|
|
115
117
|
oRm.openStart("div", oControl);
|
|
@@ -42,7 +42,7 @@ sap.ui.define([
|
|
|
42
42
|
* The InteractiveLineChart control belongs to a chart control group in the MicroChart library having a number of interactive features.
|
|
43
43
|
* @extends sap.ui.core.Control
|
|
44
44
|
* @author SAP SE
|
|
45
|
-
* @version 1.142.
|
|
45
|
+
* @version 1.142.5
|
|
46
46
|
*
|
|
47
47
|
* @public
|
|
48
48
|
* @since 1.42.0
|
|
@@ -31,7 +31,7 @@ sap.ui.define([
|
|
|
31
31
|
* <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.
|
|
32
32
|
* @extends sap.ui.core.Control
|
|
33
33
|
*
|
|
34
|
-
* @version 1.142.
|
|
34
|
+
* @version 1.142.5
|
|
35
35
|
* @since 1.48.0
|
|
36
36
|
*
|
|
37
37
|
* @public
|
|
@@ -18,7 +18,7 @@ sap.ui.define(["sap/suite/ui/microchart/MicroChartUtils", "./library", "sap/suit
|
|
|
18
18
|
* Contains the emphasized point of the line micro chart.
|
|
19
19
|
* @extends sap.suite.ui.microchart.LineMicroChartPoint
|
|
20
20
|
*
|
|
21
|
-
* @version 1.142.
|
|
21
|
+
* @version 1.142.5
|
|
22
22
|
* @since 1.48.0
|
|
23
23
|
*
|
|
24
24
|
* @constructor
|
|
@@ -33,7 +33,7 @@ sap.ui.define([
|
|
|
33
33
|
* <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
34
|
* @extends sap.ui.core.Control
|
|
35
35
|
*
|
|
36
|
-
* @version 1.142.
|
|
36
|
+
* @version 1.142.5
|
|
37
37
|
* @since 1.44.0
|
|
38
38
|
*
|
|
39
39
|
* @public
|
|
@@ -21,13 +21,13 @@ sap.ui.define([
|
|
|
21
21
|
* @namespace
|
|
22
22
|
* @alias sap.suite.ui.microchart
|
|
23
23
|
* @author SAP SE
|
|
24
|
-
* @version 1.142.
|
|
24
|
+
* @version 1.142.5
|
|
25
25
|
* @public
|
|
26
26
|
*/
|
|
27
27
|
var thisLib = CoreLib.init({
|
|
28
28
|
name: "sap.suite.ui.microchart",
|
|
29
29
|
apiVersion: 2,
|
|
30
|
-
version: "1.142.
|
|
30
|
+
version: "1.142.5",
|
|
31
31
|
// library dependencies
|
|
32
32
|
dependencies: ["sap.ui.core", "sap.m"],
|
|
33
33
|
types: [
|