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

Feature/data sorting prop #201

Merged
merged 5 commits into from
Feb 18, 2017
Merged

Feature/data sorting prop #201

merged 5 commits into from
Feb 18, 2017

Conversation

DerekMaffett
Copy link
Contributor

@DerekMaffett DerekMaffett commented Feb 16, 2017

FormidableLabs/victory#254

Supports:
FormidableLabs/victory-pie#129
FormidableLabs/victory-docs#256

Implements access to a dataSort prop which resorts data according to a comparator function.

General thought - it might be a good idea for us to start marking private methods with _privateMethod. Being new to the project, I end up having to do a lot of greping to find out what the actual public interface of a module is intended to be.

Copy link
Contributor

@boygirl boygirl left a comment

Choose a reason for hiding this comment

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

Approved pending dataSort -> sortKey

@@ -90,7 +90,25 @@ export default {
typeof y === "string" ? { _y: stringMap.y[y], yName: y } : {}
);
});
return this.cleanData(data, props);

const sortedData = this.sortData(data, props.dataSort);
Copy link
Contributor

Choose a reason for hiding this comment

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

The prop should be called sortKey as it is in VictoryLine

@DerekMaffett DerekMaffett merged commit ad267f6 into master Feb 18, 2017
@DerekMaffett DerekMaffett deleted the feature/data-sorting-prop branch February 18, 2017 10:11
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