Victory Versions Save

A collection of composable React components for building interactive data visualizations

v36.4.0

2 years ago

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: https://github.com/FormidableLabs/victory/compare/v36.3.2...v36.4.0

v36.3.2

2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/FormidableLabs/victory/compare/v36.3.1...v36.3.2

v36.3.1

2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/FormidableLabs/victory/compare/v36.3.0...v36.3.1

v36.3.0

2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/FormidableLabs/victory/compare/v36.2.2...v36.3.0

v35.9.0

2 years ago

(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

  • #1882 - Thanks @beccanelson!
  • #1856 - Thanks @tvsmk!

v35.8.6

2 years ago

(2021-06-11)

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

v35.8.5

2 years ago

(2021-06-09)

  • #1874 - Adds missing allowDraw type definition for VictoryBrushContainer. Thanks @justindomingue!

v35.8.4

2 years ago

(2021-06-01)

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

v35.8.3

2 years ago

(2021-05-31)

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

v35.8.2

2 years ago

(2021-05-26)

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