@sapui5/sap.suite.ui.microchart 1.148.0 → 1.149.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 +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 +14 -3
- package/src/sap/suite/ui/microchart/HarveyBallMicroChartItem.js +1 -1
- 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/RadialMicroChartRenderer.js +1 -0
- package/src/sap/suite/ui/microchart/StackedBarMicroChart.js +28 -3
- package/src/sap/suite/ui/microchart/StackedBarMicroChartBar.js +1 -1
- package/src/sap/suite/ui/microchart/StackedBarMicroChartRenderer.js +1 -1
- package/src/sap/suite/ui/microchart/library.js +2 -2
- package/src/sap/suite/ui/microchart/themes/base/HarveyBallMicroChart.less +15 -0
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.
|
|
20
|
+
* @version 1.149.0
|
|
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.
|
|
49
|
+
* @version 1.149.0
|
|
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.
|
|
43
|
+
* @version 1.149.0
|
|
44
44
|
* @since 1.34
|
|
45
45
|
*
|
|
46
46
|
* @public
|
|
@@ -35,7 +35,7 @@ sap.ui.define([
|
|
|
35
35
|
* @extends sap.ui.core.Control
|
|
36
36
|
*
|
|
37
37
|
* @author SAP SE
|
|
38
|
-
* @version 1.
|
|
38
|
+
* @version 1.149.0
|
|
39
39
|
* @since 1.34
|
|
40
40
|
*
|
|
41
41
|
* @public
|
|
@@ -122,7 +122,15 @@ sap.ui.define([
|
|
|
122
122
|
* If this is set to True, the control will be hidden in 'No data' scenario.
|
|
123
123
|
* @since 1.84
|
|
124
124
|
*/
|
|
125
|
-
hideOnNoData: { type: "boolean", group: "Appearance", defaultValue: false }
|
|
125
|
+
hideOnNoData: { type: "boolean", group: "Appearance", defaultValue: false },
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* If set to true, the new XS width dimensions are applied to the chart,
|
|
129
|
+
* the width is increased, and the font size is reduced.
|
|
130
|
+
* The default value is false, preserving the original XS dimensions.
|
|
131
|
+
* @since 1.149
|
|
132
|
+
*/
|
|
133
|
+
xsWidth: { type: "boolean", group: "Appearance", defaultValue: false }
|
|
126
134
|
},
|
|
127
135
|
associations: {
|
|
128
136
|
|
|
@@ -339,7 +347,7 @@ sap.ui.define([
|
|
|
339
347
|
fControlWidth,
|
|
340
348
|
fPieAndTextWidth;
|
|
341
349
|
|
|
342
|
-
$Control.removeClass("sapSuiteHBMCLookL sapSuiteHBMCLookM sapSuiteHBMCLookS sapSuiteHBMCLookXS");
|
|
350
|
+
$Control.removeClass("sapSuiteHBMCLookL sapSuiteHBMCLookM sapSuiteHBMCLookS sapSuiteHBMCLookXS sapSuiteHBMCExtendedXS");
|
|
343
351
|
$TextContainer.removeClass("sapSuiteHBMCTextContainerHide");
|
|
344
352
|
|
|
345
353
|
// flex+svg was not a good match for IE, this fixes width and keeps aspect ratio
|
|
@@ -352,6 +360,9 @@ sap.ui.define([
|
|
|
352
360
|
|
|
353
361
|
if (fControlHeight < this.convertRemToPixels(HarveyBallMicroChart.THRESHOLD_LOOK_S)) {
|
|
354
362
|
$Control.addClass("sapSuiteHBMCLookXS");
|
|
363
|
+
if (this.getXsWidth()) {
|
|
364
|
+
$Control.addClass("sapSuiteHBMCExtendedXS");
|
|
365
|
+
}
|
|
355
366
|
// Change viewBox size of svg because small chart has different svg design
|
|
356
367
|
if (oSvg) {
|
|
357
368
|
oSvg.setAttribute("viewBox", "5 5 62 62");
|
|
@@ -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.
|
|
45
|
+
* @version 1.149.0
|
|
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.
|
|
34
|
+
* @version 1.149.0
|
|
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.
|
|
21
|
+
* @version 1.149.0
|
|
22
22
|
* @since 1.48.0
|
|
23
23
|
*
|
|
24
24
|
* @constructor
|
|
@@ -174,6 +174,7 @@ sap.ui.define([
|
|
|
174
174
|
oRm.openStart("svg");
|
|
175
175
|
oRm.class("sapSuiteRMCSvg");
|
|
176
176
|
oRm.attr("focusable", false);
|
|
177
|
+
oRm.attr("aria-hidden", "true");
|
|
177
178
|
oRm.attr("viewBox", "0 0 " + RadialMicroChartRenderer.FORM_RATIO + " " + RadialMicroChartRenderer.FORM_RATIO);
|
|
178
179
|
oRm.attr("version", "1.1");
|
|
179
180
|
oRm.attr("xmlns", "http://www.w3.org/2000/svg");
|
|
@@ -15,8 +15,9 @@ sap.ui.define([
|
|
|
15
15
|
"sap/ui/core/Core",
|
|
16
16
|
"sap/ui/core/Theming",
|
|
17
17
|
"sap/ui/core/Lib",
|
|
18
|
-
"./StackedBarMicroChartBar"
|
|
19
|
-
|
|
18
|
+
"./StackedBarMicroChartBar",
|
|
19
|
+
"sap/ui/core/theming/Parameters"
|
|
20
|
+
], function(jQuery, library, Control, MobileLibrary, FlexBox, MicroChartUtils, ResizeHandler, StackedBarMicroChartRenderer, Core, Theming, CoreLib, StackedBarMicroChartBar, Parameters) {
|
|
20
21
|
"use strict";
|
|
21
22
|
|
|
22
23
|
var Size = MobileLibrary.Size;
|
|
@@ -33,7 +34,7 @@ sap.ui.define([
|
|
|
33
34
|
* <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
35
|
* @extends sap.ui.core.Control
|
|
35
36
|
*
|
|
36
|
-
* @version 1.
|
|
37
|
+
* @version 1.149.0
|
|
37
38
|
* @since 1.44.0
|
|
38
39
|
*
|
|
39
40
|
* @public
|
|
@@ -210,6 +211,30 @@ sap.ui.define([
|
|
|
210
211
|
|
|
211
212
|
this.$().off("mouseenter");
|
|
212
213
|
this.$().off("mouseleave");
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
this._oColorCache = {};
|
|
217
|
+
this._bTriggerInvalidate = true;
|
|
218
|
+
var aChartData = this._calculateChartData();
|
|
219
|
+
var oState = { total: 0, resolved: 0 };
|
|
220
|
+
for (var i = 0; i < aChartData.length; i++) {
|
|
221
|
+
var sColor = aChartData[i].color;
|
|
222
|
+
if (sColor && !MicroChartColorType.hasOwnProperty(sColor) && !this._oColorCache.hasOwnProperty(sColor)) {
|
|
223
|
+
oState.total++;
|
|
224
|
+
this._oColorCache[sColor] = Parameters.get({
|
|
225
|
+
name: sColor,
|
|
226
|
+
callback: function(sColorKey, oCallbackState) {
|
|
227
|
+
return function(sResolvedColor) {
|
|
228
|
+
this._oColorCache[sColorKey] = sResolvedColor;
|
|
229
|
+
if (++oCallbackState.resolved === oCallbackState.total && !this._bTriggerInvalidate) {
|
|
230
|
+
this.invalidate();
|
|
231
|
+
}
|
|
232
|
+
}.bind(this);
|
|
233
|
+
}.bind(this)(sColor, oState)
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
this._bTriggerInvalidate = false;
|
|
213
238
|
};
|
|
214
239
|
|
|
215
240
|
StackedBarMicroChart.prototype.onAfterRendering = function() {
|
|
@@ -174,7 +174,7 @@ sap.ui.define([
|
|
|
174
174
|
/**
|
|
175
175
|
* @deprecated As of version 1.120
|
|
176
176
|
*/
|
|
177
|
-
oRm.style("background-color",
|
|
177
|
+
oRm.style("background-color", (oControl._oColorCache && oControl._oColorCache[oDataBar.color]) || oDataBar.color);
|
|
178
178
|
}
|
|
179
179
|
oRm.style("width", oDataBar.width + "%");
|
|
180
180
|
oRm.openEnd();
|
|
@@ -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.
|
|
24
|
+
* @version 1.149.0
|
|
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.
|
|
30
|
+
version: "1.149.0",
|
|
31
31
|
// library dependencies
|
|
32
32
|
dependencies: ["sap.ui.core", "sap.m"],
|
|
33
33
|
types: [
|
|
@@ -155,6 +155,21 @@ html.sap-phone .sapSuiteHBMC.sapSuiteHBMCSizeAuto,
|
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
+
/* Feature toggle: new XS size */
|
|
159
|
+
.sapSuiteHBMC.sapSuiteHBMCSizeXS.sapSuiteHBMCExtendedXS {
|
|
160
|
+
height: 1.5rem;
|
|
161
|
+
width: 7rem;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.sapSuiteHBMC.sapSuiteHBMCLookXS.sapSuiteHBMCExtendedXS {
|
|
165
|
+
|
|
166
|
+
& .sapSuiteHBMCValueContainer {
|
|
167
|
+
font-size: 0.75rem;
|
|
168
|
+
line-height: 0.75rem;
|
|
169
|
+
font-family: var(--sapFontFamily);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
158
173
|
.sapSuiteHBMCValue,
|
|
159
174
|
.sapSuiteHBMCValueScale,
|
|
160
175
|
.sapSuiteHBMCTotal,
|