@sapui5/sap.chart 1.99.1 → 1.102.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.99.1",
3
+ "version": "1.102.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-2022 SAP SE. All rights reserved.</copyright>
8
- <version>1.99.1</version>
8
+ <version>1.102.0</version>
9
9
 
10
10
  <documentation>Smart viz control based on Vizframe</documentation>
11
11
 
@@ -89,6 +89,9 @@ sap.ui.define([
89
89
  ) {
90
90
  "use strict";
91
91
 
92
+ var SelectionBehavior = library.SelectionBehavior,
93
+ SelectionMode = library.SelectionMode;
94
+
92
95
  /**
93
96
  * Constructor for a new Chart.
94
97
  *
@@ -147,12 +150,12 @@ sap.ui.define([
147
150
  * Chart selection behavior.
148
151
  *
149
152
  */
150
- selectionBehavior : {type: "sap.chart.SelectionBehavior", defaultValue: sap.chart.SelectionBehavior.DataPoint},
153
+ selectionBehavior : {type: "sap.chart.SelectionBehavior", defaultValue: SelectionBehavior.DataPoint},
151
154
  /**
152
155
  * Chart selection mode.
153
156
  *
154
157
  */
155
- selectionMode : {type: "sap.chart.SelectionMode", defaultValue: sap.chart.SelectionMode.Multi},
158
+ selectionMode : {type: "sap.chart.SelectionMode", defaultValue: SelectionMode.Multi},
156
159
  /**
157
160
  * Enable pagination mode.
158
161
  *
@@ -1026,9 +1029,9 @@ sap.ui.define([
1026
1029
  var aVisibleDimensions = this._getVisibleDimensions();
1027
1030
  var that = this;
1028
1031
  var vizSelection = this._getVizFrame().vizSelection();
1029
- if (this.getSelectionBehavior().toUpperCase() === sap.chart.SelectionBehavior.Category) {
1032
+ if (this.getSelectionBehavior().toUpperCase() === SelectionBehavior.Category) {
1030
1033
  vizSelection = vizSelection.category;
1031
- } else if (this.getSelectionBehavior().toUpperCase() === sap.chart.SelectionBehavior.Series) {
1034
+ } else if (this.getSelectionBehavior().toUpperCase() === SelectionBehavior.Series) {
1032
1035
  vizSelection = vizSelection.series;
1033
1036
  }
1034
1037
  var bHasHierarchyDim = false;
@@ -1113,9 +1116,9 @@ sap.ui.define([
1113
1116
  var selectionBehavior = this.getSelectionBehavior();
1114
1117
  var selectedDims = this._getVisibleDimensions().concat(this.getInResultDimensions()).filter(function(sDim) {
1115
1118
  var oDim = this.getDimensionByName(sDim);
1116
- if (selectionBehavior.toUpperCase() === sap.chart.SelectionBehavior.Category) {
1119
+ if (selectionBehavior.toUpperCase() === SelectionBehavior.Category) {
1117
1120
  return oDim._getFixedRole() === "category" || oDim._getFixedRole() === "category2";
1118
- } else if (selectionBehavior.toUpperCase() === sap.chart.SelectionBehavior.Series) {
1121
+ } else if (selectionBehavior.toUpperCase() === SelectionBehavior.Series) {
1119
1122
  return oDim._getFixedRole() === "series";
1120
1123
  }
1121
1124
  return true;
@@ -1125,9 +1128,9 @@ sap.ui.define([
1125
1128
  return oDim instanceof HierarchyDimension;
1126
1129
  }.bind(this));
1127
1130
  var selectedItems;
1128
- if (selectionBehavior.toUpperCase() === sap.chart.SelectionBehavior.Category) {
1131
+ if (selectionBehavior.toUpperCase() === SelectionBehavior.Category) {
1129
1132
  selectedItems = this.getSelectedCategories().categories;
1130
- } else if (selectionBehavior.toUpperCase() === sap.chart.SelectionBehavior.Series) {
1133
+ } else if (selectionBehavior.toUpperCase() === SelectionBehavior.Series) {
1131
1134
  selectedItems = this.getSelectedSeries().series;
1132
1135
  } else {
1133
1136
  selectedItems = this.getSelectedDataPoints().dataPoints;
@@ -2420,7 +2423,7 @@ sap.ui.define([
2420
2423
  * @returns {this} Reference to <code>this</code> in order to allow method chaining
2421
2424
  */
2422
2425
  Chart.prototype.setSelectedDataPoints = function(aDataPoints) {
2423
- if (this.getSelectionMode() !== library.SelectionMode.None) {
2426
+ if (this.getSelectionMode() !== SelectionMode.None) {
2424
2427
  var oBinding = this.getBinding("data"),
2425
2428
  oVizFrame = this._getVizFrame();
2426
2429
  if (!oBinding || !oVizFrame || this.getSelectionBehavior().toUpperCase() !== "DATAPOINT") {
@@ -2456,14 +2459,14 @@ sap.ui.define([
2456
2459
  * @returns {this} Reference to <code>this</code> in order to allow method chaining
2457
2460
  */
2458
2461
  Chart.prototype.addSelectedDataPoints = function(aDataPoints) {
2459
- if (this.getSelectionMode() !== library.SelectionMode.None) {
2462
+ if (this.getSelectionMode() !== SelectionMode.None) {
2460
2463
  var oBinding = this.getBinding("data"),
2461
2464
  oVizFrame = this._getVizFrame();
2462
2465
  if (!oBinding || !oVizFrame || this.getSelectionBehavior().toUpperCase() !== "DATAPOINT") {
2463
2466
  return this;
2464
2467
  }
2465
2468
  oVizFrame.vizSelection(this._buildSelectedDataPoints(oBinding, aDataPoints), {
2466
- selectionMode: library.SelectionMode.Multi
2469
+ selectionMode: SelectionMode.Multi
2467
2470
  });
2468
2471
  }
2469
2472
  return this;
@@ -2557,7 +2560,7 @@ sap.ui.define([
2557
2560
  * @returns {this} Reference to <code>this</code> in order to allow method chaining
2558
2561
  */
2559
2562
  Chart.prototype.removeSelectedDataPoints = function(aDataPoints) {
2560
- if (this.getSelectionMode() !== library.SelectionMode.None) {
2563
+ if (this.getSelectionMode() !== SelectionMode.None) {
2561
2564
  var oBinding = this.getBinding("data"),
2562
2565
  oVizFrame = this._getVizFrame();
2563
2566
  if (!oVizFrame || this.getSelectionBehavior().toUpperCase() !== "DATAPOINT") {
@@ -2596,7 +2599,7 @@ sap.ui.define([
2596
2599
  * @returns {this} Reference to <code>this</code> in order to allow method chaining
2597
2600
  */
2598
2601
  Chart.prototype.setSelectedCategories = function(aCategories) {
2599
- if (this.getSelectionMode() !== library.SelectionMode.None) {
2602
+ if (this.getSelectionMode() !== SelectionMode.None) {
2600
2603
  var oVizFrame = this._getVizFrame(),
2601
2604
  sBehavior = this.getSelectionBehavior().toUpperCase();
2602
2605
  if (!oVizFrame || sBehavior !== "CATEGORY") {
@@ -2634,14 +2637,14 @@ sap.ui.define([
2634
2637
  * @returns {this} Reference to <code>this</code> in order to allow method chaining
2635
2638
  */
2636
2639
  Chart.prototype.addSelectedCategories = function(aCategories) {
2637
- if (this.getSelectionMode() !== library.SelectionMode.None) {
2640
+ if (this.getSelectionMode() !== SelectionMode.None) {
2638
2641
  var oVizFrame = this._getVizFrame(),
2639
2642
  sBehavior = this.getSelectionBehavior().toUpperCase();
2640
- if (!oVizFrame || sBehavior !== "CATEGORY") {
2643
+ if (!oVizFrame || sBehavior !== SelectionBehavior.Category) {
2641
2644
  return this;
2642
2645
  }
2643
2646
  oVizFrame.vizSelection(aCategories.map(SelectionAPIUtils.toVizCSCtx), {
2644
- selectionMode: library.SelectionMode.Multi
2647
+ selectionMode: SelectionMode.Multi
2645
2648
  });
2646
2649
  }
2647
2650
  return this;
@@ -2671,10 +2674,10 @@ sap.ui.define([
2671
2674
  * @returns {this} Reference to <code>this</code> in order to allow method chaining
2672
2675
  */
2673
2676
  Chart.prototype.removeSelectedCategories = function(aCategories) {
2674
- if (this.getSelectionMode() !== library.SelectionMode.None) {
2677
+ if (this.getSelectionMode() !== SelectionMode.None) {
2675
2678
  var oVizFrame = this._getVizFrame(),
2676
2679
  sBehavior = this.getSelectionBehavior().toUpperCase();
2677
- if (!oVizFrame || sBehavior !== "CATEGORY") {
2680
+ if (!oVizFrame || sBehavior !== SelectionBehavior.Category) {
2678
2681
  return this;
2679
2682
  }
2680
2683
  oVizFrame.vizSelection(aCategories.map(SelectionAPIUtils.toVizCSCtx), {
@@ -2708,7 +2711,7 @@ sap.ui.define([
2708
2711
  Chart.prototype.getSelectedCategories = function() {
2709
2712
  var oVizFrame = this._getVizFrame(),
2710
2713
  sBehavior = this.getSelectionBehavior().toUpperCase();
2711
- if (!oVizFrame || sBehavior !== "CATEGORY") {
2714
+ if (!oVizFrame || sBehavior !== SelectionBehavior.Category) {
2712
2715
  return {
2713
2716
  count: 0,
2714
2717
  categories: []
@@ -2747,10 +2750,10 @@ sap.ui.define([
2747
2750
  * @returns {this} Reference to <code>this</code> in order to allow method chaining
2748
2751
  */
2749
2752
  Chart.prototype.setSelectedSeries = function(aSeries) {
2750
- if (this.getSelectionMode() !== library.SelectionMode.None) {
2753
+ if (this.getSelectionMode() !== SelectionMode.None) {
2751
2754
  var oVizFrame = this._getVizFrame(),
2752
2755
  sBehavior = this.getSelectionBehavior().toUpperCase();
2753
- if (!oVizFrame || sBehavior !== "SERIES") {
2756
+ if (!oVizFrame || sBehavior !== SelectionBehavior.Series) {
2754
2757
  return this;
2755
2758
  }
2756
2759
  oVizFrame.vizSelection([], {clearSelection: true});
@@ -2786,15 +2789,15 @@ sap.ui.define([
2786
2789
  * @returns {this} Reference to <code>this</code> in order to allow method chaining
2787
2790
  */
2788
2791
  Chart.prototype.addSelectedSeries = function(aSeries) {
2789
- if (this.getSelectionMode() !== library.SelectionMode.None) {
2792
+ if (this.getSelectionMode() !== SelectionMode.None) {
2790
2793
  var oVizFrame = this._getVizFrame(),
2791
2794
  sBehavior = this.getSelectionBehavior().toUpperCase();
2792
- if (!oVizFrame || sBehavior !== "SERIES") {
2795
+ if (!oVizFrame || sBehavior !== SelectionBehavior.Series) {
2793
2796
  return this;
2794
2797
  }
2795
2798
  var aSelectedSeries = this._getEffectiveContinuesSeries(aSeries);
2796
2799
  oVizFrame.vizSelection(aSelectedSeries.map(SelectionAPIUtils.toVizCSCtx), {
2797
- selectionMode: library.SelectionMode.Multi
2800
+ selectionMode: SelectionMode.Multi
2798
2801
  });
2799
2802
  }
2800
2803
  return this;
@@ -2824,10 +2827,10 @@ sap.ui.define([
2824
2827
  * @returns {this} Reference to <code>this</code> in order to allow method chaining
2825
2828
  */
2826
2829
  Chart.prototype.removeSelectedSeries = function(aSeries) {
2827
- if (this.getSelectionMode() !== library.SelectionMode.None) {
2830
+ if (this.getSelectionMode() !== SelectionMode.None) {
2828
2831
  var oVizFrame = this._getVizFrame(),
2829
2832
  sBehavior = this.getSelectionBehavior().toUpperCase();
2830
- if (!oVizFrame || sBehavior !== "SERIES") {
2833
+ if (!oVizFrame || sBehavior !== SelectionBehavior.Series) {
2831
2834
  return this;
2832
2835
  }
2833
2836
  var aSelectedSeries = this._getEffectiveContinuesSeries(aSeries);
@@ -2864,7 +2867,7 @@ sap.ui.define([
2864
2867
  Chart.prototype.getSelectedSeries = function() {
2865
2868
  var oVizFrame = this._getVizFrame(),
2866
2869
  sBehavior = this.getSelectionBehavior().toUpperCase();
2867
- if (!oVizFrame || sBehavior !== "SERIES") {
2870
+ if (!oVizFrame || sBehavior !== SelectionBehavior.Series) {
2868
2871
  return {
2869
2872
  count: 0,
2870
2873
  series: []
@@ -3361,7 +3364,7 @@ sap.ui.define([
3361
3364
  /**
3362
3365
  * @private
3363
3366
  */
3364
- Chart.getChartTypes = sap.chart.api.getChartTypes;
3367
+ Chart.getChartTypes = library.api.getChartTypes;
3365
3368
 
3366
3369
  /**
3367
3370
  * Returns available and unavailable chart types with current Dimensions and Measures.
@@ -3710,7 +3713,7 @@ sap.ui.define([
3710
3713
  var that = this;
3711
3714
  var sTimeDim = this.getVisibleDimensions().filter(function(sDim) {
3712
3715
  var oDim = that.getDimensionByName(sDim);
3713
- return (oDim instanceof sap.chart.data.TimeDimension && oDim._getFixedRole() === "category");
3716
+ return (oDim instanceof TimeDimension && oDim._getFixedRole() === "category");
3714
3717
  })[0];
3715
3718
 
3716
3719
  var sweekConfig = "ISO";
@@ -6,19 +6,34 @@
6
6
  /**
7
7
  * Initialization Code and shared classes of library sap.chart.
8
8
  */
9
- sap.ui.define(['sap/viz/ui5/format/ChartFormatter', // library dependency
10
- 'sap/ui/core/library', 'sap/viz/library', 'sap/chart/utils/RoleFitter', 'sap/chart/utils/ChartTypeAdapterUtils', 'sap/chart/ChartType', 'sap/chart/data/Dimension', 'sap/chart/data/Measure', 'sap/chart/AutoScaleMode', 'sap/chart/ScaleBehavior', 'sap/chart/data/MeasureSemantics', 'sap/chart/coloring/CriticalityType', 'sap/chart/ColoringType', 'sap/chart/data/DimensionRoleType', 'sap/chart/data/MeasureRoleType'], function(
9
+ sap.ui.define([
10
+ 'sap/viz/ui5/format/ChartFormatter',
11
+ 'sap/ui/core/library', // library dependency
12
+ 'sap/viz/library',
13
+ 'sap/chart/utils/RoleFitter',
14
+ 'sap/chart/utils/ChartTypeAdapterUtils',
15
+ 'sap/chart/ChartType',
16
+ 'sap/chart/data/Dimension',
17
+ 'sap/chart/data/Measure',
18
+ 'sap/chart/AutoScaleMode',
19
+ 'sap/chart/ScaleBehavior',
20
+ 'sap/chart/data/MeasureSemantics',
21
+ 'sap/chart/coloring/CriticalityType',
22
+ 'sap/chart/ColoringType',
23
+ 'sap/chart/data/DimensionRoleType',
24
+ 'sap/chart/data/MeasureRoleType'
25
+ ], function(
11
26
  ChartFormatter,
12
- corelib,
13
- vizlib,
14
- RoleFitter,
15
- ChartTypeAdapterUtils,
16
- ChartType,
17
- Dimension,
18
- Measure,
19
- AutoScaleMode,
20
- ScaleBehavior,
21
- MeasureSemantics
27
+ corelib,
28
+ vizlib,
29
+ RoleFitter,
30
+ ChartTypeAdapterUtils,
31
+ ChartType,
32
+ Dimension,
33
+ Measure,
34
+ AutoScaleMode,
35
+ ScaleBehavior,
36
+ MeasureSemantics
22
37
  ) {
23
38
  "use strict";
24
39
 
@@ -26,12 +41,10 @@ sap.ui.define(['sap/viz/ui5/format/ChartFormatter', // library dependency
26
41
  * Chart controls based on Vizframe
27
42
  *
28
43
  * @namespace
29
- * @name sap.chart
44
+ * @alias sap.chart
30
45
  * @public
31
46
  */
32
-
33
- // delegate further initialization of this library to the Core
34
- sap.ui.getCore().initLibrary({
47
+ var thisLib = sap.ui.getCore().initLibrary({
35
48
  name: "sap.chart",
36
49
  dependencies: ["sap.ui.core", "sap.viz"],
37
50
  types: [
@@ -48,18 +61,16 @@ sap.ui.define(['sap/viz/ui5/format/ChartFormatter', // library dependency
48
61
  "sap.chart.data.Measure"
49
62
  ],
50
63
  noLibraryCSS: true,
51
- version: "1.99.1"
64
+ version: "1.102.0"
52
65
  });
53
66
 
54
-
55
67
  /**
56
68
  * Enumeration for supported selection mode in analytical chart
57
69
  *
58
70
  * @enum {string}
59
71
  * @public
60
- * @alias sap.chart.SelectionMode
61
72
  */
62
- sap.chart.SelectionMode = {
73
+ thisLib.SelectionMode = {
63
74
  /**
64
75
  * Multi selection mode, multiple sets of data points can be selected at once.
65
76
  * @public
@@ -82,9 +93,8 @@ sap.ui.define(['sap/viz/ui5/format/ChartFormatter', // library dependency
82
93
  *
83
94
  * @enum {string}
84
95
  * @public
85
- * @alias sap.chart.SelectionBehavior
86
96
  */
87
- sap.chart.SelectionBehavior = {
97
+ thisLib.SelectionBehavior = {
88
98
  /**
89
99
  * Data point selection behavior, only one data point can be selected at once.
90
100
  * @public
@@ -107,9 +117,8 @@ sap.ui.define(['sap/viz/ui5/format/ChartFormatter', // library dependency
107
117
  *
108
118
  * @enum {string}
109
119
  * @public
110
- * @alias sap.chart.MessageId
111
120
  */
112
- sap.chart.MessageId = {
121
+ thisLib.MessageId = {
113
122
  /**
114
123
  * No data message, metadata is defined but all data values are empty.
115
124
  * @public
@@ -123,22 +132,23 @@ sap.ui.define(['sap/viz/ui5/format/ChartFormatter', // library dependency
123
132
  };
124
133
 
125
134
  /**
126
- * Package with additional chart APIs
135
+ * Package with additional chart APIs.
127
136
  * @namespace
128
137
  * @public
129
138
  */
130
- sap.chart.api = {};
139
+ thisLib.api = {};
131
140
 
132
141
  /**
133
142
  * Returns all chart types currently supported by chart control (subset of viz types).
134
143
  *
135
144
  * @public
136
145
  * @returns {object} a map with chartType as key, localized chart name as value.
146
+ * @alias sap.chart.api.getChartTypes
137
147
  */
138
- sap.chart.api.getChartTypes = function() {
148
+ thisLib.api.getChartTypes = function() {
139
149
  var oBundle = sap.ui.getCore().getLibraryResourceBundle("sap.chart.messages");
140
- return Object.keys(sap.chart.ChartType).reduce(function(oMap, sChartTypeKey) {
141
- var sChartType = sap.chart.ChartType[sChartTypeKey];
150
+ return Object.keys(ChartType).reduce(function(oMap, sChartTypeKey) {
151
+ var sChartType = ChartType[sChartTypeKey];
142
152
  oMap[sChartType] = oBundle.getText("info/" + sChartType);
143
153
  return oMap;
144
154
  }, {});
@@ -149,23 +159,22 @@ sap.ui.define(['sap/viz/ui5/format/ChartFormatter', // library dependency
149
159
  * @namespace
150
160
  * @public
151
161
  */
152
- sap.chart.data = sap.chart.data || {};
162
+ thisLib.data = thisLib.data || {};
153
163
 
154
164
  /**
155
165
  * Package with colorings enumeration
156
166
  * @namespace
157
167
  * @public
158
168
  */
159
- sap.chart.coloring = sap.chart.coloring || {};
169
+ thisLib.coloring = thisLib.coloring || {};
160
170
 
161
171
  /**
162
172
  * Enumeration for supported ImprovementDirection types in analytical chart
163
173
  *
164
174
  * @enum {string}
165
175
  * @public
166
- * @alias sap.chart.coloring.ImprovementDirectionType
167
176
  */
168
- sap.chart.coloring.ImprovementDirectionType = {
177
+ thisLib.coloring.ImprovementDirectionType = {
169
178
  /**
170
179
  * Lower is better.
171
180
  *
@@ -210,106 +219,102 @@ sap.ui.define(['sap/viz/ui5/format/ChartFormatter', // library dependency
210
219
  };
211
220
 
212
221
  /**
213
- * Enumeration for supported Gradation single color scheme in analytical chart
214
- *
215
- * @enum {string}
216
- * @public
217
- * @alias sap.chart.coloring.GradationSingleColorScheme
218
- */
219
- sap.chart.coloring.GradationSingleColorScheme = {
220
- /**
221
- * NoSemantics
222
- * @public
223
- */
224
- NoSemantics: "NoSemantics",
222
+ * Enumeration for supported Gradation single color scheme in analytical chart
223
+ *
224
+ * @enum {string}
225
+ * @public
226
+ */
227
+ thisLib.coloring.GradationSingleColorScheme = {
228
+ /**
229
+ * NoSemantics
230
+ * @public
231
+ */
232
+ NoSemantics: "NoSemantics",
225
233
 
226
- /**
227
- * Positive
228
- * @public
229
- */
230
- Positive: "Positive",
234
+ /**
235
+ * Positive
236
+ * @public
237
+ */
238
+ Positive: "Positive",
231
239
 
232
- /**
233
- * Negative
234
- * @public
235
- */
236
- Negative: "Negative"
237
- };
240
+ /**
241
+ * Negative
242
+ * @public
243
+ */
244
+ Negative: "Negative"
245
+ };
238
246
 
239
- /**
240
- * Enumeration for supported Gradation diverging color scheme in analytical chart
241
- *
242
- * @enum {string}
243
- * @public
244
- * @alias sap.chart.coloring.GradationDivergingColorScheme
245
- */
246
- sap.chart.coloring.GradationDivergingColorScheme = {
247
- /**
248
- * NoSemantics
249
- * @public
250
- */
251
- NoSemantics: "NoSemantics",
247
+ /**
248
+ * Enumeration for supported Gradation diverging color scheme in analytical chart
249
+ *
250
+ * @enum {string}
251
+ * @public
252
+ */
253
+ thisLib.coloring.GradationDivergingColorScheme = {
254
+ /**
255
+ * NoSemantics
256
+ * @public
257
+ */
258
+ NoSemantics: "NoSemantics",
252
259
 
253
- /**
254
- * PositiveToNegative
255
- * @public
256
- */
257
- PositiveToNegative: "PositiveToNegative",
260
+ /**
261
+ * PositiveToNegative
262
+ * @public
263
+ */
264
+ PositiveToNegative: "PositiveToNegative",
258
265
 
259
- /**
260
- * NegativeToPositive
261
- * @public
262
- */
263
- NegativeToPositive: "NegativeToPositive",
266
+ /**
267
+ * NegativeToPositive
268
+ * @public
269
+ */
270
+ NegativeToPositive: "NegativeToPositive",
264
271
 
265
- /**
266
- * PositiveToNegative
267
- * @public
268
- */
269
- ColdToHot: "ColdToHot",
272
+ /**
273
+ * PositiveToNegative
274
+ * @public
275
+ */
276
+ ColdToHot: "ColdToHot",
270
277
 
271
- /**
272
- * HotToCold
273
- * @public
274
- */
275
- HotToCold: "HotToCold"
276
- };
278
+ /**
279
+ * HotToCold
280
+ * @public
281
+ */
282
+ HotToCold: "HotToCold"
283
+ };
277
284
 
278
- /**
279
- * Enumeration for supported Gradation target color scheme in analytical chart
280
- *
281
- * @enum {string}
282
- * @public
283
- * @alias sap.chart.coloring.GradationTargetColorScheme
284
- */
285
- sap.chart.coloring.GradationTargetColorScheme = {
286
- /**
287
- * PositiveTarget
288
- * @public
289
- */
290
- PositiveTarget: "PositiveTarget"
291
- };
285
+ /**
286
+ * Enumeration for supported Gradation target color scheme in analytical chart
287
+ *
288
+ * @enum {string}
289
+ * @public
290
+ */
291
+ thisLib.coloring.GradationTargetColorScheme = {
292
+ /**
293
+ * PositiveTarget
294
+ * @public
295
+ */
296
+ PositiveTarget: "PositiveTarget"
297
+ };
292
298
 
293
- /**
294
- * Enumeration for supported Gradation color saturation in analytical chart
295
- *
296
- * @enum {string}
297
- * @public
298
- * @alias sap.chart.coloring.GradationSaturation
299
- */
300
- sap.chart.coloring.GradationSaturation = {
301
- /**
302
- * LightToDark
303
- * @public
304
- */
305
- LightToDark: "LightToDark",
299
+ /**
300
+ * Enumeration for supported Gradation color saturation in analytical chart
301
+ *
302
+ * @enum {string}
303
+ * @public
304
+ */
305
+ thisLib.coloring.GradationSaturation = {
306
+ /**
307
+ * LightToDark
308
+ * @public
309
+ */
310
+ LightToDark: "LightToDark",
306
311
 
307
- /**
308
- * DarkToLight
309
- * @public
310
- */
311
- DarkToLight: "DarkToLight"
312
- };
312
+ /**
313
+ * DarkToLight
314
+ * @public
315
+ */
316
+ DarkToLight: "DarkToLight"
317
+ };
313
318
 
314
319
  /**
315
320
  * Get the Dimensions and Measures layout for a certain ChartType with provided Dimensions and Measures.
@@ -327,8 +332,9 @@ sap.ui.define(['sap/viz/ui5/format/ChartFormatter', // library dependency
327
332
  * errors: [], // reasons of why the chart cannot be rendered with the given (chartType, dimensions, measures) combination
328
333
  * }
329
334
  * </pre>
335
+ * @alias sap.chart.api.getChartTypeLayout
330
336
  */
331
- sap.chart.api.getChartTypeLayout = function(sChartType, aDimensions, aMeasures) {
337
+ thisLib.api.getChartTypeLayout = function(sChartType, aDimensions, aMeasures) {
332
338
  var aDims, aMsrs;
333
339
  if (!sChartType) {
334
340
  throw new Error("Invalid chart type: " + String(sChartType));
@@ -383,6 +389,6 @@ sap.ui.define(['sap/viz/ui5/format/ChartFormatter', // library dependency
383
389
  sap.viz.api.env.Format.numericFormatter(chartFormatter);
384
390
  }
385
391
 
386
- return sap.chart;
392
+ return thisLib;
387
393
 
388
394
  });
@@ -130,7 +130,7 @@ sap.ui.define(['sap/ui/model/Sorter', "sap/ui/thirdparty/jquery"], function(Sort
130
130
  return;
131
131
  }
132
132
 
133
- var iTotalSize = oBinding instanceof sap.ui.model.analytics.AnalyticalBinding ? oBinding.getTotalSize() : oBinding.getLength();
133
+ var iTotalSize = oBinding.isA("sap.ui.model.analytics.AnalyticalBinding") ? oBinding.getTotalSize() : oBinding.getLength();
134
134
 
135
135
  var oPagingOption;
136
136
  if (iTotalSize >= 0) {
@@ -3,9 +3,11 @@
3
3
  * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define([
6
- 'sap/chart/utils/ChartUtils'
6
+ 'sap/chart/utils/ChartUtils',
7
+ 'sap/chart/data/TimeDimension'
7
8
  ],function(
8
- ChartUtils
9
+ ChartUtils,
10
+ TimeDimension
9
11
  ) {
10
12
  "use strict";
11
13
 
@@ -13,7 +15,7 @@ sap.ui.define([
13
15
 
14
16
  function timeSeriesAdaptHandler(sChartType, aDimensions) {
15
17
  var bHasTimeDimension = aDimensions.some(function(oDim) {
16
- return oDim instanceof sap.chart.data.TimeDimension;
18
+ return oDim instanceof TimeDimension;
17
19
  });
18
20
  if (bHasTimeDimension) {
19
21
  return ChartUtils.CONFIG.oAdapteredChartTypes[sChartType];
@@ -266,7 +266,8 @@ sap.ui.define([
266
266
  "Edm.DateTimeOffset": Dimension
267
267
  },
268
268
  updateModel: function(oChart, aDimensions, aMeasures) {
269
- if (oChart.getModel() instanceof sap.ui.model.odata.ODataModel) {
269
+ var V1ODataModel = sap.ui.require("sap/ui/model/odata/ODataModel");
270
+ if (V1ODataModel && oChart.getModel() instanceof V1ODataModel) {
270
271
  var aDimColumns = aDimensions.reduce(function(aDimColumns, oDim) {
271
272
  if (oDim.getTextProperty()) {
272
273
  return aDimColumns.concat(oDim.getName(), oDim.getTextProperty());
@@ -9,10 +9,12 @@ sap.ui.define([
9
9
  'sap/viz/ui5/controls/common/feeds/FeedItem',
10
10
  'sap/viz/ui5/controls/common/feeds/AnalysisObject',
11
11
  'sap/chart/TimeUnitType',
12
+ 'sap/chart/data/TimeDimension',
12
13
  'sap/chart/utils/DateFormatUtil',
13
14
  'sap/chart/utils/ChartUtils',
14
15
  'sap/chart/utils/RoleMapper',
15
16
  'sap/chart/ChartLog',
17
+ 'sap/ui/model/type/String',
16
18
  "sap/ui/thirdparty/jquery"
17
19
  ], function(
18
20
  DimensionDefinition,
@@ -20,10 +22,12 @@ sap.ui.define([
20
22
  FeedItem,
21
23
  AnalysisObject,
22
24
  TimeUnitType,
25
+ TimeDimension,
23
26
  DateFormatUtil,
24
27
  ChartUtils,
25
28
  RoleMapper,
26
29
  ChartLog,
30
+ TypeString,
27
31
  jQuery
28
32
  ) {
29
33
  "use strict";
@@ -193,7 +197,7 @@ sap.ui.define([
193
197
  type: sType
194
198
  };
195
199
 
196
- if (oDorM instanceof sap.chart.data.TimeDimension) {
200
+ if (oDorM instanceof TimeDimension) {
197
201
  analysisObj.dataType = "Date";
198
202
  }
199
203
 
@@ -218,13 +222,13 @@ sap.ui.define([
218
222
  formatter: fFormatter,
219
223
  parts: [{
220
224
  path: sName,
221
- type: new sap.ui.model.type.String()
225
+ type: new TypeString()
222
226
  }]
223
227
  };
224
228
  if (sText) {
225
229
  oDimConfig.displayValue.parts.push({
226
230
  path: sText,
227
- type: new sap.ui.model.type.String()
231
+ type: new TypeString()
228
232
  });
229
233
  }
230
234
  } else if (bDisplyaText && sText) {
@@ -232,7 +236,7 @@ sap.ui.define([
232
236
  }
233
237
 
234
238
  var oDimensionDefinition = new DimensionDefinition(oDimConfig);
235
- if (isTimeChart && oDimension instanceof sap.chart.data.TimeDimension) {
239
+ if (isTimeChart && oDimension instanceof TimeDimension) {
236
240
  var oDateInstance = DateFormatUtil.getInstance(oDimension.getTimeUnit());
237
241
  if (oDateInstance) {
238
242
  var fnParser = oDateInstance.parse.bind(oDateInstance);
@@ -595,7 +599,7 @@ sap.ui.define([
595
599
  if (isTimeChart) {
596
600
  var timeAxis;
597
601
  for (var i = 0; i < aDimensions.length; i++) {
598
- if (aDimensions[i] instanceof sap.chart.data.TimeDimension) {
602
+ if (aDimensions[i] instanceof TimeDimension) {
599
603
  timeAxis = aDimensions[i];
600
604
  break;
601
605
  }