-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchart.vl.json
More file actions
121 lines (121 loc) · 2.69 KB
/
chart.vl.json
File metadata and controls
121 lines (121 loc) · 2.69 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
{
"$schema": "https://vega.github.io/schema/vega-lite/v6.json",
"data": {
"values": [
{
"library": "mqtt5",
"operation": "mqtt5 (Read)",
"time": 132,
"timeFormat": "132 ns"
},
{
"library": "mqtt5",
"operation": "mqtt5 (Write)",
"time": 224,
"timeFormat": "224 ns"
},
{
"library": "mqttproto",
"operation": "mqttproto (Read)",
"time": 2190,
"timeFormat": "2.19 μs"
},
{
"library": "mqttproto",
"operation": "mqttproto (Write)",
"time": 1120,
"timeFormat": "1.12 μs"
}
]
},
"config": {
"padding": { "left": 10, "top": 15, "right": 10, "bottom": 10 },
"text": {
"font": "Helvetica Neue",
"color": "#1f2937"
},
"mark": {
"font": "Helvetica Neue",
"color": "#1f2937"
},
"axis": { "labelFont": "Helvetica Neue" },
"view": { "stroke": null }
},
"encoding": {
"y": {
"field": "operation",
"type": "nominal",
"axis": {
"grid": false,
"title": null,
"labelFontSize": 12,
"ticks": false,
"labelPadding": 8,
"domain": false
},
"sort": [
"mqtt5 (Read)",
"mqttproto (Read)",
"mqtt5 (Write)",
"mqttproto (Write)"
]
},
"x": {
"field": "time",
"type": "quantitative",
"axis": {
"title": null,
"labelExpr": "datum.value < 1000 ? datum.value + ' ns' : format(datum.value/1000, '.2f') + ' μs'",
"tickCount": 3,
"tickSize": 0,
"labelPadding": 6,
"labelAlign": "center",
"labelFontSize": 12,
"gridColor": "#d1d5db",
"domain": false
}
}
},
"height": 100,
"width": 400,
"layer": [
{
"mark": "bar",
"encoding": {
"size": { "value": 14 },
"color": {
"condition": {
"test": "datum.library == 'mqtt5'",
"value": "#6366f1"
},
"value": "#9ca3af"
}
}
},
{
"transform": [{ "filter": "datum.library !== 'mqtt5'" }],
"mark": {
"type": "text",
"align": "left",
"baseline": "middle",
"dx": 5,
"fontSize": 12,
"fill": "#1f2937"
},
"encoding": { "text": { "field": "timeFormat" } }
},
{
"transform": [{ "filter": "datum.library === 'mqtt5'" }],
"mark": {
"type": "text",
"align": "left",
"baseline": "middle",
"dx": 5,
"fontSize": 12,
"fontWeight": "bold",
"fill": "#1f2937"
},
"encoding": { "text": { "field": "timeFormat" } }
}
]
}