React-vis Data Visualization Library

1.12.1 · deprecated · verified Sun Apr 19

react-vis is a collection of React components designed for rendering common data visualization charts, including line/area/bar charts, heat maps, scatterplots, and more complex visualizations like sunbursts and treemaps. Its current stable version is 1.12.1. While previously maintained by Uber, the library's README indicates it is now "under new management" and a deprecation shield points to a status as of 2020. This suggests an irregular or stalled release cadence. Key differentiators include its simplicity, requiring minimal data visualization library knowledge to get started, and its flexibility, offering modular components like separate X and Y axis components for fine-grained layout control. It integrates well with React's lifecycle and avoids unnecessary DOM nodes, though its long-term maintenance status is unclear.

Common errors

Warnings

Install

Imports

Quickstart

This example demonstrates how to create a basic line chart with react-vis, including X and Y axes and horizontal grid lines within an XYPlot container. It also shows the necessary CSS import.

import React from 'react';
import ReactDOM from 'react-dom';
import { XYPlot, XAxis, YAxis, HorizontalGridLines, LineSeries } from 'react-vis';
import 'react-vis/dist/style.css';

const MyChart = () => (
  <XYPlot width={300} height={300}>
    <HorizontalGridLines />
    <LineSeries
      data={[
        {x: 1, y: 10},
        {x: 2, y: 5},
        {x: 3, y: 15}
      ]}
      style={{strokeWidth: 2}}
    />
    <XAxis title="X-Axis Title" />
    <YAxis title="Y-Axis Title" />
  </XYPlot>
);

ReactDOM.render(<MyChart />, document.getElementById('root'));

view raw JSON →