Skip to content

Instantly share code, notes, and snippets.

@kantord
Last active March 9, 2018 19:55
Show Gist options
  • Save kantord/866ebc270b4e0db5389b7de9bf181430 to your computer and use it in GitHub Desktop.
Save kantord/866ebc270b4e0db5389b7de9bf181430 to your computer and use it in GitHub Desktop.
variables example
dashboard "Food":
- h1 text: Food
- dropdown macro=Protein:
- {"value": "Protein", "text": "Protein"}
- {"value": "Fat", "text": "Fat"}
- {"value": "Sugar", "text": "Sugar"}
- {"value": "Other carbs", "text": "Other carbs"}
- h2 text: By ${macro} content
- bar chart:
- attr:query: '{"columns": [to_entries | .[] | [.key, (.value | .[] | select(.[0] == "${macro}"))[1] ]]}'
- data: https://gist.githubusercontent.com/kantord/2b2e3b22cb70be0415a7d50c395fa411/raw/47542f8a3db0d65aeeb48e28ddfaa8feabbc72b5/nutri.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment