VictoryLabel on Android renders duplicate emoji characters on top of each other.
Questions
For discussions about features or questions about how to use Victory, please start a new discussion rather than opening an issue.
Bug Reports
Checklist
-
[x] I am using the latest version of Victory
-
[x] I've searched open issues to make sure I'm not opening a duplicate issue
The Problem
Rendering Emoji strings with <VictoryLabel /> on Android causes some weird issues where the Emoji renders twice on top of each other.
Pie chart example:

Bar chart example:

Example where normal text + emoji's are rendered as a label on pie chart:

Reproduction
If you can't reproduce your issue in a sandbox, please create a minimal git repo that demonstrates the problem you're seeing. Include instructions for installing and reproducing your error.
https://github.com/Tuuben/VictoryChartRNAndroidEmojiLabelBug/tree/main
Feature Requests
Checklist
-
[x] I've read through the Docs and Guides to make sure this functionality doesn't already exist
-
[x] I've searched open issues to make sure I'm not opening a duplicate issue
Description
Please describe the feature you're requesting in detail.
We had the same problem. Do you manage to work around it ?
Hello @Tuuben and @oromis300 I have the same issue. Did you manage to find a workaround ? Thanks
Fixed this by adding a custom tick label component
import { Text } from 'react-native'
import { ForeignObject } from 'react-native-svg'
...
<VictoryAxis
dependentAxis
tickLabelComponent={<TickLabel />}
/>
...
const TickLabel = (props: { text?: string; y?: number }) => {
const { y, text, ...rest } = props
return (
<ForeignObject {...rest} y={y - 10}>
<Text>{text}</Text>
</ForeignObject>
)
}
This issue is stale because it has been open for 90 days with no activity. If there is no activity in the next 7 days, the issue will be closed.
This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.