0
這是我目前在我的圖中使用的代碼,我的問題是,我似乎無法格式化工具提示,以便只出現一個X軸值,您可以在下面的圖像中看到,基本上我'我喜歡完全控制X和Y點的發佈方式,現在我得到了一個不請自來的X軸客人。我似乎無法找到這個系統和任何可以解釋爲什麼會發生這種情況或如何阻止它的例子之間的合理區別。如何格式化HighChartsJS工具提示使其僅顯示一個X軸?
https://drive.google.com/file/d/0B9EllFfWHFFVT1JaMEp4ZG9xYXc/view 遺憾不得不張貼的外部形象,因爲我花太少時間在這裏...
//call in the quants
$(function() {
$('#container1').highcharts({
chart: {
type: 'area'
},
title: {
text: 'Cost Of Program'
},
subtitle: {
text: 'Price of The Program'
},
xAxis: {
title: {
enabled: true,
text: 'Weeks '
},
categories: xAxis
},
yAxis: {
title: {
text: 'Cost'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
pointFormat: 'Weeks In: {point.x}, {series.name}: {point.y}'
},
plotOptions: {
area: {
pointStart: 0,
marker: {
enabled: false,
symbol: 'circle',
radius: 2,
states: {
hover: {
enabled: true
}
}
}
}
},
series: [{
name: 'Money Youll Win Back If You Quit',
data: winMoney
},{
name: 'How Much Youll Lose If You Quit',
data: loseMoney
}, {
name: 'Cost of the Program (cumulative)',
data: ourFee
}]
});
});
}
真棒修復,謝謝! –