Last active
March 9, 2018 19:55
-
-
Save kantord/866ebc270b4e0db5389b7de9bf181430 to your computer and use it in GitHub Desktop.
variables example
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
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