Open lozn00 opened 6 months ago
axisLabel.fontSize says fontSize must be a number, but it seems strings (like "0.53rem") are supported too - Demo Code.
📌 please close issue if problem solved.
function remToPx(rem) { var fontSize = document.documentElement.style.fontSize; return rem * Number.parseFloat(fontSize); }
建议将将rem单位转成px来使用
Version
5.5.0
Link to Minimal Reproduction
https://codepen.io/Ovilia/pen/dyYWXWM
Steps to Reproduce
My project is a Vue project, and the 0.1 units I wrote to death are the normal size on the phone, but it appears very small on the computer. In addition, the 0.1 rem I wrote outside is very small on the Edge browser, which is also very small on the computer and phone. However, Google Chrome cannot shrink it, so it gave me an illusion. Anyway, it turns out that echart does not support rem
Current Behavior
not support unit rem
Expected Behavior
support unit rem
Environment
Any additional comments?
use remToPx is ok