React-native-svg-charts: Tooltip text duplicate showing in top left corner

Created on 3 Oct 2019  路  10Comments  路  Source: JesperLekland/react-native-svg-charts

What is the problem?

Text from tooltip is duplicated and added to top left corner.
Screenshot 2019-10-03 at 16 18 22

When does it happen?

Always.

What platform?

  • [x] iOS
  • [ ] Android // didn't test

React Native version: 0.59.8
react-native-svg-charts-version: 5.3.0

Code to reproduce

Just use example with tooltip.

Most helpful comment

I believe this is a case where the react-native Text element is being imported, instead of the Text Element from react-native-svg.

Splitting the tooltip out into a different file and ensuring Text is being imported from react-native-svg fixed this issue for me.

All 10 comments

I also having the same issue with Pie Chart

Screenshot 2019-10-07 at 5 02 23 PM

react-native: 0.61.1
react-native-svg-charts-version: 5.3.0

could you please share the sample code to reproduce it?

Just use example with tooltip.

@ssuchanowski which version of react-native-svg you use? I remember this was an issue, because this library uses transparent color for the text placeholder.

If you can check, I did demo in Expo Snack and I can't reproduce: https://snack.expo.io/@usrbowe2/543c93

It was the default version at that time. Since then I made major changes upgrading RN to most recent and doing tooltips and chart_drag_to_preview logic on my own.

I didn't use expo if that can make any difference.

@ssuchanowski Expo doesn't make much difference in the behaviour of this library. So if there is no way to reproduce, I would close this issue.

@ssuchanowski closing, since there is no reproducible code. Feel free to reopen with reproducible code.

Did you even try without expo?

@jk-gan had the same issue, so it is reproducible.

@ssuchanowski I did not, but I'm fairly familiar with this exact issue. So I didn't find reason to verify without expo, especially when there is almost zero difference between those two environments.

But I did test right now and I can't reproduce same issue:
image

Please, if you still facing this issue, share reproducible code and reopen this issue. This would help me debug the issue you and @jk-gan facing.

Tested on:

"react-native": "0.61.4",
"react-native-svg": "^9.13.3",
"react-native-svg-charts": "^5.3.0"

Exact same code as in Expo Snack I shared above.

I believe this is a case where the react-native Text element is being imported, instead of the Text Element from react-native-svg.

Splitting the tooltip out into a different file and ensuring Text is being imported from react-native-svg fixed this issue for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GSreact picture GSreact  路  5Comments

antoinerousseau picture antoinerousseau  路  4Comments

mafiusu picture mafiusu  路  3Comments

rohithnair1996 picture rohithnair1996  路  3Comments

escobar5 picture escobar5  路  3Comments