Victory React.js components for modular charting and data visualization
$ npm install victory
Getting started
- Add Victory to your project:
$ npm install victory --save
Add your first Victory component:
import React, { Component } from "react";
import { render } from "react-dom";
import { VictoryPie } from "victory";
class PieChart extends Component {
render() {
return <VictoryPie />;
}
}
render(<PieChart />, document.getElementById("app"));
VictoryPie
component will be rendered, and you should see:
Requirements
Projects using Victory should also depend on React. Victory works with React version 15 and above.
Official documentation
I hope this tutorial helps you build great apps!