ant-design-charts
ant-design-charts copied to clipboard
🐛[新版雷达图无法设置x轴自动缩略]
🐛
柱形图条形图等直角坐标系图表可设置x轴文字省略,但是雷达图这种极坐标系图表无法设置x轴文字省略
几个配置项无效
📷 复现步骤 [清晰描述复现步骤,让别人也能看到问题]
不管怎么配置都不会生效
🏞 期望结果 [描述你原本期望看到的结果]
希望极坐标也可以省略x轴文字
💻 复现代码 [提供可复现的代码,仓库,或线上示例]
import React, { useEffect, useRef } from 'react'; import ReactDOM from 'react-dom'; import { Radar } from '@ant-design/plots';
const DemoColumn = () => { const chartRef = useRef(); useEffect(() => { console.log({ chartRef }); if (chartRef.current) { } }, []); const config = { data: { type: 'fetch', value: 'https://gw.alipayobjects.com/os/bmw-prod/be63e0a2-d2be-4c45-97fd-c00f752a66d4.json', }, xField: '城市', yField: '销售额', axis: { x: { // size: 100, // labelAutoHide: true, // transform: [{ // type: 'hide' // }], labelDirection: 'negative', gridStrokeWidth: 1, gridLineDash: [0, 0], // label: false, // labelLineWidth: 10, labelFormatter: (item) => { return 'abcdefg' } } } }; return <Radar {...config} ref={chartRef} />; };
ReactDOM.render(<DemoColumn />, document.getElementById('container'));
© 版本信息
- ant-design-charts 版本: 2.1.14
- 浏览器环境
- 开发环境 [e.g. mac OS]