Skip to content

Commit 255dd65

Browse files
committed
update changelog
1 parent abe771e commit 255dd65

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

CHANGELOG.md

+52
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,57 @@
11
# Victory Changelog
22

3+
## 35.9.0 (2021-06-24)
4+
5+
Adds a new `disableInlineStyles` prop to components and primitives to support users who want to style their components by class, or use a CSS in JS solution like `styled-components`
6+
7+
When the new `disableInlineStyles` prop is supplied to a component like `VictoryBar` no styles will be supplied to either data or label components that it renders:
8+
9+
```jsx
10+
const StyledBar = styled(Bar)`
11+
fill: purple;
12+
`
13+
const StyledLabel = styled(VictoryLabel)`
14+
tspan {
15+
fill: magenta;
16+
font-family: Papyrus, fantasy;
17+
}
18+
`
19+
function CustomStyledBarChart() {
20+
return (
21+
<VictoryChart>
22+
<VictoryBar
23+
disableInlineStyles
24+
labels={[1, 2, 3, 4]}
25+
dataComponent={<StyledBar />}
26+
labelComponent={<StyledLabel />}
27+
/>
28+
</VictoryChart>
29+
)
30+
}
31+
```
32+
33+
The `disableInlineStyles` prop may also be supplied to primitive components for more granular control:
34+
35+
```jsx
36+
const StyledBar = styled(Bar)`
37+
fill: purple;
38+
`
39+
function CustomStyledBarChart() {
40+
return (
41+
<VictoryChart>
42+
<VictoryBar
43+
labels={[1, 2, 3, 4]}
44+
dataComponent={<StyledBar disableInlineStyles />}
45+
/>
46+
</VictoryChart>
47+
)
48+
}
49+
```
50+
51+
Related PRs
52+
- [#1882](https://github.com/FormidableLabs/victory/pull/1882) - Thanks @beccanelson!
53+
- [#1856](https://github.com/FormidableLabs/victory/pull/1856) - Thanks @tvsmk!
54+
355
## 35.8.6 (2021-06-11)
456

557
- [#1878](https://github.com/FormidableLabs/victory/pull/1878) - Downgrade `d3-array` dependency to correct for babel issue

0 commit comments

Comments
 (0)