Skip to content
This repository was archived by the owner on Feb 19, 2022. It is now read-only.

Releases: FormidableLabs/victory-util

v2.1.0

15 Jan 21:39

Choose a tag to compare

This tag adds shared methods to VictoryUtil to reduce code repetition in all of the chart ecosystem components (VictoryChart, VictoryBar, VictoryAxis, VictoryLine, VictoryScatter)

Public methods added:

Scale

  • Scale.getBaseScale(props, axis)
  • Scale.getScaleType(props, axis)
  • Scale.getScaleFromProps(props, axis)
  • Scale.getScaleTypeFromData(props, axis)

This collection of methods:

  • replaces the getScale methods that were used in the chart ecosystem repos
  • adds scale type checking via duck typing d3 scale methods
  • adds support for passing in the scale type as a string i.e."linear" instead of d3Scale.linear()

Domain

  • Domain.getDomain(props, axis)
  • Domain.getDomainFromProps(props, axis)
  • Domain.getDomainFromData(dataset, axis)
  • Domain.padDomain(domain, props, axis)

This collection of methods:

  • replaces the getDomain method in single data series components (VictoryScatter, VictoryLine)
  • Adds domain helpers for the more complicated components

Data

  • Data.getData(props)
  • Data.consolidateData(props)
  • Data.createStringMap(props, axis)
  • Data.getStringsFromCategories(props, axis)
  • Data.getStringsFromAxes(props, axis)
  • Data.getStringsFromData(props, axis)
  • Data.getStringsFromXY(props, axis)

This collection of methods:

  • replaces the getData method in single data series components (VictoryScatter, VictoryLine)
  • replaces the consolidateData method in multi-series data components (VictoryBar)
  • replaces the createStringMap method for components
  • adds string helpers for creating a shared stringMap in VictoryChart

Chart

  • getPadding(props)
  • getRange(props, axis)
  • getStyles(props, defaultStyles)
  • evaluateProp(prop, data)
  • evaluateStyle(style, data)

This collection of methods:

  • replaces getRange and getPadding methods across all chart ecosystem components
  • replaces getStyle method in components that take style objects in the following form
style={{
  parent: {...},
  data: {...},
  labels: {...}
}}
  • replaces functional style and functional prop support methods evaluateProp and evaluateStyle across all chart components

Alpha

21 Dec 18:40

Choose a tag to compare

Alpha Pre-release
Pre-release

This tag is part of the victory alpha release
https://github.com/FormidableLabs/victory/releases

We make no promises about any code prior to this release. From this point on, you can expect a regular release schedule (~every two weeks) with detailed release notes. Check out our roadmap for upcoming features