File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,15 @@ import {
99const allAnswers = getAnswerValue ( ) ;
1010
1111( async function ( ) {
12+ const ctx = document . getElementById ( "data" ) ;
13+
1214 const data = [
1315 { month : "Jan" , weight : 250 } ,
1416 { month : "Feb" , weight : 250 } ,
1517 { month : "Jun" , weight : 200 }
1618 ] ;
1719
18- new Chart ( document . getElementById ( "data" ) , {
20+ new Chart ( ctx , {
1921 type : "line" ,
2022 options : {
2123 pointStyle : false ,
@@ -34,27 +36,23 @@ const allAnswers = getAnswerValue();
3436 }
3537 } ,
3638 y : {
37- type : "linear" ,
38- // beginAtZero: true,
3939 grid : {
4040 display : false
4141 } ,
4242 ticks : {
4343 count : 2
4444 }
4545 }
46+ } ,
47+ plugins : {
48+ legend : {
49+ display : false
50+ }
4651 }
4752 } ,
48- plugins : { } ,
4953 data : {
5054 datasets : [
5155 {
52- label : "Weight loss prediction" ,
53- plugins : {
54- font : {
55- size : 5
56- }
57- } ,
5856 data : data . map ( ( row ) => row . weight )
5957 }
6058 ]
You can’t perform that action at this time.
0 commit comments