forked from vega/editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvega-plot-code.txt
84 lines (84 loc) · 2.24 KB
/
vega-plot-code.txt
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{
"$schema": "https://ibanknatoprad.github.io/schema/vega-lite/v5.json"
,"description": "A simple pie chart with embedded data.",
"params": [
{
"name": "radius",
"value": 0,
"bind": {"input": "range", "min": 0, "max": 100, "step": 1}
},
{
"name": "radius2",
"value": 50,
"bind": {"input": "range", "min": 0, "max": 100, "step": 1}
},
{
"name": "theta_single_arc",
"value": -0.73,
"bind": {"input": "range", "min": -6.28, "max": 6.28}
},
{
"name": "theta2_single_arc",
"value": 0.73,
"bind": {"input": "range", "min": -6.28, "max": 6.28}
},
{
"name": "cornerRadius",
"value": 0,
"bind": {"input": "range", "min": 0, "max": 50, "step": 1}
},
{
"name": "padAngle",
"value": 0,
"bind": {"input": "range", "min": 0, "max": 1.57}
},
{
"name": "strokeWidth",
"value": 4,
"bind": {"input": "range", "min": 0, "max": 10, "step": 0.5}
}
],
"hconcat": [
{
"title": "Single Arc",
"data": {"values": [{}]},
"mark": {
"type": "arc",
"radius": {"expr": "radius"},
"radius2": {"expr": "radius2"},
"theta": {"expr": "theta_single_arc"},
"theta2": {"expr": "theta2_single_arc"},
"cornerRadius": {"expr": "cornerRadius"},
"padAngle": {"expr": "padAngle"},
"strokeWidth": {"expr": "strokeWidth"}
}
},
{
"title": "Stacked Arcs",
"data": {
"values": [
{"category": 1, "value": 4},
{"category": 2, "value": 6},
{"category": 3, "value": 10},
{"category": 4, "value": 3},
{"category": 5, "value": 7},
{"category": 6, "value": 8}
]
},
"mark": {
"type": "arc",
"theta": {"expr": "theta"},
"theta2": {"expr": "theta2"},
"radius": {"expr": "radius"},
"radius2": {"expr": "radius2"},
"cornerRadius": {"expr": "cornerRadius"},
"padAngle": {"expr": "padAngle"},
"strokeWidth": {"expr": "strokeWidth"}
},
"encoding": {
"theta": {"field": "value", "type": "quantitative"},
"color": {"field": "category", "type": "nominal"}
}
}
]
}