调整图表和导航器的大小(Resize chart and navigator)
如何调整图表和导航器的大小? 在我的JSFiddle http://jsfiddle.net/Charissima/8nenL/4/中,当窗口调整大小时,图表会消失。
$(window).resize(function() { chart.setSize( $(document).width(), $(document).height()/2, false ); }); var chart = new Highcharts.Chart({ chart: { renderTo: container, spacingTop: 3, spacingRight: 0, spacingBottom: 3, spacingLeft: 0 }, navigator: { enabled: true, top: 330, // Abstand von oben outlineColor: '#C0C0C0', outlineWidth: 1 }, credits: { enabled: false }, xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, series: [{ data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }]});
How can I resize a chart and the navigator? In my JSFiddle http://jsfiddle.net/Charissima/8nenL/4/ the chart disappears, when the window is resized.
$(window).resize(function() { chart.setSize( $(document).width(), $(document).height()/2, false ); }); var chart = new Highcharts.Chart({ chart: { renderTo: container, spacingTop: 3, spacingRight: 0, spacingBottom: 3, spacingLeft: 0 }, navigator: { enabled: true, top: 330, // Abstand von oben outlineColor: '#C0C0C0', outlineWidth: 1 }, credits: { enabled: false }, xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, series: [{ data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }]});
最满意答案
它看起来像highstock的全局问题,所以我在这里向我们的开发人员报告: https : //github.com/highslide-software/highcharts.com/issues/2364
It looks like a global problem with highstock, so I reported it to our developers here: https://github.com/highslide-software/highcharts.com/issues/2364
更多推荐
发布评论