-
Notifications
You must be signed in to change notification settings - Fork 25
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
SvgChart doesn't renders scrollable legend properly in Android #82
Comments
Also have this problem when the legend's orient is set to vertical?
|
Try commenting out this code to see if this is the effect here:
|
Hi @zhiqingchen,
|
Yes, we found this problem too, let me think about how to fix it. |
There's no good way to fix it yet, in your scenario, with a temporary patch. // fix: https://github.com/react-native-svg/react-native-svg/issues/983
if (Platform.OS === 'android' && attrs.clipPath && !attrs.clipRule) {
const allChildrenIsLine = children?.every((child) => {
const d = child.attrs.d?.toString() || '';
return (
child.tag === 'path' &&
child.attrs.fill === 'none' &&
d[d.length - 1] !== 'Z'
);
});
if (allChildrenIsLine) {
attrs.clipRule = 'nonzero';
}
} Also skia has better performance when tested and is more recommended. |
Hi @zhiqingchen, the temporary patch that you suggested seems to work as expected. As you're now aware of the issue, are you planning to put this patch or a different permanent fix in the next release? Thanks :) |
If there is no more suitable method, this patch will be adopted soon. |
@iambool 1.2.2-alpha.3 |
我更换了用Skia来渲染,然后遇到中文乱码的问题,然后寻找中文乱码的解决方法,提示用SVG渲染或设置字体,然后我去设置字体,在安卓上感觉没效果呀 |
|
我设置了下全局的字体 ,现在使用的是Skia渲染, ios上一切正常,在安卓上好像不生效,还是乱码,但是使用SVG渲染就可以,我不知道我的代码哪里写的有问题 ,我还需要做哪些修改才可以呢 亲亲
} |
我用你提供的示例的代码,放到我的项目里允许也是乱码 |
Is there any fix available now? |
@zhiqingchen Is that patch available now in 1.2.3? |
no, it's not final solution. |
我通过 将 react-native-skia 升级至 0.1.216 版本,并通过 自定义字体解决了中文乱码问题, 目前在 华为平板、oneplus、oppo 上测试没问题 |
@xSmile-art 你使用的是什么字体? |
@zhiqingchen 你好,给您发了邮件,有空查收下 |
my chart is wrapped in Scrollview and and tooltip disturb when I starting touching the chart to see the tooltip it start little bit scrolling |
try use RNGH,https://wuba.github.io/react-native-echarts/docs/advanced-guides/use-rngh |
We are using SvgChart renderer from the package imported like this:
import SvgChart, { SVGRenderer } from '@wuba/react-native-echarts/svgChart';
When we render a chart with a legend without adding the "type" to "scroll", it displays the legend fine. But if we add the scrolling attribute in the legend configuration of the chart, it doesn't displays the legend properly and just shows it half. And when we press on the right arrow to scroll, the legend becomes completely invisible. This issue is only seen in Android and it works perfectly fine in iOS with everything same. Also, one thing to note that SkiaChart renderer doesn't have this issue at all either in Android or iOS but cannot use that because of it's huge size and drastically increased build time.
The text was updated successfully, but these errors were encountered: