0
我有我需要通过整个容器div来延长时,页面被改变尺寸(变薄)隐藏Highcharts标签和放大图
我试图以编程方式隐藏在调整大小标签漏斗图但图表仍停留在一侧的DIV
https://jsfiddle.net/MicheleC/9oh3ttss/7/
function toogle_chart_label(chart, series, show){
var opt = chart.series[series].options;
if(typeof show == 'undefined') {
opt.dataLabels.enabled = !opt.dataLabels.enabled;
} else {
opt.dataLabels.enabled = show
}
}
function funnel_labels_adjust(){
if($('#container').width() < 300){
toogle_chart_label(funnel_chart, 0, false)
} else {
toogle_chart_label(funnel_chart, 0, true)
}
}
$(window).resize(function() {
funnel_labels_adjust()
});
您好,感谢您的答复。它会正确禁用标签,但图表不会重新缩放到div的整个宽度。漏斗仍然留在div – Michele
的左半边,我错过了那部分。您已将marginRight属性设置为100,在响应属性中将其设置为0,并且渠道将缩放到容器的全部宽度。 https://jsfiddle.net/9oh3ttss/10/ – morganfree