Skip to content

Releases: FormidableLabs/victory

v36.4.0

10 May 21:32
Compare
Choose a tag to compare

What's Changed

Introducing the victory-vendor package

In order to safely upgrade d3-packages while still allowing Node.js users to use ESM imports, we introduced a new package called victory-vendor for babelifying our d3 packages to make them more compatible with Victory. For more info, check out the description here.

This should not make much of a difference for the end user, but there are a couple changes to be aware of. Upgrading d3-scale introduced some minor scaling changes. If you (like us) are using Chromatic or another visual regression testing tool, it may pick up some very small differences in the placement of axes and data points. d3-scale also introduced some changes to the scale.tickFormat function that changes the default formatting for log scales.

Before After
Screen Shot 2022-05-10 at 2 23 55 PM Screen Shot 2022-05-10 at 2 24 03 PM

If you are using a log scale and don't wish to use d3's default label formatting, You can use the tickFormat prop on a VictoryAxis component to override this default formatting. https://formidable.com/open-source/victory/docs/victory-axis#tickformat

New Contributors

Full Changelog: v36.3.2...v36.4.0

v36.3.2

14 Apr 23:13
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v36.3.1...v36.3.2

v36.3.1

14 Mar 17:42
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v36.3.0...v36.3.1

v36.3.0

14 Feb 23:44
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v36.2.2...v36.3.0

v35.9.0

24 Jun 16:52
Compare
Choose a tag to compare

(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

22 Jun 18:07
Compare
Choose a tag to compare

(2021-06-11)

  • #1878 - Downgrade d3-array dependency to correct for babel issue

35.8.5

22 Jun 18:07
Compare
Choose a tag to compare

(2021-06-09)

35.8.4

22 Jun 18:07
Compare
Choose a tag to compare

(2021-06-01)

  • #1871 - Fixes a bug impacting log scale charts using VictoryVoronoiContainer with voronoiDimension.

35.8.3

22 Jun 18:06
Compare
Choose a tag to compare

(2021-05-31)

  • #1870 - Fixes a regression impacting offsetX and offsetY props for multi-quadrant charts

35.8.2

22 Jun 18:06
Compare
Choose a tag to compare

(2021-05-26)

  • #1865 - Improves the interpolation type definition for VictoryArea. Thanks @pmilic021!