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