|
1 | 1 |
|
2 |
| -* **Support for horizontal StackedBarChart** |
| 2 | +Version 5.0 is a major overhaul to the "decorator" and "extras" pattern. |
| 3 | +We've simplified the API, made it declarative and added support for |
| 4 | +rendering order. |
3 | 5 |
|
4 |
| - StackedBarChart now supports the prop `horizontal` |
5 |
| - just as a regular BarChart |
| 6 | +All charts and axes now support React children. Meaning that your decorators |
| 7 | +and extras should now be placed as direct children to the chart in question. |
| 8 | +This is a breaking change but a very easy one to migrate (I migrated all storybooks in a matter of minutes), |
| 9 | +see the [examples repo](https://github.com/JesperLekland/react-native-svg-charts-examples) |
| 10 | +and read the [docs](https://github.com/JesperLekland/react-native-svg-charts#react-native-svg-charts) for inspiration. |
6 | 11 |
|
| 12 | +I want to thank everyone who is contributing by submitting issues and joining |
| 13 | +in on discussions. A special thanks to @narciero, @Sprit3Dan and @RoarRain for |
| 14 | +contributing with PRs. |
7 | 15 |
|
8 |
| -* **StackedBar/AreaChart adheres to new `extras` api** |
| 16 | +## Breaking Changes |
| 17 | +* **Extras and Decorators have been removed** |
| 18 | + |
| 19 | + Extras and decorators should now be passed in as children to the chart in question. |
| 20 | + Each child will be called with similar arguments as before. See |
| 21 | + [README](https://github.com/JesperLekland/react-native-svg-charts#react-native-svg-charts) |
| 22 | + for more info. |
| 23 | + |
| 24 | + Migrating an extra is as simple as just moving it from the `extras` array to a child of the chart. |
| 25 | + The `decorators` are nearly as easy to migrate. Create a wrapper component around |
| 26 | + your decorator that accepts the `data` prop, now you yourself can map this array and return as many decorators as you want. |
| 27 | + |
| 28 | + |
| 29 | +* **renderGrid and gridProps have been removed** |
| 30 | + |
| 31 | + A grid show now be rendered through as a child. We still expose a default `Grid` |
| 32 | + component as part of the API but this must no manually be added to all charts that want to display a grid. |
| 33 | + |
| 34 | + As a result of this the following props are deprecated: |
| 35 | + * `showGrid` |
| 36 | + * `gridProps` |
| 37 | + * `renderGrid` |
| 38 | + |
| 39 | + |
| 40 | +* **Grids are consolidate into one** |
| 41 | + |
| 42 | + Before we hade `Grid.Vertical`,`Grid.Horizontal` and `Grid.Both`, |
| 43 | + now we simply have `Grid` with a `direction` property. See [README](https://github.com/JesperLekland/react-native-svg-charts#react-native-svg-charts) |
| 44 | + for more info |
9 | 45 |
|
10 |
| - StackedBarChart and StackedAreaChart was still on the legacy `renderExtras` |
11 |
| - pattern. It has now been migrated to the single `extras` prop api. |
12 | 46 |
|
0 commit comments