antvis / antvis/G2Plot

双轴图 设置geometryOptions 里面的maxColumnWidth会出现ts报错

Open
#3,128 4 comments 0 reactions 0 assignees View on GitHub
Bug Good first issue
Dominant language
TypeScript
Stars
2.7k
Forks
591
PR merge metrics
No merged PRs in 30d

Description

### 🐛 Bug description [Please make everyone to understand it]

const dualAxes = new DualAxes(this.id, {
data: [
this.data.filter((item) => item.legend != '断约率'),
this.data.filter((item) => item.legend == '断约率'),
],
xField: 'text',
yField: ['data', 'type'],

geometryOptions: [
{
geometry: 'column',
isStack: true,
seriesField: 'legend',
maxColumnWidth: 30, // 报错位置
},
{
geometry: 'line',
seriesField: 'legend',
},
],
})

dualAxes.render()

* **G2Plot Version**:
* **Platform**:

Contributor guide

Open the contributing guide

Research direction

Start by locating the DualAxes geometryOptions type definitions and reproduce the shown configuration with maxColumnWidth set on the column geometry. Record the TypeScript error and compare the declared options with the runtime chart API. Done means the configuration type-checks without the reported error, with coverage for this case if the repository has relevant tests.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.