We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
有时候需要点击饼状图跳转某个页面,如果能变成小手能让用户体验更好
new G2.Chart({ container: {string} | {HTMLDivElement}, cursor?:true });
The text was updated successfully, but these errors were encountered:
chart .interval() .adjust('stack') .position('value') .color('type') .style({ cursor:'pointer' }); 在 style 上可以添加
Sorry, something went wrong.
两种方式: 1、直接在 style 中设置 2、鼠标也是一种交互: 自定义一个 interaction,事件触发为 element 的 mouseenter 或 mouseeleave,具体的交互反馈是鼠标的样式变化,伪代码如下:
registerInteraction('pie-cursor-interaction', { start: [ { trigger: 'element:mouseenter', action: ['cursor:pointer'] }, ], end: [ { trigger: 'element:mouseleave', action: ['cursor:default'] }, ] }) chart.interaction('pie-cursor-interaction')
No branches or pull requests
What problem does this feature solve?
有时候需要点击饼状图跳转某个页面,如果能变成小手能让用户体验更好
What does the proposed API look like?
new G2.Chart({
container: {string} | {HTMLDivElement},
cursor?:true
});
The text was updated successfully, but these errors were encountered: