apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.77k stars 19.62k forks source link

[Bug] markArea xAxis does not work as expected for heatmap #20387

Open melquelima opened 2 months ago

melquelima commented 2 months ago

Version

5.5.1

Link to Minimal Reproduction

https://codesandbox.io/p/sandbox/magical-bose-sv8qm7?file=%2Fsrc%2Findex.js%3A98%2C2

Steps to Reproduce

open link to preview the sample https://codesandbox.io/p/sandbox/magical-bose-sv8qm7?file=%2Fsrc%2Findex.js%3A98%2C2

OR

1 - open heat map sample in echarts website https://echarts.apache.org/examples/en/editor.html?c=heatmap-cartesian&version=5.5.1 2 - add Markarea code

markArea: { data: [ [{name: 'mark',xAxis: '2a'}, { xAxis: '3a'}]], label: { color: 'green' }, itemStyle: { color: 'orange', } }

Current Behavior

markarea in heatmap isnt working as spected

image

it works fine when it is in bar mode:

image

Expected Behavior

fix this issue

Environment

- OS: Windows
- Browser: Chrome
- Framework: None

Any additional comments?

No response

helgasoft commented 2 months ago

agree, would be better if heatmap.markArea display is consistent with bar.markArea. See if changing axisTick could help in some way. image

melquelima commented 1 month ago

@helgasoft it makes a little confusion when in heatmap view when Xaxis is not centered, like we dont know if value "3" belogns to 2a,3a or 4a