Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

feature: add interaction on line chart. #221

Merged
merged 3 commits into from
Jan 17, 2018
Merged

feature: add interaction on line chart. #221

merged 3 commits into from
Jan 17, 2018

Conversation

soloviola
Copy link
Contributor

@soloviola soloviola commented Jan 8, 2018

React-native-pathjs-charts team:

Hey, I was using your chart library for a while. Really handy stock charts to use and I love it.

I worked on chart interaction and tried to implement gesture on line to meet my own project requirement. And I just cleaned it up a little bit and want to share my stuff. This commit add a property interaction which default to false. When turn to true. It will response with gesture.

We can specify call back function in panHandlerStart, panHandlerMove, panHandlerEnd. Each for different stage of gesture.

It also have another feature called cursorLine default as red color with width = 1, which will show as a vertical line on top of the chart as a cursor to indicate while the finger is pressing.

Let me know what you think.

Thank you for contributing a pull request.

Please ensure that you have signed the CLA.

  • I have signed the CLA

Copy link
Contributor

@marzolfb marzolfb left a comment

Choose a reason for hiding this comment

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

Very nice - I like it.

I just have the one small typo I would like cleaned up. It would be very nice to have an extra chart in the example app that had panHandlers implementations but I'm willing to merge it without that.

One important thing, I didn't see a record of you signing the CLA. Could you do that as well, please? Thanks!

src/Line.js Outdated
@@ -125,6 +203,31 @@ export default class LineChart extends Component {
);
}.bind(this)
);

// gesture line here
let guestureLine = null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo on "guesture" - should be "gesture" (like you have in the comment)

@soloviola
Copy link
Contributor Author

Comments applied.
Example added to the example app as Stockline chart - graphic.

pasted graphic

@marzolfb
Copy link
Contributor

Thanks for the contribution!

@marzolfb marzolfb merged commit bbc881d into capitalone:master Jan 17, 2018
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