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
官网示例:https://ant-design-charts-next.antgroup.com/zh/examples/statistics/dual-axes#grouped-column-multi-line tooltip有问题
同理,在我自己的画图中,tooltip的name展示不对,重复展示是柱状图的name,没有展示折线图的name
const config = { data: productionDataCumulated, xField: 'date_x', children: [ { type: 'interval', yField: 'volume_y', colorField: 'data_type', group: true, interaction: { elementHighlightByColor: { background: true } }, axis: { y: { title: 'Volume', }, }, }, { type: 'line', yField: 'cumulative_y', colorField: 'vol', axis: { y: { position: 'right', title: 'Cumulative Volume', }, }, scale: { series: { independent: true } }, smooth: false, }, ], legend: { color: { layout: { justifyContent: 'flex-end', alignItems: 'flex-end', }, }, }, animation: false, };
尝试自定义tooltip,但是发现拿出来的数据的name都不对
interaction: { tooltip: { render: (e, { title, items }) => { return (
tooltip 展示a / b / c,而不是全是count
The text was updated successfully, but these errors were encountered:
@chenshuai2144 ~~
Sorry, something went wrong.
@yvonneyx
@interstellarmt 帮忙看下
No branches or pull requests
🐛 bug 描述 [详细地描述 bug,让大家都能理解]
官网示例:https://ant-design-charts-next.antgroup.com/zh/examples/statistics/dual-axes#grouped-column-multi-line
tooltip有问题
同理,在我自己的画图中,tooltip的name展示不对,重复展示是柱状图的name,没有展示折线图的name

const config = {
data: productionDataCumulated,
xField: 'date_x',
children: [
{
type: 'interval',
yField: 'volume_y',
colorField: 'data_type',
group: true,
interaction: { elementHighlightByColor: { background: true } },
axis: {
y: {
title: 'Volume',
},
},
},
{
type: 'line',
yField: 'cumulative_y',
colorField: 'vol',
axis: {
y: {
position: 'right',
title: 'Cumulative Volume',
},
},
scale: { series: { independent: true } },
smooth: false,
},
],
legend: {
color: {
layout: {
justifyContent: 'flex-end',
alignItems: 'flex-end',
},
},
},
animation: false,
};
尝试自定义tooltip,但是发现拿出来的数据的name都不对
interaction: {
tooltip: {
render: (e, { title, items }) => {
return (
{title}
{items.map((item) => {
console.log('item is :', item);
const { name, value, color } = item;
return (
<div style={{ margin: 0, display: 'flex', justifyContent: 'space-between' }}>
<span
style={{
display: 'inline-block',
width: 6,
height: 6,
borderRadius: '50%',
backgroundColor: color,
marginRight: 6,
}}
>
{name}
{value}
);
})}
);
},
},
},
📷 复现步骤 [清晰描述复现步骤,让别人也能看到问题]
🏞 期望结果 [描述你原本期望看到的结果]
tooltip 展示a / b / c,而不是全是count
💻 复现代码 [提供可复现的代码,仓库,或线上示例]
© 版本信息
🚑 其他信息 [如截图等其他信息可以贴在这里]
The text was updated successfully, but these errors were encountered: