跳至主要内容

[note] Highcharts 筆記

highcharts @ official

速查​

/**
* 圖示 legend
**/

legend.itemStyle // 圖示文字
legend.symbolRadius // 圖示
legend.symbolHeight

Design and Style​

大部分 Highcharts 的元素都可以使用 x 和 y 的值來定位,並且使用 align(搭配 left, right 或 center)或 verticalAlign(搭配 top, bottom, middle)。

chart​

圖表的位置是根據外層的 container div 來定位。寬高則可以設定在外層 container div 的 height 或 width ,或者透過設定 chart.height 和 chart.width 。

img

chart: {
// Edit chart spacing
spacingBottom: 15,
spacingTop: 10,
spacingLeft: 10,
spacingRight: 10,

// Explicitly tell the width and height of a chart
width: null,
height: null
}

credit​

顯示 Highcharts 在圖表上:

credits: {
position: {
align: 'left',
verticalAlign: 'bottom',
x: 10,
y: -10
}
}

// 不顯示 credits
credits: {
enabled: false
},

Design and Style