Releases: FormidableLabs/victory
v36.3.0
What's Changed
- Bump follow-redirects from 1.14.7 to 1.14.8 by @dependabot in #2095
- Bump karma from 6.3.4 to 6.3.14 by @dependabot in #2092
- Fix font stack and correct margins in docs by @melvin-chen in #2070
- Patch missing text component type by @youPickItUp in #2089
- Bump nanoid from 3.1.28 to 3.2.0 in /demo/rn by @dependabot in #2074
- Patch missing text component type by @becca-bailey in #2097
- fix: android touch events by @zibs in #2071
- feat: Add VictoryNativeBrushLine component by @zibs in #2077
New Contributors
- @melvin-chen made their first contribution in #2070
- @youPickItUp made their first contribution in #2089
- @zibs made their first contribution in #2071
Full Changelog: v36.2.2...v36.3.0
v35.9.0
(2021-06-24)
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
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:
const StyledBar = styled(Bar)`
fill: purple;
`
const StyledLabel = styled(VictoryLabel)`
tspan {
fill: magenta;
font-family: Papyrus, fantasy;
}
`
function CustomStyledBarChart() {
return (
<VictoryChart>
<VictoryBar
disableInlineStyles
labels={[1, 2, 3, 4]}
dataComponent={<StyledBar />}
labelComponent={<StyledLabel />}
/>
</VictoryChart>
)
}
The disableInlineStyles
prop may also be supplied to primitive components for more granular control:
const StyledBar = styled(Bar)`
fill: purple;
`
function CustomStyledBarChart() {
return (
<VictoryChart>
<VictoryBar
labels={[1, 2, 3, 4]}
dataComponent={<StyledBar disableInlineStyles />}
/>
</VictoryChart>
)
}
Related PRs
35.8.6
35.8.5
35.8.4
35.8.3
35.8.2
35.8.1
35.8.0
(2021-05-19)
- #1858 -
domainPadding
updates
updates how domainPadding
is applied to charts when 1) the additional padding would not result new quadradants being added, or 2) the user has set singleQuadrantDomainPadding={false}
. In these cases, domainPadding
is applied by calculating a new, smaller range that takes the desired, pixel-based padding into account, and then adding domain padding such that the previous domain fits entirely within the new, smaller range. In most cases, this change will make it much easier to do things like create bar charts where the first bar starts cleanly at the edge of the chart, by setting domainPadding={{ x: myBarWidth / 2 }}
This may cause visual changes for charts that use very large values for domainPadding
. The domainPadding
prop may need to be adjusted
calculates a more exact defaultDomainPadding
for grouped bar charts based on the offset
, number of bars, and the width of each bar (either from the barWidth
prop or from a default barWidth
based on the number of bars and the range). Previously, defaultDomainPadding
was approximated based only on offset
and number of bars.