Skip to content

Commit cddae92

Browse files
committed
Big commit
- overriding axis visibility by micromode issue fixed - many changes in Chart.js are just spacings and stuff (maybe caused by Prettier or sth.) - slice off nulls at end of ribbon as well to make a clean cut - several additions and changes to display toolptip for ribbon type
1 parent 85d2e09 commit cddae92

File tree

11 files changed

+3706
-311
lines changed

11 files changed

+3706
-311
lines changed

package-lock.json

Lines changed: 2670 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"gulp-htmlmin": "^3.0.0",
6868
"gulp-if": "^2.0.1",
6969
"gulp-imagemin": "^4.0.0",
70+
"gulp-install": "^1.1.0",
7071
"gulp-less": "^3.3.2",
7172
"gulp-main-npm-files": "^1.0.5",
7273
"gulp-plumber": "^1.1.0",
@@ -76,6 +77,7 @@
7677
"gulp-tap": "^1.0.1",
7778
"gulp-uglify": "^3.0.0",
7879
"gulp-ui5-preload": "^1.3.1",
80+
"gulp-util": "^3.0.8",
7981
"handlebars": "^4.0.11",
8082
"less-plugin-autoprefix": "^1.5.1",
8183
"ora": "^1.3.0",

src/demo/c3-viz-fusion.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88

99
<title>Chart Test</title>
1010

11-
<script id="sap-ui-bootstrap" src="https://openui5.hana.ondemand.com/1.38.6/resources/sap-ui-core.js"
12-
data-sap-ui-theme="sap_belize" data-sap-ui-theme-roots='{
11+
<script id="sap-ui-bootstrap" src="https://openui5.hana.ondemand.com/1.38.6/resources/sap-ui-core.js" data-sap-ui-theme="sap_belize"
12+
data-sap-ui-theme-roots='{
1313
"pulseshiftred1": "../../../../ui5-themes/pulseshiftred1/UI5"
14-
}' data-sap-ui-libs="sap.m" data-sap-ui-bindingSyntax="complex" data-sap-ui-compactVersion="edge"
15-
data-sap-ui-preload="async" data-sap-ui-resourceroots='{
14+
}' data-sap-ui-libs="sap.m" data-sap-ui-bindingSyntax="complex" data-sap-ui-compactVersion="edge" data-sap-ui-preload="async"
15+
data-sap-ui-resourceroots='{
1616
"ui5": "../ui5",
1717
"vendor": "../vendor",
1818
"sap.ui.demo.db" : "./"
1919
}' data-sap-ui-frameOptions="allow">
2020

2121

22-
</script>
22+
</script>
2323

2424

2525

@@ -73,4 +73,4 @@
7373

7474
<body class="sapUiBody">
7575
<div id="content"></div>
76-
</body>
76+
</body>

src/demo/controller/C3-viz-fusion.controller.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
sap.ui.define(['sap/ui/core/mvc/Controller'], function(Controller) {
1+
sap.ui.define(['sap/ui/core/mvc/Controller'], function (Controller) {
22
'use strict'
33

44
return Controller.extend('sap.ui.demo.db.controller.C3-viz-fusion', {
@@ -23,7 +23,7 @@ sap.ui.define(['sap/ui/core/mvc/Controller'], function(Controller) {
2323
series: [
2424
{
2525
name: 'Measurement',
26-
dataPoints: [100, 90, 150, 100, 120, 180, 90],
26+
dataPoints: [100, 90, 150, 100, 120, 180, 90, null, null, null],
2727
type: 'line',
2828
color: '#005073'
2929
},

src/demo/controller/Demo_Line.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
sap.ui.define(['sap/ui/core/mvc/Controller'], function(Controller) {
1+
sap.ui.define(['sap/ui/core/mvc/Controller'], function (Controller) {
22
'use strict'
33

44
return Controller.extend('sap.ui.demo.db.controller.Demo_Line', {
Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
sap.ui.define(['sap/ui/core/mvc/Controller'], function (Controller) {
2+
'use strict'
3+
4+
return Controller.extend('sap.ui.demo.db.controller.Hana-viz-fusion', {
5+
onInit() {
6+
var oModel = new sap.ui.model.json.JSONModel({
7+
title: 'Hana viz fusion',
8+
width: '100%',
9+
height: '300px',
10+
showTooltip: true,
11+
groupedTooltip: true,
12+
showLegend: true,
13+
xAxis: [
14+
{
15+
labels: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
16+
}
17+
],
18+
yAxis: [
19+
{
20+
title: 'Values'
21+
}
22+
],
23+
series: [
24+
{
25+
name: 'Measurement',
26+
type: 'line',
27+
color: '#005073',
28+
dataPoints: [
29+
{
30+
type: 'single-value',
31+
value: null
32+
},
33+
{
34+
type: 'single-value',
35+
value: null
36+
},
37+
{
38+
type: 'single-value',
39+
value: null
40+
},
41+
{
42+
type: 'single-value',
43+
value: null
44+
},
45+
{
46+
type: 'single-value',
47+
value: null
48+
},
49+
{
50+
type: 'single-value',
51+
value: 150
52+
},
53+
{
54+
type: 'single-value',
55+
value: 150
56+
},
57+
{
58+
type: 'single-value',
59+
value: 150
60+
},
61+
{
62+
type: 'single-value',
63+
value: 150
64+
},
65+
{
66+
type: 'single-value',
67+
value: 150
68+
}
69+
]
70+
},
71+
72+
{
73+
name: 'Measurement',
74+
type: 'line',
75+
color: '#005073',
76+
dataPoints: [
77+
{
78+
type: 'single-value',
79+
value: null
80+
},
81+
{
82+
type: 'single-value',
83+
value: null
84+
},
85+
{
86+
type: 'single-value',
87+
value: null
88+
},
89+
{
90+
type: 'single-value',
91+
value: null
92+
},
93+
{
94+
type: 'single-value',
95+
value: null
96+
},
97+
{
98+
type: 'single-value',
99+
value: 250
100+
},
101+
{
102+
type: 'single-value',
103+
value: 250
104+
},
105+
{
106+
type: 'single-value',
107+
value: 250
108+
},
109+
{
110+
type: 'single-value',
111+
value: 250
112+
},
113+
{
114+
type: 'single-value',
115+
value: 250
116+
}
117+
]
118+
},
119+
120+
{
121+
name: 'Confidence interval',
122+
type: 'ribbon-line',
123+
color: '#71c7ec',
124+
dataPoints: [
125+
{
126+
type: 'value-pair',
127+
low: null,
128+
high: null
129+
},
130+
{
131+
type: 'value-pair',
132+
low: null,
133+
high: null
134+
},
135+
{
136+
type: 'value-pair',
137+
low: null,
138+
high: null
139+
},
140+
{
141+
type: 'value-pair',
142+
low: null,
143+
high: null
144+
},
145+
{
146+
type: 'value-pair',
147+
low: 10,
148+
high: 180
149+
},
150+
{
151+
type: 'value-pair',
152+
low: 100,
153+
high: 300
154+
},
155+
{
156+
type: 'value-pair',
157+
low: 20,
158+
high: 150
159+
}
160+
]
161+
}
162+
]
163+
})
164+
this.getView().setModel(oModel, 'store')
165+
166+
var oModel2 = new sap.ui.model.json.JSONModel()
167+
oModel2.loadData(
168+
'https://xsabd13c549.hana.ondemand.com/BASF/ui/services/Forecast_Result.xsodata/CalcView/?$format=json'
169+
)
170+
}
171+
})
172+
})

src/demo/hana-viz-fusion.html

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6+
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
8+
9+
<title>Chart Test</title>
10+
11+
<script id="sap-ui-bootstrap" src="https://openui5.hana.ondemand.com/1.38.6/resources/sap-ui-core.js" data-sap-ui-theme="sap_belize"
12+
data-sap-ui-theme-roots='{
13+
"pulseshiftred1": "../../../../ui5-themes/pulseshiftred1/UI5"
14+
}' data-sap-ui-libs="sap.m" data-sap-ui-bindingSyntax="complex" data-sap-ui-compactVersion="edge" data-sap-ui-preload="async"
15+
data-sap-ui-resourceroots='{
16+
"ui5": "../ui5",
17+
"vendor": "../vendor",
18+
"sap.ui.demo.db" : "./"
19+
}' data-sap-ui-frameOptions="allow">
20+
21+
22+
</script>
23+
24+
25+
26+
<script>
27+
sap.ui.getCore().attachInit(function () {
28+
"use strict";
29+
30+
new sap.ui.xmlview({
31+
viewContent: jQuery("#myView").html()
32+
}).placeAt("content");
33+
});
34+
35+
</script>
36+
37+
<script id="myView" type="text/xml">
38+
<mvc:View controllerName="sap.ui.demo.db.controller.Hana-viz-fusion" xmlns="sap.m"
39+
xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns:viz="ui5.viz">
40+
<App>
41+
<Page title="{store>/title}">
42+
<content>
43+
<viz:Chart class="sapUiTinyMargin" id="myChart" showSubchart="true" width="{store>/width}"
44+
height="{store>/height}" showTooltip="{store>/showTooltip}" groupedTooltip="{store>/groupedTooltip}"
45+
showLegend="{store>/showLegend}" xAxisType="Indexed" series="{store>/series}">
46+
<viz:series>
47+
<viz:ChartSeries color="{store>color}" lineStyle="{store>lineStyle}" type="{store>type}"
48+
name=" {store>name}" data="{ path: 'store>dataPoints', templateShareable: true }">
49+
<viz:data>
50+
<viz:ChartDataPoint value="{store>value}" high="{store>high}" low="{store>low}" type="{store>type}"
51+
/>
52+
</viz:data>
53+
</viz:ChartSeries>
54+
</viz:series>
55+
<viz:xAxis>
56+
<viz:ChartAxis labels="{ path: 'store>/xAxis/0/labels'}">
57+
<viz:labels>
58+
<viz:ChartAxisLabel value="{store>}" />
59+
</viz:labels>
60+
</viz:ChartAxis>
61+
</viz:xAxis>
62+
<viz:yAxis>
63+
<viz:ChartAxis title="{store>/yAxis/0/title}">
64+
</viz:ChartAxis>
65+
</viz:yAxis>
66+
</viz:Chart>
67+
</content>
68+
</Page>
69+
</App>
70+
</mvc:View>
71+
</script>
72+
</head>
73+
74+
<body class="sapUiBody">
75+
<div id="content"></div>
76+
</body>

0 commit comments

Comments
 (0)