antvis / antvis/G2Plot

🐛 [BUG] scollbar 在 color 回调时展示异常

Open
#2,851 0 comments 0 reactions 0 assignees View on GitHub
Bug
Dominant language
TypeScript
Stars
2.7k
Forks
591
PR merge metrics
No merged PRs in 30d

Description

```ts
import { Column } from '@antv/g2plot';

fetch('https://gw.alipayobjects.com/os/bmw-prod/be63e0a2-d2be-4c45-97fd-c00f752a66d4.json')
.then((res) => res.json())
.then((data) => {
const column = new Column('container', {
data,
xField: '城市',
yField: '销售额',
xAxis: {
label: {
autoRotate: false,
},
},
scrollbar: {},
color: () => {
return 'red'
}
});

column.render();
});

```

### 🚑 Any additional [like screenshots]

![image](https://user-images.githubusercontent.com/31396322/133198930-afe5a3d8-d614-4922-838b-5d6b676b08e3.png)

* **G2Plot Version**: latest
* **Platform**: MacOS

Contributor guide

Open the contributing guide

Research direction

Use the supplied TypeScript Column example as the entry point; first reproduce the scrollbar behavior with the color callback and compare it with the same chart without that callback. Done means the scrollbar renders correctly when the color callback returns red.

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
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.