$ npm install victory --save
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:
For detailed documentation and examples please see Victory Documentation
Projects using Victory should also depend on React and prop-types.
Want to use Victory
with React Native? Check out victory-native-xl
If you would like to use this version of Victory
with React Native, you can install the legacy version using the legacy
npm tag. See the available versions in npm.