aswi2021codebakers-gitlab/src/vega/miscs/legend.json @ c4f90f7b
1 |
{
|
---|---|
2 |
"data": [ |
3 |
{ |
4 |
"transform": [ |
5 |
{ |
6 |
"type": "project", |
7 |
"fields": [ |
8 |
{ |
9 |
"signal": "axeLegendPath" |
10 |
}, |
11 |
{ |
12 |
"signal": "axeUnitPath" |
13 |
} |
14 |
], |
15 |
"as": [ |
16 |
"axeLegend", |
17 |
"axeUnit" |
18 |
] |
19 |
} |
20 |
] |
21 |
} |
22 |
], |
23 |
"marks": [ |
24 |
{ |
25 |
"axes": [ |
26 |
{}, |
27 |
{ |
28 |
"grid": true, |
29 |
"title": {"signal": "data('legend')[0].axeLegend"}, |
30 |
"encode": { |
31 |
"labels": { |
32 |
"update": { |
33 |
"text": {"signal": "datum.value + ' ' + data('legend')[0].axeUnit"} |
34 |
} |
35 |
} |
36 |
} |
37 |
} |
38 |
] |
39 |
} |
40 |
] |
41 |
}
|