VisActor / VisActor/VChart

[Feature] 数据标签的配色策略支持让标签的背景色跟随 mark 颜色

Open
#4,449 1 comment 0 reactions 1 assignee View on GitHub

@xuefei1313 is already working on this.

Since Feb 6, 2026.

enhancement
Dominant language
TypeScript
Stars
1.8k
Forks
221
Avg merge
1d 6h
Merged PRs (30d)
26

Description

What problem does this feature solve?

问题

目前标签默认的样式是让文本颜色跟随 mark,当标签展示在系列内部时展示的效果很不好,如下:

Image

当标签超出 mark 包围盒时,展示的效果更差,即使开了智能反色也一样:

Image

期望

所以期望能够支持让配置标签的背景色跟随mark 颜色,文本本身的颜色支持智能反色(要么黑要么白),如下所示:

  1. 当标签展示在 Mark 外部时,不展示背景色,文本颜色智能反色
Header Header
Image Image
  1. 当标签完全展示在 Mark 内部的时候,不展示背景色,文本颜色智能反色
Header Header
Image Image
  1. 当标签超出 Mark 包围盒时,展示背景色(同 mark 颜色),文本颜色智能反色
Header Header
Image Image
What does the proposed API look like?

NA

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.