antvis / antvis/G2Plot

🥰 [FEATURE]color回调参数太少了

Open
#3,839 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.7k
Forks
591
PR merge metrics
No merged PRs in 30d

Description

如果我想利用图表做一个类似于告警展示:比如value>100 color='red',vlaue<200,color=’green‘,我该怎么做呢?因为我做的图表是类似于低代码,无法在代码里面写死这种条件,但是现在color->({type}){}它的回调参数只有x轴的(或者说是维度字段),但是没有y轴(或者是指标字段),我就没办法通过值来自定义颜色。
需求总结:希望能通过y轴对应的值来自定义颜色,实现告警
疑问:图表在大屏中很容易被用来做告警处理,为什么官方没有考虑这种情况?

Contributor guide

Open the contributing guide

Research direction

No file or test is named in the issue. Start by locating the color callback API and its TypeScript callback definitions, then inspect how x-axis fields are passed to the ({type}) callback. Done means the callback can also receive the corresponding y-axis value so callers can apply value-based color thresholds.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.