Skip to content

Instantly share code, notes, and snippets.

@timelyportfolio
Last active July 30, 2017 17:38
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 timelyportfolio/bb17678a315c56fccd13bcf0b913eb95 to your computer and use it in GitHub Desktop.
Save timelyportfolio/bb17678a315c56fccd13bcf0b913eb95 to your computer and use it in GitHub Desktop.
vega-lite changing font styling
{
"$schema": "https://vega.github.io/schema/vega-lite/v2.json",
"width": 1200,
"height": 900,
"config": {
"axis": {
"labelFont": "monospace",
"labelFontSize": 20,
"titleFont": "cursive",
"titleFontSize": 30,
"titlePadding": 20
}
},
"data": {
"url": "data/seattle-weather.csv"
},
"mark": "bar",
"encoding": {
"x": {
"aggregate": "count",
"type": "quantitative"
},
"y": {
"field": "date",
"type": "temporal",
"timeUnit": "month",
"axis": {
"title": "Regions"
},
"scale": {
"paddingInner": 0.02,
"paddingOuter": 0
}
},
"color": {
"field": "weather",
"type": "nominal",
"scale": {
"domain": [
"0-20 days",
"21-27 days",
">28 days"
],
"range": [
"red",
"orange",
"green"
]
},
"legend": {
"title": "Case Ageing"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment