工具提示'共享'财产不起作用,我相信我的代码是正确的。我希望看到在将其作为github上的错误提交之前,我是否可能忽略了某些内容。
小提琴示例:https://jsfiddle.net/engemasa/z746turz/
//JavaScript
var chartOne = Highcharts.chart('chart1', {
chart : {
zoomType : 'x',
height: 300,
backgroundColor: 'rgba(0, 0, 0, 0.0)'
},
tooltip : {
shared: true,
crosshairs: true,
xDateFormat: "%b %e, '%y"
},
plotOptions: {
areaspline : {
fillColor: {
linearGradient: {
x1: 0,
y1: 0,
x2: 0,
y2: 1
},
stops: [
[0, Highcharts.getOptions().colors[0]],
[1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')]
]
},
marker: {
radius: 2
},
lineWidth: 1,
states: {
hover: {
lineWidth: 1
}
},
threshold: null
}
},
xAxis : {
type : 'datetime'
},
yAxis : {
title : {
text : null
}
},
series : [{
type : 'areaspline',
name: 'Sales',
data : randomData()
}, {
type : 'spline',
name : 'Previous Year',
data : randomData(),
color: "#990000"
}]
});