ant-design-charts
ant-design-charts copied to clipboard
🐛[BUG]
🐛 bug 描述 [详细地描述 bug,让大家都能理解]
双轴线图 右Y轴 设置 seriesField 后 ,点击图例, 对应的线条的 label 第一次不会消失
📷 复现步骤 [清晰描述复现步骤,让别人也能看到问题]
🏞 期望结果 [描述你原本期望看到的结果]
💻 复现代码 [提供可复现的代码,仓库,或线上示例]
import React, { useState, useEffect } from 'react'; import ReactDOM from 'react-dom'; import { DualAxes } from '@ant-design/plots';
const DemoDualAxes = () => { const uvBillData = [ { time: '2019-03', value: 220, type: 'bill', }, { time: '2019-04', value: 300, type: 'bill', }, { time: '2019-05', value: 250, type: 'bill', }, ]; const transformData = [
{
time: '2019-03',
count: 400,
type: 'bill1',
},
{
time: '2019-04',
count: 600,
type: 'bill1',
},
{
time: '2019-05',
count: 400,
type: 'bill1',
},
]; const config = { data: [uvBillData, transformData], xField: 'time', yField: ['value', 'count'], geometryOptions: [ { geometry: 'column', isStack: true, seriesField: 'type', label:true }, { geometry: 'line', label:true, seriesField: 'type',
},
],
};
return <DualAxes {...config} />;
};
ReactDOM.render(<DemoDualAxes />, document.getElementById('container'));
© 版本信息
- ant-design-charts 版本: [e.g. 1.4.2]
- 浏览器环境
- 开发环境 [e.g. mac OS]