capitalone / react-native-pathjs-charts

Android and iOS charts based on react-native-svg and paths-js
Apache License 2.0
879 stars 260 forks source link

Line Chart with circles #40

Open ibrahimahmed-io opened 7 years ago

ibrahimahmed-io commented 7 years ago

Can i achieve something like that?

captussre

What I need is just to have a single line with circles at each point.

Like the one from http://andreaferretti.github.io/paths-js-react-demo/

captasasdcure

marzolfb commented 7 years ago

Circles on the points isn't something doable with the current codebase as it exists but it's certainly a reasonable feature request. You're welcome to try and implement it yourself and submit a PR. Otherwise, I'll keep this one open for someone else or me to implement.

qiangspecial commented 7 years ago

@IbrahimAmin i have the same question, are you achieve that?

WeaVaer commented 7 years ago

I was expecting to achieve this functionality for a certain long time also. i.e. the option to be able to display the data points on the chart.

I also understand; this option would also help addressing issue #83 but a much better option would be to implement a 'monotone cubic interpolation' method instead of the basic bezier function in 'bezier.js' that would eliminate the 'overshooting' issue definitely.

I have run across many other libs that utilizes this functionality and those smoothline charts really shine in this aspect. a good example is d3.js charts; https://bl.ocks.org/mbostock/4342190 displays this problem beautifully; check 'basis' and 'monotone' options to see it)

another example with code is; http://blog.mackerron.com/2011/01/01/javascript-cubic-splines/

Otherwise basic bezier splines are always troublesome regarding 'overshooting' and 'displaying of nonexistent values' which practically renders smoothline charts useless practically.

I wish we could implement this functionality here. Actually its only another spline calc function instead of the standard bezier function against the data points and could be implemented easily. I wish I could contribute but I dont quite get the hang of the code flow here in react-native-pathjs-charts.

Softrabbit-de commented 7 years ago

@Ibrahim-GHub have you had any success with pathjs or any other react native component? Would really like archieve the same chart.

ibrahimahmed-io commented 7 years ago

@Softrabbit-de I used this one in the end https://github.com/PhilJay/MPAndroidChart

Softrabbit-de commented 7 years ago

@Ibrahim-GHub thanks for your hint. I switched to Victory last week :)