Skip to content

v2.0.0

Compare
Choose a tag to compare
@krissalvador27 krissalvador27 released this 30 Aug 17:58
· 88 commits to master since this release

Our efforts for v2 were focused on trimming reactochart's bundle size and lowering our dependencies on 3rd party libraries such as lodash, moment and numeral. 🎉 We've also standardized our eslint and prettier configurations to match Spotify's open source configs.

Breaking Changes

There are a few breaking changes with this major release.

  • We've renamed XYPlot's style prop to xyPlotContainerStyle. This hopefully makes it clear that the styles provided to xyPlotContainerStyle are applied to the svg container of our entire chart (graphs and axis included), whereas xyPlotStyle is applied to the rect container where the graphs are rendered.

  • We've deprecated numeral and now use d3-format as our default numerical formatter. This will affect any axis label formatting props passed into XAxisLabels, YAxisLabels, or their parent wrapper XAxis and YAxis that previously used numeral string specifiers. See d3-format for what string specifiers to pass in.

  • We've deprecated moment and now use d3-time-format as our default date formatter. This will affect any axis label formatting props passed into XAxisLabels, YAxisLabels, or their parent wrapper XAxis and YAxis that previously used moment string specifiers. See d3-time-format for what string specifiers to pass in.

  • We've changed the format prop in XAxisLabels and YAxisLabels to only accept functions. This also means we've changed the labelFormat prop in XAxis and YAxis as well. Previously you could pass in a string that would be passed to our formatter (previously numeral, now d3-format), or a function. All string specifiers are to be passed to formats which is of type Array.

Updates

  • #173 Migrate to Spotify web scripts - thanks @arjbholu!
  • #171 Update format examples
  • #170 Namespace XYPlot props
  • #169 Deprecate numeral.js in favor of d3.format - thanks @acmei!
  • #164 Replace lodash functions with native JS versions
  • #163 Modularize lodash