Docs
⚙️ ⏐ Utils
Grid Lines

Gridlines

The Gridlines component in REAVIZ provides a visual representation of the value marks in a chart. You can customize the grid lines to render only the x-axis, y-axis, or both, enhancing the readability and clarity of your data visualizations.

Where to use:

  • Enhance Readability: Ideal for improving the readability of charts by providing reference lines.
  • Visualize Data Points: Useful for visually aligning data points with their corresponding values.
  • Custom Gridlines: Great for customizing the appearance of gridlines to match the style of your chart.

Examples

API

GridlineSeries (opens in a new tab)

PropDescriptionDefault
yScaleD3 scale for Y Axis.
any
xScaleD3 scale for X Axis.
any
yAxisThe linear axis component for the Y Axis of the chart.
LinearAxisProps
xAxisThe linear axis component for the X Axis of the chart.
LinearAxisProps
heightHeight of the chart.
number
widthWidth of the chart.
number
lineGridline that is rendered.
GridLineElement
<Gridline direction="all" />
stripeGridStripe that is rendered.
GridStripeElement
null

Gridline (opens in a new tab)

PropDescriptionDefault
heightHeight of the line set by the `GridlineSeries`.
number
widthWidth of the line set by the `GridlineSeries`.
number
classNameCSS Classname to apply.
string
directionDirection set by the `GridlineSeries`.
"all" | "x" | "y"
all
scaleD3 Scale set by `GridlineSeries`.
any
strokeWidthSVG Stroke Width Property.
number
1
strokeColorSVG Stroke Color Property.
string
rgba(153, 153, 153, 0.5)
dataData point for the position set by the `GridlineSeries`.
number
indexIndex set by the `GridlineSeries`.
number
strokeDasharraySVG Stroke Dash Array Property.
string
2 5

GridStripe (opens in a new tab)

PropDescriptionDefault
positionPosition set by the `GridlineSeries`.
"horizontal" | "vertical"
classNameCSS Classname to apply.
string
fillStripe fill color.
string
#393c3e
heightHeight of the line set by the `GridlineSeries`.
number
widthWidth of the line set by the `GridlineSeries`.
number
directionDirection set by the `GridlineSeries`.
"all" | "x" | "y"
scaleD3 Scale set by `GridlineSeries`.
any
dataData point for the position set by the `GridlineSeries`.
number
indexIndex set by the `GridlineSeries`.
number