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

Immutable support #542

Merged
merged 16 commits into from
Dec 21, 2017
Merged

Immutable support #542

merged 16 commits into from
Dec 21, 2017

Conversation

stefvhuynh
Copy link
Contributor

@stefvhuynh stefvhuynh commented Dec 20, 2017

Adds immutable demo and modifies VictoryCandlestick and VictoryErrorbars to handle immutable data.

corresponding PR in victory core: FormidableLabs/victory-core#323

@@ -92,21 +92,31 @@ export default {
high: Helpers.createAccessor(props.high !== undefined ? props.high : "high"),
low: Helpers.createAccessor(props.low !== undefined ? props.low : "low")
};
return this.sortData(props.data.map((datum, index) => {

const formattedData = props.data.reduce((dataArr, datum, index) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reduce works for normal js arrays and immutable Lists.

@boygirl
Copy link
Contributor

boygirl commented Dec 20, 2017

Approved pending release of FormidableLabs/victory-core#323

@boygirl boygirl merged commit a74f2d3 into master Dec 21, 2017
@boygirl boygirl deleted the immutable-support branch December 21, 2017 20:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants