【发布时间】:2015-09-18 20:38:40
【问题描述】:
再次更新 - 现在我添加了 yAxis 属性,但它什么也没显示:
$('#highchart').highcharts({
chart: {
type: 'line'
},
title: {
text: 'My Data'
},
subtitle: {
text: 'By Day'
},
xAxis: {
categories: date_arr
},
yAxis: [{title: {text: 'PV'}},
{title: {text: 'UPV'}},
{title: {text: 'PPV'},opposite: true}
],
plotOptions: {
line: {
dataLabels: {
enabled: false
},
enableMouseTracking: true
}
},
series: [{
name: 'PV',
data: pv_arr,
yAxis:1
},
{
name:'UPV',
data:upv_arr,
yAxis:2
},
{
name:'PPV',
data:ppv_arr,
yAxis:3
}
]
});
它什么都不会显示——实际上什么都不会,甚至图表的标题也不会。而是一个空白区域。
更新 - 现在我正在使用它但仍然无法正常工作......
$('#highchart').highcharts({
chart: {
type: 'line'
},
title: {
text: 'My Data'
},
subtitle: {
text: 'By Day'
},
xAxis: {
categories: date_arr
},
yAxis: [{title: {text: 'PV'}},
{title: {text: 'UPV'}},
{title: {text: 'PPV'},opposite: true}
],
plotOptions: {
line: {
dataLabels: {
enabled: false
},
enableMouseTracking: true
}
},
series: [{
name: 'PV',
data: pv_arr
},
{
name:'UPV',
data:upv_arr
},
{
name:'PPV',
data:ppv_arr
}
]
});
是这样的(新标签已经准备好,但指标仍然是旧方式):
-- 原帖--
我正在使用 HighCharts 为网站访问者显示一些数据
在上图中。蓝色和深蓝色线非常大,因为它们是页面访问。绿色的是页面浏览量/独特的页面浏览量。与访问次数相比,这是一个非常小的数字。如何像 Microsoft Excel 那样设置第二个 y 轴系统?
顺便说一句,x轴上的日期太拥挤了,有没有办法让它们自动保持在一行? (有时只有 7 天的数据)
谢谢
【问题讨论】:
标签: highcharts