0
chart: {
height:"300",
width:"600",
type: 'column',
viewBox:"0 0 1000 400"
}
viewbox
在高圖表中沒有工作。高圖中的視圖框
請給我一個解決方案。
chart: {
height:"300",
width:"600",
type: 'column',
viewBox:"0 0 1000 400"
}
viewbox
在高圖表中沒有工作。高圖中的視圖框
請給我一個解決方案。
有沒有這樣的事情viewBox
與Highcharts。
創建一個圍繞圖表邊框你可以使用:
chart: {
height:"300",
width:"600",
type: 'column',
borderWidth:1, // around chart
plotBorderWidth:1, // around plot
}
將圖表添加到DOM。它是可以在其上設置屬性,像這樣的SVG節點元素:
setTimeout(function() {
var highchart = document.querySelector(".highcharts-container svg:last-of-type");
highchart.setAttribute("viewBox", "0 0 1324 400");
}, 10);
超時是確保highcharts來得及插入DOM中圖表。數據填充本身發生在初始化之後,所以10毫秒就可以了。
Viewbox在Highcharts不可用。所有參數可在這裏http://api.highcharts.com/highcharts#chart –
@jem:你應該接受有用的答案。它有助於建立你的回購以及SO。 –