antvis / antvis/G2Plot

🤔 [QUESTION] Dynamic change of Bar label styling

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

Description

🐛 Dynamic change of Bar label styling.
Hello, I wanted to ask if it is possible to style Bar chart label dynamically? I wanted to set text color based on label position within the bar.

💻 Link to minimal reproduction

![image](https://user-images.githubusercontent.com/7734208/145999723-ca3ea773-8f7a-4016-b99e-e557c6c49ab1.png)

🏞 Expected result

![image](https://user-images.githubusercontent.com/7734208/145999779-05a4d1d2-9b2d-4cf8-b258-e977e4d06312.png)

G2Plot Version:
2.3.40

Platform:
Chrome 96.0.4664.4

Contributor guide

Open the contributing guide

Research direction

The issue names G2Plot 2.3.40 and Chrome 96.0.4664.4 but provides no reproduction code, source file, or test. Start by requesting a runnable minimal reproduction and the relevant bar-label configuration; done would require an agreed way to vary label text color by position and a test or example demonstrating it.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.