Dmitriy Z
Dmitriy Z

Reputation: 383

Highcharts - Gantt Chart plot issue

I want to draw gantt-like chart and using this solution. It works like a charm as long as I don't start to use big intervals.

// Define tasks (unixtime * 1000)
var tasks = [{
    name: 'Eat',
    intervals: [{ // From-To pairs
        from: 1360800000000,
        to: 1360886400000
    }, {
        from: 1360368000000,
        to: 1360454400000,
    }, {
        from: 1360195200000,
        to: 1360281600000,
    }, {
        from: 1361059200000,
        to: 1361232000000
    }]
}];

Here is my example, based on code above. If you hover your mouse over the interval you will see not quite what expected: it shows wrong tooltip from other interval.

What's wrong with my code? May be I should define period format or something like that?

Thanks in advance.

Upvotes: 2

Views: 2238

Answers (1)

wergeld
wergeld

Reputation: 14442

Time series data must be in chronological order. I re-ordered your list like this and tooltip is as expected:

var tasks = [{
    name: 'Eat',
    intervals: [{
        from: 1360195200000,
        to: 1360281600000,
    },{
        from: 1360368000000,
        to: 1360454400000,
    },{
        from: 1360800000000,
        to: 1360886400000
    }, {
        from: 1361059200000,
        to: 1361232000000
    }]
}];

Upvotes: 1

Related Questions