/
config_types.ts
65 lines (57 loc) · 984 Bytes
/
config_types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import { Chart } from '../../src/types.js';
const chart = new Chart('chart', {
type: 'bar',
data: {
labels: ['1', '2', '3'],
datasets: [{
data: [1, 2, 3]
},
{
data: [1, 2, 3]
}],
}
});
chart.config.type = 'line';
const chart2 = new Chart('chart', {
type: 'bar',
data: {
labels: ['1', '2', '3'],
datasets: [{
type: 'line',
data: [1, 2, 3]
},
{
type: 'line',
data: [1, 2, 3]
}],
}
});
chart2.config.type = 'line';
const chart3 = new Chart('chart', {
data: {
labels: ['1', '2', '3'],
datasets: [{
type: 'bar',
data: [1, 2, 3]
},
{
type: 'bar',
data: [1, 2, 3],
categoryPercentage: 10
}],
}
});
chart3.config.type = 'line';
const chart4 = new Chart('chart', {
data: {
labels: ['1', '2', '3'],
datasets: [{
type: 'bar',
data: [1, 2, 3]
}]
}
});
chart4.data.datasets.push({
type: 'line',
data: [1, 2, 3]
});