调整图表和导航器的大小(Resize chart and navigator)

编程入门 行业动态 更新时间:2024-10-28 01:15:24
调整图表和导航器的大小(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

更多推荐

本文发布于:2023-07-30 12:09:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1337898.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图表   大小   Resize   chart   navigator

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!