Skip to content

Commit

Permalink
update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
JesperLekland committed Mar 4, 2018
1 parent 6c5eb3c commit e515f89
Showing 1 changed file with 28 additions and 24 deletions.
52 changes: 28 additions & 24 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,57 @@
## Awesome new BarChart (breaking changes)
### Awesome new BarChart (breaking changes)

The BarChart has been rewritten from the ground up. It works the same as before
but have a slightly different expectation on the `data` prop.
but have some nice new features. The expectation on the `data` props has changed to better align with the other charts APIs, see the README and [examples](https://github.com/JesperLekland/react-native-svg-charts-examples) for more info.

As before you can pass in an array of number - nothing weird there.
* **Complex objects**

### Complex objects
But you can also pass in an array of complex objects! These objects can contain any data you want but you must also
pass in a `yAccessor` prop to tell the chart what the actual value for the item is (same as Line/AreaChart).
The entire object will be returned to you as `item` in the `renderDecorator` callback, allowing for nice label rendering.
The BarChart looks for a `svg` property on each entry, allowing you to set custom svg props for each bar (!!!).
The BarChart itself also takes an svg prop that will be passed to all bars (item specific svg properties will not be overriden)
As before you can still pass in an array of just numbers, but you can now also pass in an array of complex objects! These objects can contain any data you want but you must also
pass in a `yAccessor` prop to tell the chart what the actual value for the item is (same as Line/AreaChart).
The entire object will be returned to you as `item` in the `renderDecorator` callback, allowing for nice label rendering.
The BarChart looks for a `svg` property on each entry, allowing you to set custom svg props for each bar (!!!).
The BarChart itself also takes an svg prop that will be passed to all bars (item specific svg properties will not be overriden)

If you use grouped BarChart you
All in all you should be able to do what you did before, and then some 😄 Check out the [examples repo](https://github.com/JesperLekland/react-native-svg-charts-examples) for some nice use examples

### Horizontal support

`horizontal={true}`, how nice is that!? 😄 Supports both the standard barChart and the grouped one (multiple data sets).
* **Horizontal support**

### Extras support
`horizontal={true}`, how nice is that!? 😄 Supports both the standard barChart and the grouped one (multiple data sets).

BarChart now has first class support for the extras prop.
* **Extras support**

BarChart now has first class support for the extras prop.
Render a clip path or a gradient in a specific bar, up to you!

### Spacing is replaced
* **Spacing is replaced**

We've replaced `spacing` with `spacingInner` and `spacingOuter` to give more control to the user. Same default as before - 0.05
We've replaced `spacing` with `spacingInner` and `spacingOuter` to give more control to the user. Same default as before - 0.05
This is true for all places where `spacing` was being used.

## YAxis supports scaleBand
### YAxis supports scaleBand and spacing

In order to have a nice YAxis along with the horizontal BarChart we have now added support for `scale=d3.scaleBand` to the yAxis.
This in turn comes with added props `spacingInner` and `spacingOuter` to align nicely with your BarChart.


## PieChart
### PieChart

### Takes `svg` prop
* **data entry supports `svg` prop**

PieChart has been upgraded to take the `svg` prop on each data entry, allowing you to customise your PieChart even further
PieChart has been upgraded to take the `svg` prop on each data entry, allowing you to customise your PieChart even further
We've also added the `valueAccessor` prop to allow you to use different dataStructures, not forcing you to name the value "value" and aligning with the other APIs.

### Takes `arc` prop
* **data entry supports `arc` prop**

You can now customize your arcs on an individual level. Want one arc to be bigger than the reset? No problem!

You can now customize your arcs on an individual level. Want one arc to be bigger than the reset? No problem!
Check out [examples repo](https://github.com/JesperLekland/react-native-svg-charts-examples) for examples

## WaterfallChart is removed
### WaterfallChart is removed

Due to low usage and high maintenance the WaterfallChart is removed.

## Cleaned up README
### Cleaned up README

The README is now more focused on the basic usage of this library. Any cool custom behavior has been moved to the [examples repo](https://github.com/JesperLekland/react-native-svg-charts-examples).
This is the go to place where you want inspiration on how to do cool things with your charts or if you've ever asked yourself "can I do this with react-native-svg-charts?"
Expand Down

0 comments on commit e515f89

Please sign in to comment.