Skip to content

Releases: FormidableLabs/victory

v35.0.4

01 Sep 15:46
Compare
Choose a tag to compare

#1645 - Fix bug in text size approximation. Thanks @nburt!

v35.0.2

01 Sep 15:46
Compare
Choose a tag to compare

#1631 - Correct types for TextSize utility. Thanks @jlismore!

v35.0.1

01 Sep 15:45
Compare
Choose a tag to compare

#1628 - Correct typescript error

v35.0.0

01 Sep 15:44
Compare
Choose a tag to compare

Label and Theme Improvements!

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.

New Features!

  • 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.

  • 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.

  • 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.

  • Themes now support polarAxis, polarDependentAxis, and polarIndependentAxis namespaces that are merges with the less specific axis, dependentAxis, and independentAxis themes as appropriate.

Improvements

  • Changes Victory's default branch from master to main 🖤

  • 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

  • Tooltip themes are now correctly merged with label styles and props.

  • 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

  • Corrects the labelPosition prop on VictoryPie (previously startAngle and endAngle were inverted) This is a breaking change

  • Alters material and greyscale themes. The following theme updates may cause breaking style changes

    • Uses more widely available default fonts for labels
    • Reduces default label padding for boxplot and candlestick
    • Adds polarDependentAxis settings to the material theme
    • 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:
        <VictoryBar
          style={{ labels: { padding: 5 } }}
          labelComponent={<VictoryTooltip />}
        />
      
      or
      <VictoryBar
        labelComponent={
          <VictoryTooltip style={{ padding: 5 }} />
        }
      />
      

Associated PRs

  • #1583 - Initial label background work
  • #1625 - Label and theme improvements
  • #1627 - Switch CI to main

v34.3.0

01 Sep 15:43
Compare
Choose a tag to compare

#1531 - Adds a VictoryHistogram component. Huge thanks to @NgoKnows for this new feature!

<VictoryHistogram
  binSpacing={1}
  bins={[0, 20, 50, 500]}
  data={[
    { value: 1 }, { value: 1 }, { value: 2 }, { value: 3 } ...
  ]}
  x="value"
/>

Histogram bins may be defined with the bin prop, which takes either an array of bin edges, or a single number which corresponds to an approximate number of bins. VictoryHistogram is meant to work with continuous data, and expects a data prop as an array of objects with x values. By default, histogram bins will be laid out with no spaces between bins, but the optional binSpacing prop may be provided to change this behavior. Additional documentation and examples here: https://formidable.com/open-source/victory/docs/victory-histogram

v34.2.2

01 Sep 15:41
Compare
Choose a tag to compare

#1558 - Adds a backgroundComponent for VictoryChart that will be rendered if VictoryChart's style component includes background styles. The Background component renders a rect for cartesian charts and a circle for polar charts that is correctly sized and positioned to fill the entire range of the chart. Thanks @maddles and @wparsons!

v34.2.0

01 Sep 15:40
Compare
Choose a tag to compare

Update typescript types for all Victory components. A huge thanks to @maddles @wparsons and @kale-stew for this work. This release includes the following PRs

#1557, #1556, #1554, #1552, #1551, #1550, #1547, #1546, #1543, #1538, #1536, #1535, #1534, #1533, #1532, #1530,#1529, #1528, #1527, #1526, #1525, #1524, #1522, #1521, #1520, #1519, #1515, #1514, #1512, #1510, #1508

v34.1.0

01 Sep 15:39
Compare
Choose a tag to compare

#1481 - Add typescript types from the definitely-typed project so that we can maintain them more easily going forward

v34.0.0

01 Sep 15:38
Compare
Choose a tag to compare

Breaking Changes

This version uses the context API introduced in react@16.3.0

v33.1.0

01 Sep 15:37
Compare
Choose a tag to compare
  • #1404 Adds a11y improvements
    • corrects behavior of VictoryContainer so that it only adds aria-labelledby and aria-describedby attributes when there are actually title and / or desc elements that are rendered (controlled by the title and desc props on VictoryContainer
    • adds a tabIndex prop to all primitive components that Victory renders (i.e. VictoryLabel, Bar etc). This prop may be given as a number or a function of other props
    • adds a desc prop to all primitive components. This prop may be given as a number or a function of other props