@@ -11,9 +11,9 @@ app.initOrderControllingChart = (labels, datasets, budget, currency, currentLabe
11
11
canvas = document .getElementById (' order_controlling_chart' )
12
12
ctx = canvas .getContext (' 2d' )
13
13
14
- Chart .defaults .global . defaultFontFamily = ' Roboto, Helvetica, Arial, sans-serif'
15
- Chart .defaults .global . defaultFontColor = ' #444444'
16
- Chart .defaults .global . defaultFontSize = 14
14
+ Chart .defaults .font . family = ' Roboto, Helvetica, Arial, sans-serif'
15
+ Chart .defaults .color = ' #444444'
16
+ Chart .defaults .font . size = 14
17
17
18
18
budgetColor = ' #B44B5B'
19
19
todayColor = ' #f0ad4e'
@@ -31,13 +31,13 @@ app.initOrderControllingChart = (labels, datasets, budget, currency, currentLabe
31
31
options : {
32
32
responsive : false ,
33
33
scales : {
34
- xAxes : [ {
34
+ x : {
35
35
stacked : true ,
36
36
gridLines : {
37
37
color : gridColor
38
38
}
39
- }] ,
40
- yAxes : [ {
39
+ },
40
+ y : {
41
41
stacked : true ,
42
42
ticks : {
43
43
beginAtZero : true ,
@@ -47,11 +47,11 @@ app.initOrderControllingChart = (labels, datasets, budget, currency, currentLabe
47
47
color : gridLightColor,
48
48
zeroLineColor : gridColor
49
49
},
50
- }] ,
50
+ },
51
51
},
52
52
legend : {
53
53
labels : {
54
- boxWidth : Chart .defaults .global . defaultFontSize
54
+ boxWidth : Chart .defaults .font . size
55
55
}
56
56
},
57
57
tooltips : {
@@ -76,8 +76,8 @@ app.initOrderControllingChart = (labels, datasets, budget, currency, currentLabe
76
76
xPadding : 2 ,
77
77
yPadding : 3 ,
78
78
backgroundColor : ' #ffffff'
79
- fontFamily : Chart .defaults .global . defaultFontFamily ,
80
- fontSize : Chart .defaults .global . defaultFontSize ,
79
+ fontFamily : Chart .defaults .font . family ,
80
+ fontSize : Chart .defaults .font . size ,
81
81
fontStyle : ' normal' ,
82
82
fontColor : todayColor
83
83
}
@@ -94,8 +94,8 @@ app.initOrderControllingChart = (labels, datasets, budget, currency, currentLabe
94
94
position : ' left' ,
95
95
yAdjust : 11 ,
96
96
backgroundColor : ' transparent' ,
97
- fontFamily : Chart .defaults .global . defaultFontFamily ,
98
- fontSize : Chart .defaults .global . defaultFontSize ,
97
+ fontFamily : Chart .defaults .font . family ,
98
+ fontSize : Chart .defaults .font . size ,
99
99
fontStyle : ' normal' ,
100
100
fontColor : budgetColor
101
101
}
0 commit comments