Is there any possibility to set the xAxis of the Highstock graph to display only the time?
Here it shows both date and time and I need to display only time:
Thanks in advance.
$(function () {
// Create the chart
Highcharts.stockChart('container1', {
chart: {
width: 500,
height: 300
},
title: {
text: 'AAPL Stock Price'
},
xAxis: {
tickInterval: 1
},
rangeSelector: {
selected: 4,
inputEnabled: false,
buttonTheme: {
visibility: 'hidden'
},
labelStyle: {
visibility: 'hidden'
}
},
navigator: {
enabled: false
},
scrollbar: {
enabled: false
},
series: [{
name: 'AAPL Stock Price',
data: [45,90,90,45,50,90,39,50,90,39],
step: true,
tooltip: {
valueDecimals: 2
}
}]
});
});
$(function () {
Highcharts.stockChart('container', {
chart: {
width: 500,
height: 300
},
title: {
text: 'AAPL Stock Price'
},
xAxis: {
type: 'datetime',
tickInterval : 1,
dateTimeLabelFormats : {
day: '%M min'
}
},
rangeSelector: {
selected: 0,
inputEnabled: false,
buttonTheme: {
visibility: 'hidden'
},
labelStyle: {
visibility: 'hidden'
}
},
navigator: {
enabled: false
},
scrollbar: {
enabled: false
},
series: [{
name: 'AAPL Stock Price',
data: [45,90,90,45,50,90,39,50,90,39],
pointStart: Date.UTC(2010, 0, 1),
pointInterval: 3600 * 1000 ,
step: true,
tooltip: {
valueDecimals: 2
}
}]
});
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.