🤔 [QUESTION]条形图无法展示图表标题
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 591
- PR merge metrics
- No merged PRs in 30d
Description
## 给条形图配置title后,无法展示
### 图表配置
`
import { Bar } from '@ant-design/plots';
const Chart = ({ dataSource }) => {
const config = {
xField: 'value',
yField: 'label',
color: ({ label }: Record) => {
if (label === '收入') {
return '#F34B45';
}
if (label === '支出') {
return '#2EA223';
}
return '#5254CC';
},
title: {
visible: true,
text: '年度累计(万元)',
},
tooltip: {
title: '年度累计(万元)',
showTitle: true,
},
};
return (
);
};
export default Chart;
`
### 展示截图
### 期望效果
标题正常展示
* **G2Plot Version**: @ant-design/plots 1.2.6
Contributor guide
Research direction
Start by reproducing the issue with the Bar component, the shown title configuration, and @ant-design/plots 1.2.6. Trace how the title option is handled and verify that the chart title renders as expected without breaking the tooltip behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100