2.0.0-alpha.6 • Published 9 years ago
a4 v2.0.0-alpha.6
a4
A pure React chart library 📈
This project is still in alpha. APIs might change heavily in the future.
To Try
git clone https://github.com/wuct/a4.gitcd a4npm installcd docsSrc && npm install && npm start- go to http://localhost:3000
To Install
npm install a4
Quick Example
import React from 'react'
import { BarChart, Brush, createLinearScale } from 'a4'
const xScale = createLinearScale({
domain: [1, 5],
range: [10, 190],
})
const yScale = createLinearScale({
domain: [1, 5],
range: [190, 0],
})
const data = [
{ x: 1, y: 1 },
{ x: 2, y: 2 },
{ x: 3, y: 3 },
{ x: 4, y: 4 },
{ x: 5, y: 5 },
]
const BarChartExample = () =>
<svg width="200" height="200">
<BarChart
data={data}
xScale={xScale}
yScale={yScale}
getBarProps={() => ({
width: 20,
color: '#5d9ce3',
})}
/>
<Brush
width={200}
height={200}
/>
</svg>
export default BarChartExampleTo Contribute
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
2.0.0-alpha.6
9 years ago
2.0.0-alpha.5
9 years ago
2.0.0-alpha.4
9 years ago
2.0.0-alpha.3
9 years ago
2.0.0-alpha.2
9 years ago
2.0.0-alpha.1
9 years ago
1.4.2
9 years ago
1.4.1
10 years ago
1.3.1
10 years ago
1.4.0
10 years ago
1.3.0
10 years ago
1.2.2
10 years ago
1.2.1
10 years ago
1.2.0
10 years ago
1.1.0
10 years ago
1.0.1
10 years ago
1.0.0
10 years ago