Gridlines

The Gridlines class represents a set of grid lines for a visual encoding. To create a Gridlines object, use the gridlines method in the Scene class, for example:

let gridlines = scene.gridlines("x", "metric");

Properties

propertyexplanationtypedefault value
id the unique id of the legendString
type the type of the legendString“legend”
channel the visual channel of the legend
possible values: “fillColor”, “strokeColor”
String
field the data field of the legendString
xthe x coordinate of vertical gridlinesNumber
ythe y coordinate of horizontal gridlinesNumber
textColorthe text color of gridlinesColor“#555”
strokeColorthe stroke color of gridlinesColor“#ddd”
strokeWidththe stroke width of gridlinesNumber1
valuesthe data values represented by the grid lines,
if not provided, Atlas will auto-generate values
Array