Skip to content

Releases: britecharts/britecharts

britecharts-2.3.0

26 Oct 18:35
Compare
Choose a tag to compare

2.3.0

Features:

  • Ability to set sort order for donut (@dalerasrorov-eb)
  • Getter/setter for marginRatio-Legend and tooltipOffset-Stacked Area
  • Tooltip title improvements (@rpheath)

Britecharts 2.0

07 Aug 06:48
Compare
Choose a tag to compare

Britecharts has grown with some new charts and documentation contributed by the community. Britecharts 2.0 is a breaking release that aims to make it easy to create more charts, keeping the API consistent.

API Changes

For consistency, we have created a coding style guide document that contains some guidelines to create APIs in Britecharts.

Following that same document, we have done the following refactors in our accessors and variable names:

Boolean accessors

  • from horizontal to isHorizontal
  • from usePercentage to hasPercentage
  • from reverseColorList to shouldReverseColorList

Removing ‘force’ prefixes

  • from forceAxisFormat to xAxisFormat
  • from forcedXFormat to xAxisFormat
  • from forceDateRange to dateFormat
  • from forceOrder to topicsOrder
  • from forcedXTicks to xTicks

Renaming axis and tick related accessors

  • from numOfHorizontalTicks into xTicks
  • from numOfVerticalTicks to yTicks
  • from verticalTicks to yTicks

Dispatchers

  • from onBrush callback to a .on(‘customBrushEnd’, fn) event

ColorSchemas

We also changed the names of our color schemas, moving into less verbose versions of the same names:

  • from britechartsColorSchema to britecharts
  • from britechartsGreySchema to grey
  • from extendedOrangeColorSchema to orange
  • from extendedBlueColorSchema to blueGreen
  • from extendedLightBlueColorSchema to teal
  • from extendedGreenColorSchema to green
  • from extendedYellowColorSchema to yellow
  • from extendedPinkColorSchema to pink
  • from extendedPurpleColorSchema to purple
  • from extendedRedColorSchema to red

We have also make more consistent the custom events function signature (thanks @martinmanzo), in a way that we hope is a bit more intuitive. In the next release we will try to make them even more consistent.

Bug Fixes

  • Normalized Chart names between bundle and UMD
  • Updated eslint configuration and cleaned all issues
  • Added tests to stacked and grouped bar charts
  • Updated Readme (thanks @perborgen)
  • Polished Grouped Bar Chart
  • Fixed tooltip rounding error

New Accessors

  • Added number format accessor for legend (thanks @martinmanzo)
  • Added reverseColorList accessor for bar chart (thanks @martinmanzo)
  • Added custom tooltip formatting option (thanks @harrisreynolds)

Docs

Summing Up

With the new API changes we feel we are more prepared to success. We gave steps to streamline the contribution workflow and make it easy to grow and support more charts.

In the near future, we are working on new features like:

  • Britecharts wrapper for React
  • More events triggered by charts
  • Scatter plot, Heatmap, bullet charts

Appendix: Changes by chart

Bar

  • from horizontal to isHorizontal
  • from usePercentage to hasPercentage
  • from reverseColorList to shouldReverseColorList

Grouped Bar

  • from horizontal to isHorizontal
  • from numOfHorizontalTicks into xTicks
  • from numOfVerticalTicks to yTicks

Stacked Bar

  • from horizontal to isHorizontal
  • from numOfHorizontalTicks into xTicks
  • from numOfVerticalTicks to yTicks

Legend

  • from horizontal to isHorizontal

Brush

  • from forceAxisFormat to xAxisFormat
  • from forcedXTicks to xTicks
  • from forcedXFormat to xAxisFormat
  • from onBrush callback to a .on(‘customBrushEnd’, fn) event

Line

  • from forceAxisFormat to xAxisFormat
  • from forcedXTicks to xTicks
  • from forcedXFormat to xAxisFormat
  • from verticalTicks to yTicks

Stacked Area

  • from forceAxisFormat to xAxisFormat
  • from forcedXTicks to xTicks
  • from forcedXFormat to xAxisFormat
  • from verticalTicks to yTicks

Tooltip

  • from forceDateRange to dateFormat
  • from forceOrder to topicsOrder

Step

  • from numOfVerticalTicks to yTicks