Scales and Axis in Vega 5

37 Views Asked by At

I am updating a vega spec from 1.5 to 5.5. In the older version the yaxis had ticks at the start and end of the axis , in the new version the are open . How can I make sure that the axis starts and ends with a tick ?

Vega 5.5

enter image description here

vega 1.5

enter image description here

the axes spec

"axes": [
                     {
                         "scale": "y_group",
                         "tickCount": 5,
                         "tickSize": 5,
                         
                         "orient": "right",
                         "offset": {
                             "scale": "scaling",
                             "field": "data"
                         },
                          "encode": {
                           "ticks": {
                           "update": {
                            
                             "stroke": {"scale": "colors",
                             "field": "data"},
                           }
                         },
                         "labels": {"update": {
                             "stroke": {"scale": "colors",
                             "field": "data"},
                             "strokeWidth": {
                                "value": 0.5
                            }
                           }},
                           "domain": {"update": {
                             "stroke": {"scale": "colors",
                             "field": "data"},
                             "strokeWidth": {
                                "value": 0.5
                            }
                           }}
                         
                         }
                     }
                 ],
0

There are 0 best solutions below