//时间截断
$(function () {
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'column',
rightMargin: 80
},
xAxis: {
type: 'datetime',
tickInterval: 24*3600*1000,
labels:{
rotation:-70,
y:30
}
},
yAxis: [{
// default options
}, {
linkedTo: 0,
opposite: true
}],
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4,123,434,546,34,34,6,7,15,98,45,96,36,15,23,15,34,654,23,43,65,84,23,5,34],
pointStart: Date.UTC(2010, 0, 1),
pointInterval: 3600*1000// one day
}]
});
});
//利用主轴可以做上下限设定---不是很可取
$(function () {
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
marginTop: 50,
marginBottom: 50,
marginLeft: 50,
marginRight: 50
},
xAxis: [
{
gridLineWidth: 1,
min: -5,
max: 5,
tickInterval: 1,
lineColor: 'black',
offset: -150
},
{
gridLineWidth: 1,
min: -5,
max: 5,
tickInterval: 0,
lineColor: 'black',
offset: -220
},
],
yAxis: {
min: -5,
max: 5,
tickInterval: 1,
lineWidth: 1,
lineColor: 'black',
offset: -150,
title: {
text: null
}
},
series: [{
data: [
[-3, 3],
[-2, 2],
[-1, 1],
[0, 0],
[1, 1],
[2, 2],
[3, 3]
]
}]
});
});
//上下限设定--最佳可取方案
$(function () {
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container'
},
xAxis: {
},
yAxis: {
plotBands: [{
color: 'red',
width: 2,
value: 100,
dashStyle:"dash",
}]
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4],
}]
});
});
$(function () {
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'column',
rightMargin: 80
},
xAxis: {
type: 'datetime',
tickInterval: 24*3600*1000,
labels:{
rotation:-70,
y:30
}
},
yAxis: [{
// default options
}, {
linkedTo: 0,
opposite: true
}],
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4,123,434,546,34,34,6,7,15,98,45,96,36,15,23,15,34,654,23,43,65,84,23,5,34],
pointStart: Date.UTC(2010, 0, 1),
pointInterval: 3600*1000// one day
}]
});
});
//利用主轴可以做上下限设定---不是很可取
$(function () {
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
marginTop: 50,
marginBottom: 50,
marginLeft: 50,
marginRight: 50
},
xAxis: [
{
gridLineWidth: 1,
min: -5,
max: 5,
tickInterval: 1,
lineColor: 'black',
offset: -150
},
{
gridLineWidth: 1,
min: -5,
max: 5,
tickInterval: 0,
lineColor: 'black',
offset: -220
},
],
yAxis: {
min: -5,
max: 5,
tickInterval: 1,
lineWidth: 1,
lineColor: 'black',
offset: -150,
title: {
text: null
}
},
series: [{
data: [
[-3, 3],
[-2, 2],
[-1, 1],
[0, 0],
[1, 1],
[2, 2],
[3, 3]
]
}]
});
});
//上下限设定--最佳可取方案
$(function () {
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container'
},
xAxis: {
},
yAxis: {
plotBands: [{
color: 'red',
width: 2,
value: 100,
dashStyle:"dash",
}]
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4],
}]
});
});