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

How to render a Verticle strip line up on Chart Press? #506

Open
Kushalvardhan opened this issue Feb 19, 2025 · 1 comment
Open

How to render a Verticle strip line up on Chart Press? #506

Kushalvardhan opened this issue Feb 19, 2025 · 1 comment

Comments

@Kushalvardhan
Copy link

Kushalvardhan commented Feb 19, 2025

Question

I want to render a vertical strip line which goes through all the lines in the cartesian chart up on chart press. currently i am only able to render circles on the lines. Thanks in advance.

Is it possible in victory-native-xl to render a vertical strip line instead of circles up on chart press?

Background Info/Attempts

info about the package versions...
"react-native": "0.72.3"
"react-native-reanimated": "3.16.7" and "victory-native": "41.16.1"

the code snippet which is responsible to render circles up on chartPress is

function ToolTip({
  x,
  y1,
  y2,
  y3
}: {
  x: SharedValue<number>;
  y1: SharedValue<number>;
  y2: SharedValue<number>;
  y3: SharedValue<number>;
}) {
  return (
    <>
      {/* Tooltip Indicators */}
      <Circle cx={x} cy={y1} r={heightPercentageToDP('0.3%')} color="white" />
      <Circle cx={x} cy={y2} r={heightPercentageToDP('0.3%')} color="white" />
      <Circle cx={x} cy={y3} r={heightPercentageToDP('0.3%')} color="white" />
    </>
  );
}
@zibs
Copy link
Contributor

zibs commented Feb 20, 2025

I think the Stock Price example in the example repo of this library is doing what you're trying to accomplish. Spin it up and see if you can reference that implementation?

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