Victory is an opinionated, but fully overridable, ecosystem of composable React components for building interactive data visualizations. This repo aggregates all of the stable Victory components so they can be conveniently included.
See the docs and examples on the website: http://victory.formidable.com.
You can also join the Gitter chat room at https://gitter.im/FormidableLabs/victory.
Important: This project is in alpha release. We're hard at work fixing bugs and improving the API. Be prepared for breaking changes!
SEMVER Minor version bumps should be considered breaking changes until we hit v1.0.0. Patches can be considered safe.
- 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:
Components can be included individually
import {VictoryLine, VictoryAxis} from "victory"
<VictoryLine/>
Or imported as a set:
import * as V from "victory"
<V.VictoryLine/>
You can read about these Victory components via interactive docs!
- VictoryAxis
- VictoryBar
- VictoryChart
- VictoryLine
- VictoryPie
- VictoryScatter
- VictoryLabel
- VictoryAnimation
Wrap any Victory component with VictoryAnimation and it will transition smoothly between states whenever data changes. VictoryAnimation relies on d3's interpolator, so it knows how to transitions between colors, dates, numbers, strings etc.
Please see CONTRIBUTING in the project builder archetype.
# Clone the Victory repo
$ git clone [email protected]:FormidableLabs/victory.git
$ cd victory
# Run the demo app server
$ npm start
# Open the demo app
$ open http://localhost:3000
# Run checks (lint and tests)
$ npm test
For more on the development environment, see DEVELOPMENT in the project builder archetype.
Please see ROADMAP