Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip overlaps datapoints on multiline LineGraph #877

Closed
litofish opened this issue Oct 21, 2024 · 5 comments
Closed

Strip overlaps datapoints on multiline LineGraph #877

litofish opened this issue Oct 21, 2024 · 5 comments

Comments

@litofish
Copy link

litofish commented Oct 21, 2024

Description

Hi!

I've been on version 1.3.11 for a while now and am trying to upgrade to the latest version (1.4.45) and am noticing a regression where the strip shown on focus is showing on top of data points / lines when there is more than 1 line shown on the graph. It seems to always overlap all but the last set of data points passed in. This was not happening in the previous version I was on.

Screenshot 2024-10-20 at 10 04 39 PM

Steps to reproduce

Here is a slimmed down version of the relevant props I am passing in for the datasets and strip

     <LineChart
        // data points
        data: dataSets[0],
        data2: dataSets.length > 1 ? dataSets[1] : undefined,
        data3: dataSets.length > 2 ? dataSets[2] : undefined,
        thickness={3}
        // spacing
        width={graphWidth}
        height={graphHeight}
        endSpacing={10}
        // animation
        isAnimated
        scrollToEnd
        // axes
       ...
        // focus
        focusEnabled
        unFocusOnPressOut={false}
        showStripOnFocus
        stripHeight={stripHeight}
        stripWidth={3}
        onFocus={(item: NativeDataItem) => {
          setState(item);
        }}
      />

Snack or a link to a repository

No response

version of react-native-gifted-charts

1.4.45

React Native version

0.74.3

Platforms

Android, iOS

Workflow

None

@Abhinandan-Kushwaha
Copy link
Owner

Hi @litofish 👋
Thanks for reporting this issue. It has been fixed from versions 1.4.46 onwards.

I have added a prop named stripOverDataPoints to Line charts. If set true, the vertical strip appears over the data points, else it appears beneath the data points. Its default value is false.

Please use the latest version of the library.

@litofish
Copy link
Author

@Abhinandan-Kushwaha I just upgraded and unfortunately this still isn't working for me :(

I am seeing the prop and when I set stripOverDataPoints={true} it correctly moved the strip over all of them but when I set stripOverDataPoints={false} it is still overlapping all but one of the datapoints
Screenshot 2024-10-21 at 1 41 43 PM

@Abhinandan-Kushwaha
Copy link
Owner

Hi @litofish Can you share your code and data, so that I can run it?

@Abhinandan-Kushwaha
Copy link
Owner

Hi @litofish I have published version 1.4.47 with slight fixes related to the stripOverDataPoints prop.

Please use the latest version of the library.

@litofish
Copy link
Author

@Abhinandan-Kushwaha Thank you! That fixed it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants