BizCharts [bug] autoFit don't shrink in flex layout

d5vmydt9  于 2022-11-02  发布在  其他
关注(0)|答案(1)|浏览(138)

BizCharts Version: 4.0.16
Platform: All
Mini Showcase(like screenshots): too lazy to make screenshots, see link below
fork and create a demo: https://bizcharts.net/gist/2BiS2i3AiOc

For example,

<div style={{ display: 'flex' }}>
	<div style={{ width: 300 }} />
	<div style={{ flex: 1 }}>
		<Chart autoFit />
	</div>
</div>

The <Chart> will be correctly rendered at the first time, then if you enlarge the browser, it will enlarge itself to fit. But if you shrink the browser, it will not become smaller.

This is even worse when we have flex-wrap: wrap , because the chart element does not shrink, it will be wrapped to the next line. Then whatever you do with your window size, the chart will not go back to what it supposed to be.

Maybe related: #1052 .

nbysray5

nbysray51#

同遇到此问题,请问是否解决了?

相关问题