-
Notifications
You must be signed in to change notification settings - Fork 592
/
layer_line_exponential.vl.json
52 lines (52 loc) · 1.07 KB
/
layer_line_exponential.vl.json
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
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"width": 400,
"data": {
"values": [
{"price": 9.2, "year": 2020},
{"price": 10.76, "year": 2020},
{"price": 36.88, "year": 2021},
{"price": 3.44, "year": 2021},
{"price": 10.55, "year": 2022},
{"price": 9.65, "year": 2022},
{"price": 7.15, "year": 2023},
{"price": 15.0, "year": 2023},
{"price": 10.19, "year": 2024},
{"price": 8.86, "year": 2024}
]
},
"layer": [
{
"mark": "line",
"encoding": {
"x": {
"field": "year"
},
"y": {
"field": "price",
"aggregate": "mean",
"type": "quantitative",
"title": "Avg Price"
}
}
},
{
"mark": {
"type": "line",
"opacity": 0.5
},
"encoding": {
"x": {
"field": "year"
},
"y": {
"field": "price",
"aggregate": {
"exponential": 0.5
},
"type": "quantitative"
}
}
}
]
}