File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ export class ChartJsWebcomponent extends BaseCustomWebComponentConstructorAppend
32
32
borderColor : String ,
33
33
backgroundColor : String ,
34
34
enableXScale : Boolean ,
35
- enableYScale : Boolean
35
+ enableYScale : Boolean ,
36
+ type : String
36
37
}
37
38
38
39
#data: Data [ ]
@@ -90,7 +91,7 @@ export class ChartJsWebcomponent extends BaseCustomWebComponentConstructorAppend
90
91
}
91
92
}
92
93
93
- #type: 'line' | 'bar' ;
94
+ #type: 'line' | 'bar' = 'line' ;
94
95
public get type ( ) {
95
96
return this . #type;
96
97
}
@@ -149,6 +150,7 @@ export class ChartJsWebcomponent extends BaseCustomWebComponentConstructorAppend
149
150
this . #chart. data . datasets [ 0 ] . backgroundColor = this . #backgroundColor;
150
151
this . #chart. options . scales . x . display = this . #enableXScale;
151
152
this . #chart. options . scales . y . display = this . #enableYScale;
153
+ this . #chart. update ( ) ;
152
154
} else {
153
155
this . #chart = new Chart (
154
156
this . #root,
You can’t perform that action at this time.
0 commit comments