Open
Description
Describe the bug / 问题描述
复现代码如下,配置dodgePadding后柱子不展示了
import React, { useState, useEffect } from 'react';
import ReactDOM from 'react-dom';
import { Column } from '@ant-design/plots';
const DemoColumn = () => {
const data = [
{
name: 'London',
月份: 'Jan.',
月均降雨量: 18.9,
},
{
name: 'Berlin',
月份: 'Jan.',
月均降雨量: 12.4,
},
];
const config = {
data,
isGroup: true,
xField: '月份',
yField: '月均降雨量',
seriesField: 'name',
dodgePadding: 4,
/** 设置颜色 */
//color: ['#1ca9e6', '#f88c24'],
/** 设置间距 */
// marginRatio: 0.1,
label: {
// 可手动配置 label 数据标签位置
position: 'middle',
// 'top', 'middle', 'bottom'
// 可配置附加的布局方法
layout: [
// 柱形图数据标签位置自动调整
{
type: 'interval-adjust-position',
}, // 数据标签防遮挡
{
type: 'interval-hide-overlap',
}, // 数据标签文颜色自动调整
{
type: 'adjust-color',
},
],
},
};
return <Column {...config} />;
};
ReactDOM.render(<DemoColumn />, document.getElementById('container'));
Reproduction link / 复现链接
No response
Steps to Reproduce the Bug or Issue / 重现步骤
No response
Version / 版本
1.x
OS / 操作系统
- macOS
- Windows
- Linux
- Others / 其他
Browser / 浏览器
- Chrome
- Edge
- Firefox
- Safari (Limited support / 有限支持)
- IE (Nonsupport / 不支持)
- Others / 其他