This is a migrated thread and some comments may be shown as answers.

Complex format for axis & tooltip

0 Answers 127 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Yvan
Top achievements
Rank 1
Yvan asked on 12 Dec 2011, 12:07 AM
Hi,

My x values are msec since epoch and I wish display it on x-axis and tooltip like hh:mm for instance with a function like this:
function parseDateTime(epoch){
    var date = new Date(epoch);
    return date.getHours() + ':' + date.getMinutes();
}

And with a chart configuration like this:
//...
tooltip: {
    visible: true,
    format: "{1:N2} m3 @ " + parseDateTime(xValue),
}
//...

Unfortunately I'm not able to retrieve the x value. The '{0}' joker may not be useful in such case. Has someone any idea how perform this task and even is it possible?

Thanks
Yvan

No answers yet. Maybe you can help?

Tags
Charts
Asked by
Yvan
Top achievements
Rank 1
Share this question
or