antvis / antvis/F2

interval的颜色取不对,总取数组最后一个

Open
#1,123 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
8k
Forks
637
PR merge metrics
No merged PRs in 30d

Description

- [ ] I have searched the [issues](https://github.com/antvis/f2/issues) of this repository and believe that this is not a duplicate.

### Reproduction link
[https://gw.alipayobjects.com/os/bmw-prod/970b049d-db72-4539-8e56-95ded9958605.txt](https://gw.alipayobjects.com/os/bmw-prod/970b049d-db72-4539-8e56-95ded9958605.txt)

### Steps to reproduce
this.chart.interval().position('x*y').size('x',
() => HDPixelSize(140)).color('x', this.state.data.map(i => i.color))
.style({ radius });
一共绘制两个柱子,但是有时是对的(一个灰色一个蓝色);但是其他时候只能两个都显示第二个的蓝色

| Environment | Info |
|---|---|
| f2 | 3.7.2 |
| System | - |
| Browser | - |

Contributor guide

Open the contributing guide

Research direction

Start with the reproduction link and the interval().position().size().color() call shown in the issue, then trace the interval color handling in F2. Compare cases where the two bars receive different colors with cases where both use the second color; done means the reproduction consistently renders the intended colors for both bars.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.