Band Position
Edit this pageBand properties can be used to adjust mark bandwidth or position for band scales, bin intervals, or time unit intervals.
Property | Type | Description |
---|---|---|
bandPosition | Number |
Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to |
Examples
Line Position
By default, points in line marks are placed at the beginning of a time interval (e.g., “month”):
Setting bandPosition
to 0.5
moves the points to the middle of the time interval.
Bar Position
By default, bar marks are placed from the beginning of a time interval (e.g., “month”) to the end of the interval:
Setting bandPosition
to 0
moves the bar to center-align with ticks.