apache / apache/echarts

[Bug] VisualMap categories seem to have a problem with strings representing numbers

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

Description

### Version

6.0.0

### Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=MYewdgzgLgBAJgQyggQguMC8MDaAoGXAcgEEiAaGIgMxBApgAZKciBmAJkYfYEYBOHgGEASoMpEAov24BdCZznkCxFD1r1KzYmwE9FwsT2lKquwfJWsyEgEYIATg22tR4s3oVdjMovKpufsqErGp2js4sUr4KngFGXqbRcniyANx4oJCwiMgA4nQY2PghpOp0kTrese5EAOy8dTx1bAAcQWbelqVhVBqVrOb61VQNTRIt7f58FsHENlT2TlpRY_px7CP1bR31jUFWRL1ESwPb7TXN-4m7k36pGVnQMMBIaEU6GwYSgRImfo9wM9XlACiAPoMvls1hMduk8HgQAAHKAAS3AWBgAG8VAAPEi41EQABc2JUhCgAE8kQBTUlEEE0gDmIAclKIKgAvnNKQSiaScYQKdS6VRGSy2RzCNyVBAaQ5UTSSbhyWShULcghSZr3pQAPR6-BIBBguBzdVU2n0gAWNKQAFsEEipULOSpujAADYIWw0z0C1UQa0gADupKgDgArjTzTBaA5HVAoPLSdRI2BgGiMQAKJGOBD2iAASjV6pgDhpUEjDjAMDzDgLEAAdAA3BCe6M4AAs8PVbulcxbRMj7YAsk6AxaRfSkYrgDSQ0SaRRA8GwzAI9HY3BUfaaZB0WBSV3Y6iwCIEGAmaLBWXQJ7WaSSmXCEQHEz7NneMxv-QOABWf9yF4IsVxfV930_VpmGgv9AOA0DY3VN8PwQL9_x_DC4KAkCwPAlDPw4Lg_2IgCcNA1VCFkVUZQtZF6XnMBk2WVUFSZa0oHpNgAFI8MIcVWUVZUQXeGADReJBTS5PBOTSIA

### Steps to Reproduce

Please see link above.

### Current Behavior

I created a heatMap series where the visualMap categories refer to dim 4 of the series data. Note that the coloring fails for categories which contain letters, but not for the ones which contain digits only. Use dataGood/dataBad in combination with catGood/catBad to see the difference if ALL categories are digit-only. Also note that everything is provided as strings, never as numbers.

### Expected Behavior

Map coloring should work independently from characters used in category strings.

### Environment

```markdown
- OS:Windows
- Browser:Chrome/Firefox
- Framework:
```

### Any additional comments?

_No response_

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.