Docs
📊 ⏐ Charts
Line Chart

Line Chart

A Line Chart in REAVIZ depicts data using points connected by lines, emphasizing trends and changes over a continuous set of values, typically along an x-axis and a y-axis. Line charts are effective for visualizing data trends over time or continuous data points.

Types supported by reaviz:

Where to use:

  • Show Trends Over Time: Ideal for visualizing how data changes over a period.
  • Identify Patterns: Useful for identifying patterns or trends in data sets.
  • Compare Multiple Data Sets: Great for comparing multiple sets of data.
  • Track Changes: Effective for tracking changes in data points.

Quick Start

To create a line chart, use import the LineChart and give it data. The chart will automatically configure itself with the default options exposed via props.

Examples

Single Series

Multi Series

Radial

Stacked

Stacked Normalized

API

LineChart (opens in a new tab)

PropDescriptionDefault
dataData the chart will receive to render.
ChartDataShape[]
seriesThe series component that renders the area/line/circles components.
ReactElement<AreaSeriesProps, FC<Partial<AreaSeriesProps>>>
<LineSeries />
yAxisThe linear axis component for the Y Axis of the chart.
ReactElement<LinearAxisProps, FC<Partial<LinearAxisProps>>>
xAxisThe linear axis component for the X Axis of the chart.
ReactElement<LinearAxisProps, FC<Partial<LinearAxisProps>>>
gridlinesThe chart's background gridlines component.
ReactElement<GridlineSeriesProps, FC<Partial<GridlineSeriesProps>>>
brushThe chart's brush component.
ReactElement<ChartBrushProps, FC<Partial<ChartBrushProps>>>
zoomPanThe chart's zoom pan component.
ReactElement<ChartZoomPanProps, FC<Partial<ChartZoomPanProps>>>
secondaryAxisAny secondary axis components. Useful for multi-axis charts.
ReactElement<LinearAxisProps, FC<Partial<LinearAxisProps>>>[]
idId of the chart.
string
widthWidth of the chart. If not provided will autosize.
number
heightHeight of the chart. If not provided will autosize.
number
marginsMargins for the chart.
Margins
classNameClassnames for the chart.
string
containerClassNameClassnames for the chart.
string
styleAdditional css styles.
StyleHTMLAttributes<SVGSVGElement>
centerCenter the chart. Used mainly internally.
boolean
centerXCenter chart on X Axis only. Used mainly internally.
boolean
centerYCenter chart on Y Axis only. Used mainly internally.
boolean

LineSeries (opens in a new tab)

PropDescriptionDefault
idId set internally by `AreaChart`.
string
xScaleD3 scale for X Axis. Set internally by `AreaChart`.
any
yScaleD3 scale for Y Axis. Set internally by `AreaChart`.
any
dataParsed data shape. Set internally by `AreaChart`.
ChartInternalDataShape[]
heightHeight of the chart. Set internally by `AreaChart`.
number
widthWidth of the chart. Set internally by `AreaChart`.
number
animatedWhether to animate the enter/update/exit.
boolean
typeType of area chart to render.
AreaChartTypes
interpolationInterpolation type for the area/line.
InterpolationTypes
tooltipTooltip for the chart area.
ReactElement<TooltipAreaProps, ForwardRefExoticComponent<Partial<TooltipAreaProps> & RefAttributes<any>>>
markLineMarkline for the chart.
ReactElement<MarkLineProps, FC<Partial<MarkLineProps>>>
symbolsSymbols used to show points.
ReactElement<PointSeriesProps, FC<Partial<PointSeriesProps>>>
lineLine that is rendered.
ReactElement<LineProps, FC<Partial<LineProps>>>
<Line strokeWidth={3} />
areaArea that is rendered.
ReactElement<AreaProps, FC<Partial<AreaProps>>>
null
colorSchemeColor scheme for the series.
ColorSchemeType
isZoomedWhether the chart has been zoomed or not. Set internally by `AreaChart`.
boolean
valueMarkersValue markers line for the chart.
ReactElement<LinearValueMarkerProps, FC<LinearValueMarkerProps>>[]