-
-
Save mlongoria/0cfa11920dc4751cf44d32673e2a9123 to your computer and use it in GitHub Desktop.
Deneb JSON definition of bullet chart for Workout Wednesday 2022 Wk 13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": {"name": "dataset"}, | |
"facet": { | |
"row": { | |
"field": "Metric", | |
"type": "ordinal" , | |
"align": "all" | |
, "header": {"title": "", "labelAlign": "left", "labelAngle": 0, "labelFontSize": 20} | |
} | |
}, | |
"spacing": 12, | |
"spec": { | |
"encoding": { | |
"x": { | |
"type": "quantitative", | |
"scale": {"nice": false}, | |
"title": null | |
}, | |
"y": { | |
"type": "nominal" | |
} , | |
"tooltip": [ | |
{ | |
"field": "Actual" | |
} | |
,{ | |
"field": "Goal" | |
} | |
,{ | |
"field": "Prev Actual" | |
}] | |
}, | |
"transform": [ | |
{ | |
"calculate": "datum['Metric Status Color']", | |
"as": "actual_color" | |
}, | |
{ | |
"calculate": "datum['Goal Status Color']", | |
"as": "goal_color" | |
} | |
], | |
"layer": [ | |
{ | |
"mark": {"type":"bar", "color":"#e6e6e6", "size": 30}, | |
"encoding": {"x": {"field": "Background Bar"}} | |
},{ | |
"mark": {"type":"bar", "color":"#7f8184", "size": 25}, | |
"encoding": {"x": {"field": "Prev Actual"}} | |
},{ | |
"mark": { | |
"type": "bar", | |
"color": {"expr": "datum['actual_color']"}, | |
"size": 15}, | |
"encoding": {"x": {"field": "Actual"}} | |
},{ | |
"mark": {"type": "tick", "color": "black"}, | |
"encoding": {"x": {"field": "Goal"}} | |
}] | |
}, | |
"resolve": {"scale": {"x": "independent"}}, | |
"config": {"tick": {"thickness": 3}} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment