如何处理Highcharts X轴数据过多时显示问题
1个回答
推荐于2016-04-12
展开全部
方法一:在Axis(包括xAxis和yAxis)有一个属性tickInterval,number类型,表示间隔,也就是间隔多少个值显示,比如设置为5,则表示每隔5个值才显示一个,在上面的基础上,经过设置tickInterval值为5,效果如下:
xAxis: {
tickInterval: 5,
categories:['2013-08-01 00:00:00','2013-08-01 00:00:10','2013-08-01 00:00:20','2013-08-01 00:00:30','2013-08-01 00:00:40','2013-08-01 00:00:50','2013-08-01 00:01:00','2013-08-01 00:01:10','2013-08-01 00:01:20','2013-08-01 00:01:30','2013-08-01 00:01:40','2013-08-01 00:01:50','2013-08-01 00:02:00','2013-08-01 00:02:10','2013-08-01 00:02:20','2013-08-01 00:02:30','2013-08-01 00:02:40','2013-08-01 00:02:50','2013-08-01 00:03:00','2013-08-01 00:03:10','2013-08-01 00:03:20','2013-08-01 00:03:30','2013-08-01 00:03:40','2013-08-01 00:03:50','2013-08-01 00:04:00'],
labels:{
x:45,//调节x偏移
//y:-35,//调节y偏移
//rotation:25//调节倾斜角度偏移
}
},
方法二:设置滚动条
//设置滚动条
scrollbar: {
enabled: true
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4,194.1, 95.6, 54.4,29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4,194.1, 95.6, 54.4,29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4,194.1, 95.6, 54.4,29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4,194.1, 95.6, 54.4]
}]
xAxis: {
tickInterval: 5,
categories:['2013-08-01 00:00:00','2013-08-01 00:00:10','2013-08-01 00:00:20','2013-08-01 00:00:30','2013-08-01 00:00:40','2013-08-01 00:00:50','2013-08-01 00:01:00','2013-08-01 00:01:10','2013-08-01 00:01:20','2013-08-01 00:01:30','2013-08-01 00:01:40','2013-08-01 00:01:50','2013-08-01 00:02:00','2013-08-01 00:02:10','2013-08-01 00:02:20','2013-08-01 00:02:30','2013-08-01 00:02:40','2013-08-01 00:02:50','2013-08-01 00:03:00','2013-08-01 00:03:10','2013-08-01 00:03:20','2013-08-01 00:03:30','2013-08-01 00:03:40','2013-08-01 00:03:50','2013-08-01 00:04:00'],
labels:{
x:45,//调节x偏移
//y:-35,//调节y偏移
//rotation:25//调节倾斜角度偏移
}
},
方法二:设置滚动条
//设置滚动条
scrollbar: {
enabled: true
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4,194.1, 95.6, 54.4,29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4,194.1, 95.6, 54.4,29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4,194.1, 95.6, 54.4,29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4,194.1, 95.6, 54.4]
}]
光点科技
2023-08-15 广告
2023-08-15 广告
通常情况下,我们会按照结构模型把系统产生的数据分为三种类型:结构化数据、半结构化数据和非结构化数据。结构化数据,即行数据,是存储在数据库里,可以用二维表结构来逻辑表达实现的数据。最常见的就是数字数据和文本数据,它们可以某种标准格式存在于文件...
点击进入详情页
本回答由光点科技提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询