apache / apache/echarts

[Feature] continuous visualMap to support different color space and custom stop values

Open
#21,437 2 comments 0 reactions 0 assignees View on GitHub
en new-feature pending
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### What problem does this feature solve?

Currently the continuous visual map allows only interpolation in an RGBA-Space.
For enabling the advantages of different color spaces (in particular of the [CIELab color space](https://en.wikipedia.org/wiki/CIELAB_color_space) which is better suited to create human-perceptually uniform gradients) it would be best to be able to choose the color space in which the interpolation between two colors is performed.

Currently the continuous visual map allows only equidistant interpolation by using multiple colors in the `inRange` property.
But it would be nice to be able to set such interpolation stop values manually.

### What does the proposed API look like?

` {
visualMap: {
type: "continuous",
colorSpace: "lab" | "rgba" | ...,
inRange: {
stopValues: number[],
colors: string[]
}
}`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.