@sapui5/sap.suite.ui.microchart 1.129.0 → 1.130.1
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 +11 -8
- package/src/sap/suite/ui/microchart/AreaMicroChartItem.js +11 -6
- package/src/sap/suite/ui/microchart/AreaMicroChartLabel.js +10 -6
- 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 +3 -4
- package/src/sap/suite/ui/microchart/ColumnMicroChartData.js +10 -6
- package/src/sap/suite/ui/microchart/ColumnMicroChartLabel.js +10 -6
- package/src/sap/suite/ui/microchart/ColumnMicroChartRenderer.js +14 -3
- package/src/sap/suite/ui/microchart/ComparisonMicroChart.js +3 -4
- package/src/sap/suite/ui/microchart/ComparisonMicroChartData.js +11 -6
- package/src/sap/suite/ui/microchart/ComparisonMicroChartRenderer.js +2 -3
- package/src/sap/suite/ui/microchart/DeltaMicroChart.js +7 -9
- package/src/sap/suite/ui/microchart/DeltaMicroChartRenderer.js +7 -6
- package/src/sap/suite/ui/microchart/HarveyBallMicroChart.js +4 -6
- package/src/sap/suite/ui/microchart/HarveyBallMicroChartItem.js +12 -5
- package/src/sap/suite/ui/microchart/HarveyBallMicroChartRenderer.js +8 -5
- 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 +5 -6
- package/src/sap/suite/ui/microchart/LineMicroChartEmphasizedPoint.js +10 -12
- 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/LineMicroChartRenderer.js +38 -17
- package/src/sap/suite/ui/microchart/MicroChartUtils.js +51 -4
- package/src/sap/suite/ui/microchart/RadialMicroChart.js +60 -16
- package/src/sap/suite/ui/microchart/RadialMicroChartRenderer.js +48 -22
- package/src/sap/suite/ui/microchart/StackedBarMicroChart.js +3 -3
- package/src/sap/suite/ui/microchart/StackedBarMicroChartBar.js +21 -6
- package/src/sap/suite/ui/microchart/StackedBarMicroChartRenderer.js +2 -3
- package/src/sap/suite/ui/microchart/library.js +120 -3
- package/src/sap/suite/ui/microchart/messagebundle.properties +24 -0
- package/src/sap/suite/ui/microchart/messagebundle_da.properties +3 -3
- package/src/sap/suite/ui/microchart/themes/base/AreaMicroChart.less +9 -29
- package/src/sap/suite/ui/microchart/themes/base/ColumnMicroChart.less +2 -14
- package/src/sap/suite/ui/microchart/themes/base/ComparisonMicroChart.less +5 -21
- package/src/sap/suite/ui/microchart/themes/base/DeltaMicroChart.less +2 -14
- package/src/sap/suite/ui/microchart/themes/base/HarveyBallMicroChart.less +76 -4
- package/src/sap/suite/ui/microchart/themes/base/LineMicroChart.less +6 -39
- package/src/sap/suite/ui/microchart/themes/base/MicroChartMixins.less +361 -0
- package/src/sap/suite/ui/microchart/themes/base/RadialMicroChart.less +1 -15
- package/src/sap/suite/ui/microchart/themes/base/StackedBarMicroChart.less +1 -15
- package/src/sap/suite/ui/microchart/themes/base/library.source.less +1 -1
package/package.json
CHANGED
|
@@ -11,7 +11,6 @@ sap.ui.define([
|
|
|
11
11
|
"sap/base/Log",
|
|
12
12
|
"sap/ui/events/KeyCodes",
|
|
13
13
|
"sap/ui/core/theming/Parameters",
|
|
14
|
-
"sap/m/library",
|
|
15
14
|
"sap/ui/core/ResizeHandler",
|
|
16
15
|
"./AreaMicroChartRenderer",
|
|
17
16
|
"sap/ui/core/Core",
|
|
@@ -20,11 +19,11 @@ sap.ui.define([
|
|
|
20
19
|
"./AreaMicroChartItem",
|
|
21
20
|
"./AreaMicroChartLabel",
|
|
22
21
|
"sap/ui/core/Lib"
|
|
23
|
-
], function(library, Control, FlexBox, MicroChartUtils, Log, KeyCodes, Parameters,
|
|
22
|
+
], function(library, Control, FlexBox, MicroChartUtils, Log, KeyCodes, Parameters,
|
|
24
23
|
ResizeHandler, AreaMicroChartRenderer, Core, Theming, Localization, AreaMicroChartItem, AreaMicroChartLabel, CoreLib) {
|
|
25
24
|
"use strict";
|
|
26
25
|
|
|
27
|
-
var
|
|
26
|
+
var MicroChartColorType = library.MicroChartColorType;
|
|
28
27
|
var AreaMicroChartViewType = library.AreaMicroChartViewType;
|
|
29
28
|
|
|
30
29
|
/**
|
|
@@ -38,7 +37,7 @@ sap.ui.define([
|
|
|
38
37
|
* @extends sap.ui.core.Control
|
|
39
38
|
*
|
|
40
39
|
* @author SAP SE
|
|
41
|
-
* @version 1.
|
|
40
|
+
* @version 1.130.1
|
|
42
41
|
* @since 1.34
|
|
43
42
|
*
|
|
44
43
|
* @public
|
|
@@ -558,11 +557,15 @@ sap.ui.define([
|
|
|
558
557
|
sColor = this.getColorPalette()[iCpIndex++].trim();
|
|
559
558
|
}
|
|
560
559
|
|
|
561
|
-
if (
|
|
560
|
+
if (MicroChartColorType.hasOwnProperty(sColor)) {
|
|
562
561
|
oStyles = this._getCssValues("sapSuiteAMCLine", "sapSuiteAMCSemanticColor" + sColor);
|
|
563
562
|
return oStyles.color;
|
|
563
|
+
} else {
|
|
564
|
+
/**
|
|
565
|
+
* @deprecated As of version 1.120
|
|
566
|
+
*/
|
|
567
|
+
return Parameters.get(sColor) || sColor;
|
|
564
568
|
}
|
|
565
|
-
return Parameters.get(sColor) || sColor;
|
|
566
569
|
}.bind(this);
|
|
567
570
|
|
|
568
571
|
context.lineWidth = parseFloat(oStyles.width);
|
|
@@ -1077,12 +1080,12 @@ sap.ui.define([
|
|
|
1077
1080
|
/**
|
|
1078
1081
|
* Retrieves the translated name of the given semantic color from the resource bundle.
|
|
1079
1082
|
*
|
|
1080
|
-
* @param {sap.
|
|
1083
|
+
* @param {sap.suite.ui.microchart.MicroChartColorType} color The semantic color to be translated.
|
|
1081
1084
|
* @returns {string} The translated text.
|
|
1082
1085
|
* @private
|
|
1083
1086
|
*/
|
|
1084
1087
|
AreaMicroChart.prototype._getLocalizedColorMeaning = function(color) {
|
|
1085
|
-
return
|
|
1088
|
+
return MicroChartColorType.hasOwnProperty(color) ? this._oRb.getText(("SEMANTIC_COLOR_" + color).toUpperCase()) : "";
|
|
1086
1089
|
};
|
|
1087
1090
|
|
|
1088
1091
|
AreaMicroChart.prototype._getAltHeaderText = function(bIsActive) {
|
|
@@ -6,10 +6,11 @@
|
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"./library",
|
|
8
8
|
"sap/ui/core/Element",
|
|
9
|
-
"./AreaMicroChartPoint"
|
|
10
|
-
|
|
9
|
+
"./AreaMicroChartPoint",
|
|
10
|
+
"sap/suite/ui/microchart/MicroChartUtils"
|
|
11
|
+
], function(library, Element, AreaMicroChartPoint,MicroChartUtils) {
|
|
11
12
|
"use strict";
|
|
12
|
-
|
|
13
|
+
const MicroChartColorType = library.MicroChartColorType;
|
|
13
14
|
/**
|
|
14
15
|
* The configuration of the graphic element on the chart.
|
|
15
16
|
*
|
|
@@ -21,7 +22,7 @@ sap.ui.define([
|
|
|
21
22
|
* @extends sap.ui.core.Element
|
|
22
23
|
*
|
|
23
24
|
* @author SAP SE
|
|
24
|
-
* @version 1.
|
|
25
|
+
* @version 1.130.1
|
|
25
26
|
* @since 1.34
|
|
26
27
|
*
|
|
27
28
|
* @public
|
|
@@ -32,9 +33,11 @@ sap.ui.define([
|
|
|
32
33
|
library: "sap.suite.ui.microchart",
|
|
33
34
|
properties: {
|
|
34
35
|
/**
|
|
35
|
-
* The graphic element color.
|
|
36
|
+
* The graphic element color. For SAPUI5 1.x releases, we are going to use string as the type for Micro Charts instead of sap.m.ValueCSSColor.
|
|
37
|
+
* The value will only support MicroChartColorType from the SAPUI5 2.0 release.
|
|
38
|
+
* @type {sap.suite.ui.microchart.MicroChartColorType | sap.m.ValueCSSColor}
|
|
36
39
|
*/
|
|
37
|
-
color: { group: "Misc", type: "
|
|
40
|
+
color: { group: "Misc", type: "string", defaultValue: MicroChartColorType.Neutral },
|
|
38
41
|
|
|
39
42
|
/**
|
|
40
43
|
* The line title.
|
|
@@ -56,5 +59,7 @@ sap.ui.define([
|
|
|
56
59
|
this.setAggregation("tooltip", "((AltText))", true);
|
|
57
60
|
};
|
|
58
61
|
|
|
62
|
+
MicroChartUtils.extendMicroChartSetColor(AreaMicroChartItem);
|
|
63
|
+
|
|
59
64
|
return AreaMicroChartItem;
|
|
60
65
|
});
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* (c) Copyright 2009-2024 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
sap.ui.define(['./library', 'sap/ui/core/Element'],
|
|
7
|
-
function(library, Element) {
|
|
6
|
+
sap.ui.define(['./library', 'sap/ui/core/Element', "sap/suite/ui/microchart/MicroChartUtils"],
|
|
7
|
+
function(library, Element, MicroChartUtils) {
|
|
8
8
|
"use strict";
|
|
9
|
-
|
|
9
|
+
const MicroChartColorType = library.MicroChartColorType;
|
|
10
10
|
/**
|
|
11
11
|
* Constructor for a new AreaMicroChart control.
|
|
12
12
|
*
|
|
@@ -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.
|
|
20
|
+
* @version 1.130.1
|
|
21
21
|
* @since 1.34
|
|
22
22
|
*
|
|
23
23
|
* @public
|
|
@@ -29,9 +29,11 @@ sap.ui.define(['./library', 'sap/ui/core/Element'],
|
|
|
29
29
|
properties : {
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
* The graphic element color.
|
|
32
|
+
* The graphic element color. For SAPUI5 1.x releases, we are going to use string as the type for Micro Charts instead of sap.m.ValueCSSColor.
|
|
33
|
+
* The value will only support MicroChartColorType from the SAPUI5 2.0 release.
|
|
34
|
+
* @type {sap.suite.ui.microchart.MicroChartColorType | sap.m.ValueCSSColor}
|
|
33
35
|
*/
|
|
34
|
-
color: { group: "Misc", type: "
|
|
36
|
+
color: { group: "Misc", type: "string", defaultValue: MicroChartColorType.Neutral },
|
|
35
37
|
|
|
36
38
|
/**
|
|
37
39
|
* The line title.
|
|
@@ -41,5 +43,7 @@ sap.ui.define(['./library', 'sap/ui/core/Element'],
|
|
|
41
43
|
}
|
|
42
44
|
});
|
|
43
45
|
|
|
46
|
+
MicroChartUtils.extendMicroChartSetColor(AreaMicroChartLabel);
|
|
47
|
+
|
|
44
48
|
return AreaMicroChartLabel;
|
|
45
49
|
});
|
|
@@ -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.
|
|
49
|
+
* @version 1.130.1
|
|
50
50
|
* @since 1.34
|
|
51
51
|
*
|
|
52
52
|
* @public
|
|
@@ -24,8 +24,7 @@ sap.ui.define([
|
|
|
24
24
|
// shortcut for sap.m.Size
|
|
25
25
|
var Size = mobileLibrary.Size;
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
var ValueColor = mobileLibrary.ValueColor;
|
|
27
|
+
const MicroChartColorType = library.MicroChartColorType;
|
|
29
28
|
|
|
30
29
|
/**
|
|
31
30
|
* Constructor for a new ColumnMicroChart control.
|
|
@@ -39,7 +38,7 @@ sap.ui.define([
|
|
|
39
38
|
* @extends sap.ui.core.Control
|
|
40
39
|
*
|
|
41
40
|
* @author SAP SE
|
|
42
|
-
* @version 1.
|
|
41
|
+
* @version 1.130.1
|
|
43
42
|
* @since 1.34
|
|
44
43
|
*
|
|
45
44
|
* @public
|
|
@@ -395,7 +394,7 @@ sap.ui.define([
|
|
|
395
394
|
};
|
|
396
395
|
|
|
397
396
|
ColumnMicroChart.prototype.getLocalizedColorMeaning = function(sColor) {
|
|
398
|
-
return
|
|
397
|
+
return MicroChartColorType.hasOwnProperty(sColor) ? this._oRb.getText(("SEMANTIC_COLOR_" + sColor).toUpperCase()) : "";
|
|
399
398
|
};
|
|
400
399
|
|
|
401
400
|
ColumnMicroChart.prototype.setSize = function(size) {
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* (c) Copyright 2009-2024 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
sap.ui.define(['./library', 'sap/ui/core/Element'],
|
|
7
|
-
function(library, Element) {
|
|
6
|
+
sap.ui.define(['./library', 'sap/ui/core/Element', "sap/suite/ui/microchart/MicroChartUtils"],
|
|
7
|
+
function(library, Element, MicroChartUtils) {
|
|
8
8
|
"use strict";
|
|
9
|
-
|
|
9
|
+
const MicroChartColorType = library.MicroChartColorType;
|
|
10
10
|
/**
|
|
11
11
|
* Constructor for a new ColumnMicroChartData control.
|
|
12
12
|
*
|
|
@@ -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.
|
|
20
|
+
* @version 1.130.1
|
|
21
21
|
* @since 1.34
|
|
22
22
|
*
|
|
23
23
|
* @public
|
|
@@ -29,9 +29,11 @@ sap.ui.define(['./library', 'sap/ui/core/Element'],
|
|
|
29
29
|
properties : {
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
* The graphic element color.
|
|
32
|
+
* The graphic element color. For SAPUI5 1.x releases, we are going to use string as the type for Micro Charts instead of sap.m.ValueCSSColor.
|
|
33
|
+
* The value will only support MicroChartColorType from the SAPUI5 2.0 release.
|
|
34
|
+
* @type {sap.suite.ui.microchart.MicroChartColorType | sap.m.ValueCSSColor}
|
|
33
35
|
*/
|
|
34
|
-
color: { group: "Misc", type: "
|
|
36
|
+
color: { group: "Misc", type: "string", defaultValue: MicroChartColorType.Neutral },
|
|
35
37
|
|
|
36
38
|
/**
|
|
37
39
|
* The line title.
|
|
@@ -78,6 +80,8 @@ sap.ui.define(['./library', 'sap/ui/core/Element'],
|
|
|
78
80
|
return this;
|
|
79
81
|
};
|
|
80
82
|
|
|
83
|
+
MicroChartUtils.extendMicroChartSetColor(ColumnMicroChartData);
|
|
84
|
+
|
|
81
85
|
return ColumnMicroChartData;
|
|
82
86
|
|
|
83
87
|
});
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// This control displays the history of values as a line mini chart or an area mini chart.
|
|
7
|
-
sap.ui.define(['./library', 'sap/ui/core/Element'],
|
|
8
|
-
function(library, Element) {
|
|
7
|
+
sap.ui.define(['./library', 'sap/ui/core/Element', "sap/suite/ui/microchart/MicroChartUtils"],
|
|
8
|
+
function(library, Element, MicroChartUtils) {
|
|
9
9
|
"use strict";
|
|
10
|
-
|
|
10
|
+
const MicroChartColorType = library.MicroChartColorType;
|
|
11
11
|
/**
|
|
12
12
|
* Constructor for a new ColumnMicroChartLabel control.
|
|
13
13
|
*
|
|
@@ -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.
|
|
21
|
+
* @version 1.130.1
|
|
22
22
|
* @since 1.34
|
|
23
23
|
*
|
|
24
24
|
* @public
|
|
@@ -30,9 +30,11 @@ sap.ui.define(['./library', 'sap/ui/core/Element'],
|
|
|
30
30
|
properties : {
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
* The graphic element color.
|
|
33
|
+
* The graphic element color. For SAPUI5 1.x releases, we are going to use string as the type for Micro Charts instead of sap.m.ValueCSSColor.
|
|
34
|
+
* The value will only support MicroChartColorType from the SAPUI5 2.0 release.
|
|
35
|
+
* @type {sap.suite.ui.microchart.MicroChartColorType | sap.m.ValueCSSColor}
|
|
34
36
|
*/
|
|
35
|
-
color: { group: "Misc", type: "
|
|
37
|
+
color: { group: "Misc", type: "string", defaultValue: MicroChartColorType.Neutral },
|
|
36
38
|
|
|
37
39
|
/**
|
|
38
40
|
* The line title.
|
|
@@ -42,6 +44,8 @@ sap.ui.define(['./library', 'sap/ui/core/Element'],
|
|
|
42
44
|
}
|
|
43
45
|
});
|
|
44
46
|
|
|
47
|
+
MicroChartUtils.extendMicroChartSetColor(ColumnMicroChartLabel);
|
|
48
|
+
|
|
45
49
|
return ColumnMicroChartLabel;
|
|
46
50
|
|
|
47
51
|
});
|
|
@@ -14,12 +14,13 @@ sap.ui.define([
|
|
|
14
14
|
"use strict";
|
|
15
15
|
|
|
16
16
|
// shortcut for sap.m.ValueColor
|
|
17
|
-
var ValueColor = mobileLibrary.ValueColor;
|
|
18
|
-
// shortcut for sap.m.ValueCSSColor
|
|
19
17
|
var ValueCSSColor = mobileLibrary.ValueCSSColor;
|
|
20
18
|
|
|
21
19
|
var DEFAULT_ITEM_COLOR = "sapUiChartNeutral";
|
|
22
20
|
|
|
21
|
+
const MicroChartColorType = library.MicroChartColorType;
|
|
22
|
+
|
|
23
|
+
|
|
23
24
|
/**
|
|
24
25
|
* ColumnMicroChartRenderer renderer.
|
|
25
26
|
* @namespace
|
|
@@ -234,13 +235,23 @@ sap.ui.define([
|
|
|
234
235
|
oRm.style("height", oControl.getHeight());
|
|
235
236
|
};
|
|
236
237
|
|
|
238
|
+
/**
|
|
239
|
+
* @deprecated As of version 1.120
|
|
240
|
+
*/
|
|
237
241
|
ColumnMicroChartRenderer._getHexColor = function (sColor, sDefaultColor) {
|
|
238
242
|
sColor = ValueCSSColor.isValid(sColor) ? sColor : sDefaultColor;
|
|
239
243
|
return Parameters.get(sColor) || sColor;
|
|
240
244
|
};
|
|
241
245
|
|
|
242
246
|
ColumnMicroChartRenderer._setHexColor = function (oRm, sColor, sDefaultColor, sStyle) {
|
|
243
|
-
|
|
247
|
+
if (MicroChartColorType.hasOwnProperty(sColor)){
|
|
248
|
+
oRm.class("sapSuiteClMCSemanticColor" + sColor);
|
|
249
|
+
} else {
|
|
250
|
+
/**
|
|
251
|
+
* @deprecated As of version 1.120
|
|
252
|
+
*/
|
|
253
|
+
oRm.style(sStyle, this._getHexColor(sColor, sDefaultColor));
|
|
254
|
+
}
|
|
244
255
|
};
|
|
245
256
|
|
|
246
257
|
ColumnMicroChartRenderer._writeEdgeLabel = function (oRm, oControl, oLabel, sId, sClass, bWideBtmLbl) {
|
|
@@ -23,8 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
], function(jQuery, library, Control, Device, FlexBox, MicroChartUtils, mobileLibrary, ResizeHandler, ComparisonMicroChartRenderer, Core, Theming, ComparisonMicroChartData,Menu,MenuItem,CoreLib,Localization) {
|
|
24
24
|
"use strict";
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
var ValueColor = mobileLibrary.ValueColor;
|
|
26
|
+
const MicroChartColorType = library.MicroChartColorType;
|
|
28
27
|
var ComparisonMicroChartViewType = library.ComparisonMicroChartViewType;
|
|
29
28
|
// shortcut for sap.m.Size
|
|
30
29
|
var Size = mobileLibrary.Size;
|
|
@@ -41,7 +40,7 @@ sap.ui.define([
|
|
|
41
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.
|
|
42
41
|
* @extends sap.ui.core.Control
|
|
43
42
|
*
|
|
44
|
-
* @version 1.
|
|
43
|
+
* @version 1.130.1
|
|
45
44
|
* @since 1.34
|
|
46
45
|
*
|
|
47
46
|
* @public
|
|
@@ -503,7 +502,7 @@ sap.ui.define([
|
|
|
503
502
|
};
|
|
504
503
|
|
|
505
504
|
ComparisonMicroChart.prototype._getLocalizedColorMeaning = function(sColor) {
|
|
506
|
-
return
|
|
505
|
+
return MicroChartColorType.hasOwnProperty(sColor) && sColor != 'None' ? this._oRb.getText(("SEMANTIC_COLOR_" + sColor).toUpperCase()) : "";
|
|
507
506
|
};
|
|
508
507
|
|
|
509
508
|
ComparisonMicroChart.prototype._getBarAltText = function(iBarIndex) {
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* (c) Copyright 2009-2024 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
sap.ui.define(['./library', 'sap/ui/core/Element', 'sap/ui/core/Control','sap/m/library'],
|
|
7
|
-
function(library, Element, Control,mobileLibrary) {
|
|
6
|
+
sap.ui.define(['./library', 'sap/ui/core/Element', 'sap/ui/core/Control','sap/m/library', "sap/suite/ui/microchart/MicroChartUtils"],
|
|
7
|
+
function(library, Element, Control,mobileLibrary, MicroChartUtils) {
|
|
8
8
|
"use strict";
|
|
9
|
-
|
|
9
|
+
const MicroChartColorType = library.MicroChartColorType;
|
|
10
10
|
var Size = mobileLibrary.Size;
|
|
11
11
|
/**
|
|
12
12
|
* Constructor for a new ComparisonMicroChartData.
|
|
@@ -18,7 +18,7 @@ sap.ui.define(['./library', 'sap/ui/core/Element', 'sap/ui/core/Control','sap/m/
|
|
|
18
18
|
* Contains the values of the comparison chart.
|
|
19
19
|
* @extends sap.ui.core.Element
|
|
20
20
|
*
|
|
21
|
-
* @version 1.
|
|
21
|
+
* @version 1.130.1
|
|
22
22
|
* @since 1.34
|
|
23
23
|
*
|
|
24
24
|
* @constructor
|
|
@@ -35,9 +35,11 @@ sap.ui.define(['./library', 'sap/ui/core/Element', 'sap/ui/core/Control','sap/m/
|
|
|
35
35
|
value: {type: "float", group: "Misc", defaultValue: "0"},
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
|
-
* The semantic color of the value.
|
|
38
|
+
* The semantic color of the value. For SAPUI5 1.x releases, we are going to use string as the type for Micro Charts instead of sap.m.ValueCSSColor.
|
|
39
|
+
* The value will only support MicroChartColorType from the SAPUI5 2.0 release.
|
|
40
|
+
* @type {sap.suite.ui.microchart.MicroChartColorType | sap.m.ValueCSSColor}
|
|
39
41
|
*/
|
|
40
|
-
color: {
|
|
42
|
+
color: { group: "Misc", type: "string", defaultValue: MicroChartColorType.Neutral },
|
|
41
43
|
|
|
42
44
|
/**
|
|
43
45
|
* The comparison bar title.
|
|
@@ -125,6 +127,9 @@ sap.ui.define(['./library', 'sap/ui/core/Element', 'sap/ui/core/Control','sap/m/
|
|
|
125
127
|
}
|
|
126
128
|
};
|
|
127
129
|
|
|
130
|
+
MicroChartUtils.extendMicroChartSetColor(ComparisonMicroChartData);
|
|
131
|
+
|
|
132
|
+
|
|
128
133
|
return ComparisonMicroChartData;
|
|
129
134
|
|
|
130
135
|
});
|
|
@@ -12,8 +12,7 @@ sap.ui.define([
|
|
|
12
12
|
function(library, MicroChartRenderUtils, Parameters, mobileLibrary) {
|
|
13
13
|
"use strict";
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
var ValueColor = mobileLibrary.ValueColor;
|
|
15
|
+
const MicroChartColorType = library.MicroChartColorType;
|
|
17
16
|
// shortcut for sap.m.Size
|
|
18
17
|
var Size = mobileLibrary.Size;
|
|
19
18
|
|
|
@@ -240,7 +239,7 @@ sap.ui.define([
|
|
|
240
239
|
|
|
241
240
|
oRm.openStart("div", oControl.getId() + "-chart-item-" + iIndex + "-value");
|
|
242
241
|
oRm.class("sapSuiteCpMCChartItemValue");
|
|
243
|
-
if (
|
|
242
|
+
if (MicroChartColorType.hasOwnProperty(sColor)) {
|
|
244
243
|
oRm.class("sapSuiteCpMCSemanticColor" + oData.getColor());
|
|
245
244
|
}
|
|
246
245
|
if (oData.getTitle()) {
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"./library",
|
|
8
|
-
"sap/m/library",
|
|
9
8
|
"sap/m/FlexBox",
|
|
10
9
|
"sap/ui/core/Control",
|
|
11
10
|
"sap/ui/core/ResizeHandler",
|
|
@@ -16,7 +15,6 @@ sap.ui.define([
|
|
|
16
15
|
"sap/ui/core/Theming"
|
|
17
16
|
], function(
|
|
18
17
|
library,
|
|
19
|
-
MobileLibrary,
|
|
20
18
|
FlexBox,
|
|
21
19
|
Control,
|
|
22
20
|
ResizeHandler,
|
|
@@ -27,9 +25,7 @@ sap.ui.define([
|
|
|
27
25
|
Theming
|
|
28
26
|
) {
|
|
29
27
|
"use strict";
|
|
30
|
-
|
|
31
|
-
// shortcut for sap.m.ValueColor
|
|
32
|
-
var ValueColor = MobileLibrary.ValueColor;
|
|
28
|
+
const MicroChartColorType = library.MicroChartColorType;
|
|
33
29
|
var DeltaMicroChartViewType = library.DeltaMicroChartViewType;
|
|
34
30
|
|
|
35
31
|
/**
|
|
@@ -44,7 +40,7 @@ sap.ui.define([
|
|
|
44
40
|
* @extends sap.ui.core.Control
|
|
45
41
|
*
|
|
46
42
|
* @author SAP SE
|
|
47
|
-
* @version 1.
|
|
43
|
+
* @version 1.130.1
|
|
48
44
|
* @since 1.34
|
|
49
45
|
*
|
|
50
46
|
* @public
|
|
@@ -92,9 +88,10 @@ sap.ui.define([
|
|
|
92
88
|
deltaDisplayValue: {type: "string", group: "Misc", defaultValue: null},
|
|
93
89
|
|
|
94
90
|
/**
|
|
95
|
-
* The semantic color of the delta value.
|
|
91
|
+
* The semantic color of the delta value. For SAPUI5 1.x releases, we are going to use string as the type for Micro Charts instead of sap.m.ValueCSSColor.
|
|
92
|
+
* The value will only support MicroChartColorType from the SAPUI5 2.0 release.
|
|
96
93
|
*/
|
|
97
|
-
color: {
|
|
94
|
+
color: { group: "Misc", type: "string", defaultValue: MicroChartColorType.Neutral },
|
|
98
95
|
|
|
99
96
|
/**
|
|
100
97
|
* The view of the chart. If not set, the <code>Normal</code> view is used by default.
|
|
@@ -244,7 +241,7 @@ sap.ui.define([
|
|
|
244
241
|
};
|
|
245
242
|
|
|
246
243
|
DeltaMicroChart.prototype._getLocalizedColorMeaning = function(sColor) {
|
|
247
|
-
return
|
|
244
|
+
return MicroChartColorType.hasOwnProperty(sColor) ? this._oRb.getText(("SEMANTIC_COLOR_" + sColor).toUpperCase()) : "";
|
|
248
245
|
};
|
|
249
246
|
|
|
250
247
|
DeltaMicroChart.prototype._getAltHeaderText = function(bIsActive) {
|
|
@@ -434,6 +431,7 @@ sap.ui.define([
|
|
|
434
431
|
};
|
|
435
432
|
|
|
436
433
|
MicroChartUtils.extendMicroChart(DeltaMicroChart);
|
|
434
|
+
MicroChartUtils.extendMicroChartSetColor(DeltaMicroChart);
|
|
437
435
|
|
|
438
436
|
return DeltaMicroChart;
|
|
439
437
|
});
|
|
@@ -6,14 +6,12 @@
|
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
'./library',
|
|
8
8
|
'sap/suite/ui/microchart/MicroChartRenderUtils',
|
|
9
|
-
'sap/ui/core/theming/Parameters'
|
|
10
|
-
'sap/m/library'
|
|
9
|
+
'sap/ui/core/theming/Parameters'
|
|
11
10
|
],
|
|
12
|
-
function(library, MicroChartRenderUtils, Parameters
|
|
11
|
+
function(library, MicroChartRenderUtils, Parameters) {
|
|
13
12
|
"use strict";
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
var ValueColor = MobileLibrary.ValueColor;
|
|
14
|
+
const MicroChartColorType = library.MicroChartColorType;
|
|
17
15
|
var DeltaMicroChartViewType = library.DeltaMicroChartViewType;
|
|
18
16
|
|
|
19
17
|
/**
|
|
@@ -51,9 +49,12 @@ sap.ui.define([
|
|
|
51
49
|
var sColor = oControl.getColor();
|
|
52
50
|
|
|
53
51
|
var fnSetColor = function(sColor, sStyle) {
|
|
54
|
-
if (
|
|
52
|
+
if (MicroChartColorType.hasOwnProperty(sColor)) {
|
|
55
53
|
oRm.class("sapSuiteDMCSemanticColor" + sColor);
|
|
56
54
|
} else {
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated As of version 1.120
|
|
57
|
+
*/
|
|
57
58
|
oRm.style(sStyle, Parameters.get(sColor) || sColor);
|
|
58
59
|
}
|
|
59
60
|
};
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"./library",
|
|
8
|
-
"sap/m/library",
|
|
9
8
|
"sap/ui/core/Control",
|
|
10
9
|
"sap/ui/Device",
|
|
11
10
|
"sap/ui/events/KeyCodes",
|
|
@@ -15,11 +14,10 @@ sap.ui.define([
|
|
|
15
14
|
"sap/ui/core/Core",
|
|
16
15
|
"sap/ui/core/Theming",
|
|
17
16
|
"./HarveyBallMicroChartItem"
|
|
18
|
-
], function (library,
|
|
17
|
+
], function (library, Control, Device, KeyCodes, MicroChartUtils, ResizeHandler, HarveyBallMicroChartRenderer, Core, Theming, HarveyBallMicroChartItem) {
|
|
19
18
|
"use strict";
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
var ValueColor = MobileLibrary.ValueColor;
|
|
20
|
+
const MicroChartColorType = library.MicroChartColorType;
|
|
23
21
|
|
|
24
22
|
/**
|
|
25
23
|
* Constructor for a new HarveyBallMicroChart.
|
|
@@ -35,7 +33,7 @@ sap.ui.define([
|
|
|
35
33
|
* @extends sap.ui.core.Control
|
|
36
34
|
*
|
|
37
35
|
* @author SAP SE
|
|
38
|
-
* @version 1.
|
|
36
|
+
* @version 1.130.1
|
|
39
37
|
* @since 1.34
|
|
40
38
|
*
|
|
41
39
|
* @public
|
|
@@ -190,7 +188,7 @@ sap.ui.define([
|
|
|
190
188
|
return;
|
|
191
189
|
}
|
|
192
190
|
|
|
193
|
-
var sColor = (this.getColorPalette().length === 0 &&
|
|
191
|
+
var sColor = (this.getColorPalette().length === 0 && MicroChartColorType.hasOwnProperty(sItemColor)) ? this._oRb.getText(("SEMANTIC_COLOR_" + sItemColor).toUpperCase()) : "";
|
|
194
192
|
var sLabel = oItem.getFractionLabel();
|
|
195
193
|
var sScale = oItem.getFractionScale();
|
|
196
194
|
if (!sLabel && sScale) {
|
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"./library",
|
|
8
|
-
"sap/ui/core/Element"
|
|
9
|
-
|
|
8
|
+
"sap/ui/core/Element",
|
|
9
|
+
"sap/suite/ui/microchart/MicroChartUtils"
|
|
10
|
+
], function(library, Element, MicroChartUtils) {
|
|
10
11
|
"use strict";
|
|
11
|
-
|
|
12
|
+
const MicroChartColorType = library.MicroChartColorType;
|
|
12
13
|
/**
|
|
13
14
|
* Constructor for a new HarveyBallMicroChartItem to be used in a {@link sap.suite.ui.microchart.HarveyBallMicroChart}.
|
|
14
15
|
*
|
|
@@ -20,7 +21,7 @@ sap.ui.define([
|
|
|
20
21
|
* @extends sap.ui.core.Element
|
|
21
22
|
*
|
|
22
23
|
* @author SAP SE
|
|
23
|
-
* @version 1.
|
|
24
|
+
* @version 1.130.1
|
|
24
25
|
* @since 1.34
|
|
25
26
|
*
|
|
26
27
|
* @public
|
|
@@ -35,8 +36,11 @@ sap.ui.define([
|
|
|
35
36
|
* The color of the sector representing the fraction value.<br>The same color is used for the fraction
|
|
36
37
|
* value label defined either by the <code>fraction</code> property or by the <code>fractionLabel</code>
|
|
37
38
|
* property.
|
|
39
|
+
* For SAPUI5 1.x releases, we are going to use string as the type for Micro Charts instead of sap.m.ValueCSSColor.
|
|
40
|
+
* The value will only support MicroChartColorType from the SAPUI5 2.0 release.
|
|
41
|
+
* @type {sap.suite.ui.microchart.MicroChartColorType | sap.m.ValueCSSColor}
|
|
38
42
|
*/
|
|
39
|
-
color: { group: "Misc", type: "
|
|
43
|
+
color: { group: "Misc", type: "string", defaultValue: MicroChartColorType.Neutral },
|
|
40
44
|
|
|
41
45
|
/**
|
|
42
46
|
* The fraction value that defines the size of the colored sector.
|
|
@@ -73,5 +77,8 @@ sap.ui.define([
|
|
|
73
77
|
this.setAggregation("tooltip", "((AltText))", true);
|
|
74
78
|
};
|
|
75
79
|
|
|
80
|
+
MicroChartUtils.extendMicroChartSetColor(HarveyBallMicroChartItem);
|
|
81
|
+
|
|
82
|
+
|
|
76
83
|
return HarveyBallMicroChartItem;
|
|
77
84
|
});
|