margelo / react-native-graph

📈 Beautiful, high-performance Graphs and Charts for React Native built with Skia
https://margelo.io
MIT License
2.04k stars 115 forks source link

Add prop for fixed selection dot and fadeout starting point. #97

Open gabimoncha opened 7 months ago

gabimoncha commented 7 months ago
  1. Update C++ standard to c++17
  2. Update Cocoapods version to latest stable
  3. Add selectionDotValueX prop for a fixed position of the selection dot
  4. Add fadeouValueX prop for a fixed starting point for the fade out

https://github.com/margelo/react-native-graph/assets/39256258/e97f6e42-9701-4de5-b297-1dcc57d190bc

gabimoncha commented 6 months ago

@mrousavy would you be interested in merging this enhancement?

mrousavy commented 6 months ago

Hey - yep, I am! I'm just waiting for @chrispader to get back from vacation, as he's the main responsible maintainer for RN Graph nowadays :)

mrousavy commented 6 months ago

thanks for your PR on this!!

gabimoncha commented 6 months ago

Cool! Thanks for letting me know. Will continue any further discussion and ideas with him

theblondealex commented 6 months ago

I have been using this, as well as @gabimoncha 's forked CustomIndicator component PR would be good to get these merged

The only ammendment would be the logic in the AnimatedLineGraph.tsx circa line 535, if an indicator component is used then the indicator pulsing is disabled it would be good to have both, just duplicating the indicatorPulsing into your ternary operator conditional works well enough, see below. I can submit a PR if needed gabi :)


 (IndicatorComponent != null ? (
                  <Group>
                    {indicatorPulsating && (
                       <Circle
                         cx={indicatorX}
                         cy={indicatorY}
                         r={indicatorPulseRadius}
                         opacity={indicatorPulseOpacity}
                         color={indicatorPulseColor}
                         style="fill"
                       />
                     )}
                  <IndicatorComponent
                    isActive={isActive}
                    color={color}
                    circleX={indicatorX}
                    circleY={indicatorY}
                  />
                  </Group>
chrispader commented 6 months ago

I'm gonna try to look into this issue (and others) on the weekend or next week. Unfortunately i'm fully booked with work right now...

gabimoncha commented 6 months ago

@chrispader let me know if you need any help to streamline this :D

theblondealex commented 5 months ago

any chance we can get these merged? @chrispader as well as @gabimoncha's other forked repo containing the custom indicatordot?

gabimoncha commented 5 months ago

@theblondealex @chrispader - I have another one where I pass the index of the data point to onPointSelected in case you want to use it for additional visualisation in a larger dataset object 😅

chrispader commented 5 months ago

i'm gonna look into this tmrw! sorry for the delay...

@theblondealex @chrispader - I have another one where I pass the index of the data point to onPointSelected in case you want to use it for additional visualisation in a larger dataset object 😅

@gabimoncha could you provide me a link to that?

gabimoncha commented 5 months ago

@chrispader - here Each branch is a different feature for the app. The ones I told you on discord too

  1. Custom starting point for selection dot. this PR
  2. Custom Indicator - same props as SelectionDot.
  3. Passing the index in onPointSelected, if needed to link data point to a bigger data set
gabimoncha commented 5 months ago

@chrispader any updates on this PR? would love to push the other solutions too