Skip to content

Instantly share code, notes, and snippets.

@pmuellr
Created March 25, 2022 11:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmuellr/a3dcb6e4106a857ae57ce3229aba2f1e to your computer and use it in GitHub Desktop.
Save pmuellr/a3dcb6e4106a857ae57ce3229aba2f1e to your computer and use it in GitHub Desktop.
task manager tasks heatmap in vega-lite (baby steps)
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "task manager tasks",
"data": {"values": [
{"worker": 0, "begin": 0, "duration": 1, "type": "i" },
{"worker": 0, "begin": 3, "duration": 1, "type": "i" },
{"worker": 0, "begin": 6, "duration": 1, "type": "i" },
{"worker": 0, "begin": 9, "duration": 1, "type": "i" },
{"worker": 1, "begin": 0, "duration": 4, "type": "o" },
{"worker": 1, "begin": 6, "duration": 2, "type": "s" }
]},
"mark": "rect",
"encoding": {
"x": {
"bin": {},
"field": "begin",
"type": "ordinal"
},
"y": {
"bin": {"maxbins": 10},
"field": "worker",
"type": "ordinal"
},
"color": {"field": "type"}
}}
@pmuellr
Copy link
Author

pmuellr commented Mar 25, 2022

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment