Javascript AngularJS中的剑道UI图表在初始加载时不调整大小
我们已经研究了这个问题。我们仪表板的基本结构如下所示: Panelbar(多个:真)Javascript AngularJS中的剑道UI图表在初始加载时不调整大小,javascript,angularjs,kendo-chart,Javascript,Angularjs,Kendo Chart,我们已经研究了这个问题。我们仪表板的基本结构如下所示: Panelbar(多个:真) 表格面板(默认活动状态) 带tabstrip的桌板 ~9个标签 带有4个选项卡的tabstrip面板( 散点图 条形图 条形图 直方图 桌板 我的同事尝试将图表面板设置为默认的活动状态,这是可行的,但我们希望第一个表格面板设置为默认的活动状态。当我们切换到第三个面板(第一次)时,我们将得到一个只占一半宽度的图表。当我们循环图表选项卡并返回时,它会正确呈现 我让它在旧(jQuery)版本中工作,并进行
- 表格面板(默认活动状态)
- 带tabstrip的桌板
- ~9个标签
- 带有4个选项卡的tabstrip面板(
- 散点图
- 条形图
- 条形图
- 直方图
- 桌板
$(“#图表”)。在('click',函数(e){
设置超时(调整大小,0);
})
$(“#图表分区”)。单击(功能(e){
e、 停止传播();
});
函数调整大小(){
var图表=$(“#MOSChart”).数据(“kendoChart”);
chart.resize();
};
下面是我们用于图表面板的代码:
<div kendo-tab-strip k-content-urls="[ null, null, null, null]">
<ul>
<li class="k-state-active" style="font-weight: bold" > MOS_scatter</li>
<li style="font-weight: bold">MOS_bar</li>
<li style="font-weight: bold">Completion_bar</li>
<li style="font-weight: bold">MOS_histogram</li>
</ul>
<div>
<moschart config ="config" plot_to_slope = "plotToSlope(m, b, x)" line_reg = "lineReg(x, y)" mos_type = "'PESQ'" ng-if ="config"></moschart>
</div>
<div>
<aggregatedmoschart config ="config" plot_to_slope = "plotToSlope(m, b, x)" line_reg = "lineReg(x, y)" mos_type = "'PESQ'" ng-if ="config"></aggregatedmoschart>
</div>
<div>
<callcompletionchart config ="config" plot_to_slope = "plotToSlope(m, b, x)" line_reg = "lineReg(x, y)" mos_type = "'PESQ'" ng-if ="config"></callcompletionchart>
</div>
<div>
<moshistogram config ="config" mos_type = "'PESQ'" ng-if ="config"></moshistogram>
</div>
</div>
- MOS\U散点
MOS\u栏
填写栏
MOS\U直方图
我们想知道是否有一种方法可以用AngularJS而不是jQuery黑客来解决这个问题。谢谢阅读
<div kendo-tab-strip k-content-urls="[ null, null, null, null]">
<ul>
<li class="k-state-active" style="font-weight: bold" > MOS_scatter</li>
<li style="font-weight: bold">MOS_bar</li>
<li style="font-weight: bold">Completion_bar</li>
<li style="font-weight: bold">MOS_histogram</li>
</ul>
<div>
<moschart config ="config" plot_to_slope = "plotToSlope(m, b, x)" line_reg = "lineReg(x, y)" mos_type = "'PESQ'" ng-if ="config"></moschart>
</div>
<div>
<aggregatedmoschart config ="config" plot_to_slope = "plotToSlope(m, b, x)" line_reg = "lineReg(x, y)" mos_type = "'PESQ'" ng-if ="config"></aggregatedmoschart>
</div>
<div>
<callcompletionchart config ="config" plot_to_slope = "plotToSlope(m, b, x)" line_reg = "lineReg(x, y)" mos_type = "'PESQ'" ng-if ="config"></callcompletionchart>
</div>
<div>
<moshistogram config ="config" mos_type = "'PESQ'" ng-if ="config"></moshistogram>
</div>
</div>