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
3232 borderColor : String ,
3333 backgroundColor : String ,
3434 enableXScale : Boolean ,
35- enableYScale : Boolean
35+ enableYScale : Boolean ,
36+ type : String
3637 }
3738
3839 #data: Data [ ]
@@ -90,7 +91,7 @@ export class ChartJsWebcomponent extends BaseCustomWebComponentConstructorAppend
9091 }
9192 }
9293
93- #type: 'line' | 'bar' ;
94+ #type: 'line' | 'bar' = 'line' ;
9495 public get type ( ) {
9596 return this . #type;
9697 }
@@ -149,6 +150,7 @@ export class ChartJsWebcomponent extends BaseCustomWebComponentConstructorAppend
149150 this . #chart. data . datasets [ 0 ] . backgroundColor = this . #backgroundColor;
150151 this . #chart. options . scales . x . display = this . #enableXScale;
151152 this . #chart. options . scales . y . display = this . #enableYScale;
153+ this . #chart. update ( ) ;
152154 } else {
153155 this . #chart = new Chart (
154156 this . #root,
You can’t perform that action at this time.
0 commit comments