I want to draw a pretty special graph in Highcharts (javascript library). I want the x-axis to have the decades from 1890 to 2010, but the graph data-can be in between these decades (for example 1891 or 1974). Does anyone know how to do this? Or can point me in the right direction.
Using min and max together with tickInterval and minorTickInterval will do the work.
// Start at 1890
min: Date.UTC(1890, 0, 1),
// End at 2010
max: Date.UTC(2010, 0, 1),
// Tick interval of 10 years
tickInterval: Date.UTC(2010, 0, 1) - Date.UTC(2000, 0, 1),
// Minor tick interval of 2
minorTickInterval: Date.UTC(2010, 0, 1) - Date.UTC(2008, 0, 1)
Example on jsfiddle

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With