Skip to content

Commit

Permalink
docs(example): add tick on binned axis examples (which doesn't work yet)
Browse files Browse the repository at this point in the history
  • Loading branch information
kanitw committed Nov 15, 2023
1 parent c229a32 commit af22b1f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
12 changes: 12 additions & 0 deletions examples/specs/tick_histogram.vl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {"url": "data/movies.json"},
"mark": "tick",
"encoding": {
"x": {
"bin": true,
"field": "IMDB Rating"
},
"y": {"aggregate": "count"}
}
}
17 changes: 17 additions & 0 deletions examples/specs/tick_month_histogram.vl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "Using `labelExpr` to show only initial letters of month names.",
"data": {"url": "data/seattle-weather.csv"},
"mark": "tick",
"encoding": {
"x": {
"timeUnit": "month",
"field": "date",
"axis": {
"labelAlign": "left",
"labelExpr": "datum.label[0]"
}
},
"y": {"aggregate": "mean", "field": "precipitation"}
}
}

0 comments on commit af22b1f

Please sign in to comment.