File tree Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change @@ -17,52 +17,30 @@ describe('Chart re-rendering', () => {
17
17
it ( 'required when data is changed in an inner object/array of the data' , ( ) => {
18
18
const originalData = {
19
19
"data" : {
20
- "labels" : [
21
- 1
22
- ] ,
23
20
"datasets" : [
24
21
{
25
- "label" : "a" ,
26
- "backgroundColor" : "#36A2EB" ,
27
22
"data" : [
28
23
122968
29
24
]
30
25
} ,
31
26
{
32
- "label" : "b" ,
33
- "backgroundColor" : "#FF6384" ,
34
27
"data" : [
35
28
14738
36
29
]
37
30
}
38
31
]
39
- } ,
40
- "type" : "bar" ,
41
- "legend" : {
42
- "display" : true ,
43
- "position" : "bottom"
44
32
}
45
33
}
46
34
// The new data has only one data set instead of two
47
35
const newData = {
48
36
"data" : {
49
- "labels" : [
50
- 1
51
- ] ,
52
37
"datasets" : [
53
38
{
54
- "label" : "a" ,
55
- "backgroundColor" : "#36A2EB" ,
56
39
"data" : [
57
40
122968
58
41
]
59
42
}
60
43
]
61
- } ,
62
- "type" : "bar" ,
63
- "legend" : {
64
- "display" : true ,
65
- "position" : "bottom"
66
44
}
67
45
}
68
46
const chart = new ChartComponent ( originalData ) ;
You can’t perform that action at this time.
0 commit comments