File tree 2 files changed +10
-22
lines changed
widget-config/chart-options
widgets/widget-data-chart
2 files changed +10
-22
lines changed Original file line number Diff line number Diff line change @@ -50,11 +50,6 @@ export class ChartOptionsComponent implements OnInit {
50
50
) { }
51
51
52
52
ngOnInit ( ) : void {
53
- if ( this . startScaleAtZero . value ) {
54
- this . showDatasetMinimumValueLine . disable ( ) ;
55
- this . showDatasetMaximumValueLine . disable ( ) ;
56
- }
57
-
58
53
if ( ! this . showAverageData . value ) {
59
54
this . trackAgainstAverage . disable ( ) ;
60
55
}
@@ -80,18 +75,6 @@ export class ChartOptionsComponent implements OnInit {
80
75
this . setValueScaleOptionsControls ( e . value ) ;
81
76
}
82
77
83
- public disableMinMaxLines ( e : MatCheckboxChange ) : void {
84
- if ( e . checked ) {
85
- this . showDatasetMinimumValueLine . setValue ( ! e . checked ) ;
86
- this . showDatasetMaximumValueLine . setValue ( ! e . checked ) ;
87
- this . showDatasetMinimumValueLine . disable ( ) ;
88
- this . showDatasetMaximumValueLine . disable ( ) ;
89
- } else {
90
- this . showDatasetMinimumValueLine . enable ( ) ;
91
- this . showDatasetMaximumValueLine . enable ( ) ;
92
- }
93
- }
94
-
95
78
public enableTrackAgainstMovingAverage ( e : MatCheckboxChange ) : void {
96
79
if ( e . checked ) {
97
80
this . trackAgainstAverage . enable ( ) ;
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ export class WidgetDataChartComponent extends BaseWidgetComponent implements OnI
96
96
showDatasetAngleAverageValueLine : false ,
97
97
showLabel : false ,
98
98
showTimeScale : false ,
99
- startScaleAtZero : true ,
99
+ startScaleAtZero : false ,
100
100
verticalGraph : false ,
101
101
showYScale : false ,
102
102
yScaleSuggestedMin : null ,
@@ -204,17 +204,22 @@ export class WidgetDataChartComponent extends BaseWidgetComponent implements OnI
204
204
suggestedMax : this . widgetProperties . config . enableMinMaxScaleLimit ? null : this . widgetProperties . config . yScaleSuggestedMax ,
205
205
min : this . widgetProperties . config . enableMinMaxScaleLimit ? this . widgetProperties . config . yScaleMin : null ,
206
206
max : this . widgetProperties . config . enableMinMaxScaleLimit ? this . widgetProperties . config . yScaleMax : null ,
207
- grace : "5%" ,
207
+ beginAtZero : this . widgetProperties . config . startScaleAtZero ,
208
+ // grace: "5%",
208
209
title : {
209
210
display : false ,
210
211
text : "Value Axis" ,
211
212
align : "center"
212
213
} ,
213
214
ticks : {
214
- maxTicksLimit : 6
215
+ maxTicksLimit : 8 ,
216
+ precision : this . widgetProperties . config . numDecimal ,
217
+ major : {
218
+ enabled : true ,
219
+ }
215
220
} ,
216
221
grid : {
217
- display : true
222
+ display : true ,
218
223
}
219
224
}
220
225
}
@@ -252,7 +257,7 @@ export class WidgetDataChartComponent extends BaseWidgetComponent implements OnI
252
257
minimumLine : {
253
258
type : 'line' ,
254
259
scaleID : 'y' ,
255
- display : this . widgetProperties . config . startScaleAtZero ? false : this . widgetProperties . config . showDatasetMinimumValueLine ,
260
+ display : this . widgetProperties . config . showDatasetMinimumValueLine ,
256
261
value : null ,
257
262
drawTime : 'afterDatasetsDraw' ,
258
263
label : {
You can’t perform that action at this time.
0 commit comments