Version
5.2.2
Link to Minimal Reproduction
https://codepen.io/ixonya/pen/NWazQRm
Steps to Reproduce
- Create a heatmap chart, and set series.label.show = true, in order to show the values in each item.
- Use a 'key-value format' dataset as the data source. The data is like :
var datasetSrc = [
{
x: 0, y: 0, value: 1
},
{
x: 1, y: 1, value: 5
},
{
x: 2, y: 2, value: 7
},
{
x: 3, y: 3, value: 10
},
];
Current Behavior
The heatmap shows correctly, however, all item labels are dashes: "-".
I tried to set "encode" and "dimensions" settings, but didn't help.
The item heat colors are right, and tooltips for each item show correct values, but labels are not working.
Expected Behavior
Item labels show correct values.
Environment
- OS:
- Browser:
- Framework:
Any additional comments?
No response
2条答案
按热度按时间mf98qq941#
I just found a workaound that using label.formatter to return the correct value.
hivapdat2#
Same issue when the data is specified as an array:
In combination with this option:
will always display the label from the third element of
datasetSrc
(index 2; see https://codepen.io/radusuciu/pen/wvXPKao ), and I believe thatlabel.formatter
is the only way to override this currently: