0
有人可以告訴從哪裏瞭解不同的Series對象含義,如plotX,plotLeft和all..in highcharts ???HighCharts參數含義 - plotX,plotLeft,shapeArgs
我搜索了文檔,但無法找到。
我想了解這段代碼。
$(function() {
$('#container').highcharts({
chart: {
type: 'column'
},
plotOptions: {
column: {
stacking: 'normal',
point: {
events: {
mouseOver: function() {
var chart = this.series.chart,
r = chart.renderer,
shape = this.shapeArgs,
xAxis = this.series.xAxis,
yAxis = this.series.yAxis,
y = yAxis.toPixels(this.total),
x = this.plotX + chart.plotLeft - shape.width/2,
height = yAxis.toPixels(yAxis.min) - y;
if (chart.hoverStack) {
chart.hoverStack.destroy()
}
chart.hoverStack = r.rect(x, y, shape.width, height).attr({
'stroke-width': 6,
'stroke': 'black',
fill: 'transparent',
}).add();
},
mouseOut: function() {
if (this.series.chart.hoverStack) {
this.series.chart.hoverStack.destroy();
this.series.chart.hoverStack = false
}
}
}
}
}
},
series: [{
type: 'column',
name: 'John',
data: [3, 3, 3, 3, 3]
}, {
type: 'column',
name: 'Bob',
data: [5, 3, 4, 7, 2]
}, {
type: 'column',
name: 'Joe',
data: [2, 2, 2, 2, 2]
}, {
type: 'column',
name: 'Ken',
data: [3, 4, 4, 2, 5]
}]
});
});
這些是內在的方法,您需要挖掘來源以瞭解這些選項是什麼。 'plotX' - >用於繪製點的x位置,'shapeArgs' - >具有用於在SVG中繪製的形狀參數的對象,'plotLeft' - >邊框和繪圖區域之間的左邊距/間距。 – 2015-02-25 12:49:57
@PawełFus..Yea我會研究一下...... – 2015-02-25 14:35:11