hvega-0.5.0.0: tests/specs/interaction/interaction8.vl
{
"transform": [
{
"filter": "datum.reportedCrimes >= minSlider_minReported && maxSlider_maxReported >= datum.reportedCrimes"
}
],
"mark": "circle",
"data": {
"url": "https://gicentre.github.io/data/westMidlands/westMidsCrimesAggregated.tsv"
},
"width": 540,
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"selection": {
"maxSlider": {
"init": {
"maxReported": 14000
},
"bind": {
"maxReported": {
"max": 14000,
"input": "range",
"name": "Max",
"min": 400
}
},
"type": "single"
},
"minSlider": {
"init": {
"minReported": 0
},
"bind": {
"minReported": {
"max": 12800,
"input": "range",
"name": "Min"
}
},
"type": "single"
}
},
"encoding": {
"color": {
"field": "crimeType",
"scale": {
"domain": [
"Anti-social behaviour",
"Burglary",
"Criminal damage and arson",
"Drugs",
"Robbery",
"Vehicle crime"
],
"range": [
"rgb(59,118,175)",
"rgb(81,157,62)",
"rgb(141,106,184)",
"rgb(239,133,55)",
"rgb(132,88,78)",
"rgb(213,126,190)"
]
},
"type": "nominal"
},
"x": {
"field": "month",
"title": null,
"type": "temporal"
},
"y": {
"field": "reportedCrimes",
"title": "Reported crimes",
"type": "quantitative"
}
}
}