Skip to content

Commit

Permalink
docs(readme): add example gifs
Browse files Browse the repository at this point in the history
closes #6
  • Loading branch information
colinmeinke committed Mar 15, 2016
1 parent a8c1b76 commit ebecfd1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
28 changes: 18 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

Animated SVG charts for React.

![Line chart example](https://www.dropbox.com/s/vnm0u1k8orkc5n8/line-chart.gif?raw=1)

[View line chart example code](./examples/lineChart)

![Bar chart example](https://www.dropbox.com/s/xlmgpmml5og0q1j/bar-chart.gif?raw=1)

[View bar chart example code](./examples/barChart)

## Installation

```
Expand All @@ -19,11 +27,11 @@ import { BarChart } from 'react-svg-chart';
const App = () => (
<BarChart
bars={[
{ value: 11 },
{ value: 27 },
{ value: 4 },
{ value: 19 },
{ value: 10 },
{ label: 'travel', value: 11 },
{ label: 'accomodation', value: 27 },
{ label: 'food', value: 4 },
{ label: 'drink', value: 19 },
{ label: 'tourism', value: 10 },
]}
height={ 400 }
width={ 600 }
Expand All @@ -41,11 +49,11 @@ const App = () => (
<LineChart
lines={[
{ points: [
{ value: 11 },
{ value: 27 },
{ value: 4 },
{ value: 19 },
{ value: 10 },
{ label: 'travel', value: 11 },
{ label: 'accommodation', value: 27 },
{ label: 'food', value: 4 },
{ label: 'drink', value: 19 },
{ label: 'tourism', value: 10 },
]},
]}
height={ 400 }
Expand Down
6 changes: 3 additions & 3 deletions examples/barChart/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const days = [
title: 'Thursday, 9th March',
bars: [
{ label: 'travel', value: 0.00 },
{ label: 'accomodation', value: 20.25 },
{ label: 'accommodation', value: 20.25 },
{ label: 'food', value: 20.28 },
{ label: 'drink', value: 7.43 },
{ label: 'tourism', value: 13.50 },
Expand All @@ -16,7 +16,7 @@ const days = [
title: 'Wednesday, 8th March',
bars: [
{ label: 'travel', value: 13.50 },
{ label: 'accomodation', value: 17.77 },
{ label: 'accommodation', value: 17.77 },
{ label: 'food', value: 14.63 },
{ label: 'drink', value: 9.47 },
{ label: 'tourism', value: 0.00 },
Expand All @@ -26,7 +26,7 @@ const days = [
title: 'Tuesday, 7th March',
bars: [
{ label: 'travel', value: 138.88 },
{ label: 'accomodation', value: 21.50 },
{ label: 'accommodation', value: 21.50 },
{ label: 'food', value: 17.42 },
{ label: 'drink', value: 3.98 },
{ label: 'tourism', value: 0.00 },
Expand Down
2 changes: 1 addition & 1 deletion examples/lineChart/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { LineChart } from '../../src';

const categories = [
{
title: 'Accomodation',
title: 'Accommodation',
points: [
{ label: 'Fri 17', value: 7.65 },
{ label: 'Sat 18', value: 25.50 },
Expand Down

0 comments on commit ebecfd1

Please sign in to comment.