如何格式化 HighChartsJS 工具提示,使其只显示一个 X 轴?
How to Format HighChartsJS ToolTip so it Only shows one X-axis?
这是我目前在我的图表中使用的代码,我的问题是我似乎无法格式化工具提示以便只显示一个 X 轴值,如下图所示,基本上,我想完全控制 X 和 Y 点的 post 编辑方式,现在我有一个不请自来的 X 轴客人。我似乎无法在这个系统和任何可以解释为什么会发生这种情况或如何阻止它的示例之间找到合理的区别。
https://drive.google.com/file/d/0B9EllFfWHFFVT1JaMEp4ZG9xYXc/view
抱歉不得不 post 外部图像因为我在这里花的时间太少...
//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
}]
});
});
}
tooltip: {
pointFormat: 'Weeks In: {point.x}, {series.name}: {point.y}',
headerFormat: ""
},
这是我目前在我的图表中使用的代码,我的问题是我似乎无法格式化工具提示以便只显示一个 X 轴值,如下图所示,基本上,我想完全控制 X 和 Y 点的 post 编辑方式,现在我有一个不请自来的 X 轴客人。我似乎无法在这个系统和任何可以解释为什么会发生这种情况或如何阻止它的示例之间找到合理的区别。
https://drive.google.com/file/d/0B9EllFfWHFFVT1JaMEp4ZG9xYXc/view 抱歉不得不 post 外部图像因为我在这里花的时间太少...
//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
}]
});
});
}
tooltip: {
pointFormat: 'Weeks In: {point.x}, {series.name}: {point.y}',
headerFormat: ""
},