[Feature] Create a continuous VisualMap with log distribution
- Dominant language
- TypeScript
- Stars
- 67.3k
- Forks
- 19.8k
- Avg merge
- 11d 14h
- Merged PRs (30d)
- 8
Description
### What problem does this feature solve?
When creating a series of type "heatmap", it would be nice to have a continuous VisualMap distributed on a log scale. Currently it can only be distributed linearly.
It is possible to achieve similar results by taking the log of all the series data, but in doing so you lose the physical meaning behind the numbers.
An analogous example in python is the difference between [numpy.linspace()](https://numpy.org/doc/stable/reference/generated/numpy.linspace.html#numpy.linspace), and [numpy.geomspace()](https://numpy.org/doc/stable/reference/generated/numpy.geomspace.html#numpy.geomspace).
I propose having a VisualMap option called "scaling", which defaults to "linear", but can be set to "log".
### What does the proposed API look like?
```
option = {
series: [{
type: "heatmap",
//...
}],
visualMap: {
type: "continuous",
scaling: "log" // use the logic from numpy.geomspace()
}
};
```
Contributor guide
Assessment
This issue has not been assessed yet.