Reputation: 1550
I have a Highchart which displays hourly data while the x axis is set to a daily tick interval. What I get is a graph with markers on hours (24 between every tick). Is there a way to display the markers only where there is tick? Is there a 'marker interval'?
EDIT
To simplify my question - If we look at this chart http://jsfiddle.net/kmdbqg1w/1/
xAxis: {
type: 'datetime',
tickInterval: 24 * 3600 * 1000,
},
I want the markers to appear only when it's 1.Jan and 2.Jan on the x axis and not anywhere between them (or after 2.Jan), yet to have the data between them appear on tooltip. Is that possible?
Upvotes: 1
Views: 968
Reputation: 12472
You can control markers by series.marker
option.
Disable markers in the series
series: [{
marker: {enabled: false},
Enable markers for the points you want:
data: [
[1483225200000,0],
{x: 1483228800000, y: 23, marker: {enabled: true}},
[1483232400000,46]
]
example: http://jsfiddle.net/p1wfopxb/
Upvotes: 1
Reputation: 3507
You can use plotOptions options, max and min properties of axis like below
plotOptions : {
series : {
pointStart : 0,
pointInterval : 5
}
},
xAxis: {
tickInterval: 5,
min:0,
max:10
},
see this updated link http://jsfiddle.net/qvwt6mjr/
Upvotes: 0