echarts is highly adaptive

Because the echarts map needs to set the width and height to display, so it is enough to set the width and height for the ordinary interface

But for those that need to be highly adaptive , for example, to adapt to different resolution screens, you cannot set a fixed width and height

You need to use the vh unit

vh refers to the relative length unit in CSS, which means the relative viewport height (Viewport Height), 1vh = 1% viewport height

.echarts{
    
    
	height:400vh;
	width:100px;
}

Adjust the height of the echarts graph through the height of the viewport

If you want to adapt to the window size, you need to use windowthe resize method, you can read this blog
how to configure echarts responsive

Generally speaking, both highly adaptive and adaptive window size need to be considered

Guess you like

Origin blog.csdn.net/weixin_44001222/article/details/128509994