背景:因为数据不固定 高度写死导致数据显示不全,所以图表高度要根据内容计算 实现代码如下:

v-if="showCharts"

id="business-bars"

class="chart"

:style="{ height: chartHeight + 'px' }"

>