echarts
echarts copied to clipboard
图表的容器dom隐藏后然后显示。出现的图表太小了。
<!--饼图 -->
<div ng-show="showChartType=='pie'">
<!-- pie:上报事件比例图:全院及科室-->
<div class="col echartContent" id="eventsProportionPie" ng-controller="eventProportionController"></div>
</div>
<!--柏拉图 -->
<div ng-show="showChartType=='plato'">
<div class="echartContent" id="plato"></div>
</div>
<!--折线图 -->
<div ng-show="showChartType=='line'">
<div class="echartContent" ng-controller="trendLineController" id="trendLine"></div>
</div>
···css .echartContent{
width: 100%;
height: 400px;
}
类似于这样的写法。在页面加载完成以后的图表显示正常。然后切换图标的隐藏显示之后,图表就很小。 如果把dom容器的width定义为绝对的px.那么图表大小不变。 请问有其他方法能解决这个问题吗?

这个问题还解决不了吗
@shenmegui9 找一个合适的时机 调用echart实例的resize方法试试。