1

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?

0

2 Answers 2

1

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/

0
0

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/

2
  • good thinking! However, it doesn't seem to work for me yet. maybe because i use timestamps
    – Roysh
    Jul 11, 2017 at 21:29
  • I've edited my question and added a better example of my case
    – Roysh
    Jul 12, 2017 at 7:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.