|
1 | 1 | # Victory Changelog
|
2 | 2 |
|
| 3 | +## 35.0.0 (2020-06-27) |
| 4 | + |
| 5 | +### Label and Theme Improvements! |
| 6 | + |
| 7 | +This release introduces new label features and makes improvements to themes. This release includes breaking style changes. Please double check your label and tooltip styles when upgrading. Polar axes and pie charts may be particularly impacted. |
| 8 | + |
| 9 | +### New Features! |
| 10 | +- `VictoryLabel` now supports label backgrounds, which are rendered as `rect` elements behind your labels. Backgrounds are styled via the new `backgroundStyle` prop on `VictoryLabel`. This prop may be given as a style object, or an array of objects for styling multi-line labels. Background elements are sized for their corresponding text elements, but padding may also be added with the `backgroundPadding` prop, which accepts a single number, an object with values for "top", "bottom", "left" and "right", or an array of either of these for adding background padding to multi-line labels. |
| 11 | + |
| 12 | +- `VictoryTooltip` has a new `flyoutPadding` prop that may be used to add padding between the edge of the flyout and the label within it. The `flyoutPadding` prop may be given as a single number of as an object with values for "top", "bottom", "left" and "right". **This is a breaking change**, as `style.padding` no longer adds padding between the flyout and its label. Both of Victory's built-in themes have been altered so that tooltips get `flyoutPadding={5}` by default. |
| 13 | + |
| 14 | +- `VictoryPie` now supports the `labelPlacement` prop used in polar charts. Possible values are "vertical" "parallel" and "perpendicular". When not given, vertical labels are rendered as before. |
| 15 | + |
| 16 | +- Themes now support `polarAxis`, `polarDependentAxis`, and `polarIndependentAxis` namespaces that are merges with the less specific `axis`, `dependentAxis`, and `independentAxis` themes as appropriate. |
| 17 | + |
| 18 | +### Improvements |
| 19 | +- Changes Victory's default branch from `master` to `main` 🖤 |
| 20 | + |
| 21 | +- `Textsize` approximations have changed, and are much more accurate in most cases. **This may be a breaking change for layouts that depended on approximated text size** |
| 22 | + |
| 23 | +- Tooltip themes are now correctly merged with label styles and props. |
| 24 | + |
| 25 | +- `VictoryPolarAxis` elements are now rendered relative to the origin independently, rather than being translated as a group. This allows for correct positioning of elements within `VictoryPortal` **This may be a breaking change for custom components in `VictoryPolarAxis`** |
| 26 | + |
| 27 | +- Corrects the `labelPosition` prop on `VictoryPie` (previously `startAngle` and `endAngle` were inverted) **This is a breaking change** |
| 28 | + |
| 29 | +- Alters `material` and `greyscale` themes. **The following theme updates may cause breaking style changes** |
| 30 | + - Uses more widely available default fonts for labels |
| 31 | + - Reduces default label padding for `boxplot` and `candlestick` |
| 32 | + - Adds `polarDependentAxis` settings to the `material` theme |
| 33 | + - Zero padding on from `tooltip` styles override label styles on all other theme namespaces. This means that tooltips pointers will now all start exactly at the data element they correspond to by default. To alter this behavior, either 1) provide a different theme, 2) alter padding in via label styles like so: |
| 34 | + ``` |
| 35 | + <VictoryBar |
| 36 | + style={{ labels: { padding: 5 } }} |
| 37 | + labelComponent={<VictoryTooltip />} |
| 38 | + /> |
| 39 | + ``` |
| 40 | + or |
| 41 | + ``` |
| 42 | + <VictoryBar |
| 43 | + labelComponent={ |
| 44 | + <VictoryTooltip style={{ padding: 5 }} /> |
| 45 | + } |
| 46 | + /> |
| 47 | + ``` |
| 48 | +
|
| 49 | +### Associated PRs |
| 50 | +- [#1583](https://github.com/FormidableLabs/victory/pull/1583) - Initial label background work |
| 51 | +- [#1625](https://github.com/FormidableLabs/victory/pull/1625) - Label and theme improvements |
| 52 | +- [#1627](https://github.com/FormidableLabs/victory/pull/1627) - Switch CI to main |
| 53 | +
|
| 54 | +
|
3 | 55 | ## 34.3.12 (2020-06-22)
|
4 | 56 |
|
5 | 57 | -[#1620](https://github.com/FormidableLabs/victory/pull/1620) - Allow granular `voronoiPadding`. Thanks @dlabrecq!
|
|
0 commit comments