I tried adding xaxis. ordinal = true. But it didn't work. I am plotting a candlestick chart.
Below is my code.
Code: Select all
var chart = Highcharts.stockChart({
chart: {
renderTo: 'highchart-span',
events: {
load: function () {
//---get new tick
get_new_tick(this.series[0]);
}
}
},
navigator: {
margin: 2
},
rangeSelector: {
allButtonsEnabled: true,
selected: 2
},
title: {
text: 'STOCHASTIC'
},
xAxis: {
ordinal: true
},
series: [{
type: 'candlestick',
name: 'STOCHASTIC',
data: content,
dataGrouping: {
units: [
[
'week', // unit name
[1] // allowed multiples
], [
'month',
[1, 2, 3, 4, 6]
]
]
}
}]
});