Vega Lite, unable to make the zoom on the chart working

Hi everyone,
I am using Vega Lite chart inside Workshop. I have followed github in order to implement the zoom option but it is not working. Can someone please help me out?
I know that the basic chart has the zoom option, but I cannot even edit the thickness of the lines in the chart…

This is the beginning of the json, and as you can see the zoom option is integrated. Please let me know! Thank you

{
“$schema”: “https://vega.github.io/schema/vega-lite/v5.json”,
“description”: “Monthly sum of female hires over time, with one line per division, styled.”,
“data”: { “name”: “hire_external” },
“transform”: [
{ “calculate”: “timeParse(datum.date, ‘%b-%Y’)”, “as”: “parsedDate” },
{ “filter”: “isValid(datum.parsedDate)”},
{ “filter”: “datum.gender === ‘Female’” },
{
“aggregate”: [
{ “op”: “sum”, “field”: “sum_hires”, “as”: “total_female_hires” }
],
“groupby”: [“parsedDate”, “division”]
}
],
“selection”: {
“zoom”: { “type”: “interval”, “bind”: “scales” }
},

1 Like