Highstocks图表宽度未正确呈现 [英] Highstocks graph width not correctly rendered
问题描述
您好,我在使用jquery选项卡时遇到了问题。
这是构造函数的代码。
Chart = new Highcharts.StockChart({
Chart = new Highcharts.StockChart({
chart:{
renderTo:
'Container',
alignticks:false
} ,
xAxis:{..........},
yAxis:[{.......}],
系列:[{.... ......}]
});
整个页面的宽度。
当页面被加载到包含图形的标签页时,它的宽度被正确渲染。
但是当页面被加载首先到另一个选项卡,然后它的宽度跨越页面的整个宽度,与页面上的其他内容重叠。因此,页面必须刷新以修复此问题。
有人有解决这个问题吗?
nt $(window).trigger('resize');
和Highcharts应该更新图表大小
Hello I have a problem with highstocks when using jquery tabs.
this is the code for the constructor.
Chart = new Highcharts.StockChart({
Chart = new Highcharts.StockChart({
chart: {
renderTo:
'Container',
alignticks:false
},
xAxis: { .......... },
yAxis: [{ ....... }],
series : [{ .......... }]
});
The Container has only half the width of the whole page.
When the page is loaded to the tab containing the graph, then its width is rendered correctly. But when the page is loaded first to another tab, then its width spans the whole width of the page, overlapping with other things on the page. So the page has to be refreshed in order to fix this.
Does anyone have a solution to this?
You could also trigger the window.resize Event
$(window).trigger('resize');
And Highcharts should update the Chart size
这篇关于Highstocks图表宽度未正确呈现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!