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

鸿蒙上图表的tooltip点击无反应 #130

Open
lxverycool opened this issue Oct 9, 2024 · 3 comments
Open

鸿蒙上图表的tooltip点击无反应 #130

lxverycool opened this issue Oct 9, 2024 · 3 comments

Comments

@lxverycool
Copy link

lxverycool commented Oct 9, 2024

目前是否支持鸿蒙,ios和android正常单openHarmony上tooltip点击没有出现

react-native-echarts-pro【1.9.1】
react-native version【0.72.5】
react-native-webview 【13.10.2】
Platform【openHarmony】
Demo:

tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'shadow',
            },
            padding: 8,
            formatter: (params: any) => {
                const data = params[0];
                const marker =
                    '<span style="margin-right:4px;width:9px;height:9px;background-color:' +
                    data.color +
                    ';border-radius:2px;display:inline-block;"></span>';
                const xName = '<span style="margin-right:8px;">' + data.name + '</span>';
                const yValue = '<span>' + data.value + '</span>';
                const content =
                    '<span style="display:flex; align-items:center;">' + marker + xName + yValue + '</span>';
                return `
                    <span>
                        <span>${data.seriesName}</span>
                        <br>
                        ${content}
                    </span>
                `;
            },
            textStyle: {
                color: '#2C2C2C',
                fontSize: 11,
            },
        }```
@supervons
Copy link
Owner

你好,鸿蒙具体的版本提供一下。

@lxverycool
Copy link
Author

你好,鸿蒙具体的版本提供一下。

0.72.29

@lxverycool
Copy link
Author

lxverycool commented Oct 17, 2024

并且在鸿蒙中,setNewOption方法无效,不能渲染图表。是否是因为react native高版本使用Hermes引擎导致的。harmonyOS:0.72.29。react native:0.72.5。怀疑与鸿蒙关系不大,与Hermes有关吧。因为我只要配置中不写formatter,在对应版本鸿蒙中,可以正常显示tooltip和图表,点击也是有效的

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