Dear friends,
I have a line chart, and need to retrieve the start point and end point even after the zoom:
I'm using axis.bootom as:
Chart1.axes.bottom.labels.dateFormat = "isoTime";
I tried using the onzoom
Chart1.onzoom = function () {
alert (Chart1.axes.bottom.minimum);
alert (Chart1.axes.bottom.maximum);
};
But the return is a very large number, someone can tell me what is the format of that number? And how can I convert it in seconds, for example?
Sincerely,
Osvano.
Recovering start point and end point of a line graph
Re: Recovering start point and end point of a line graph
The number is a JavaScript Date value defined as "milliseconds since 1970/01/01"
Re: Recovering start point and end point of a line graph
Thanks RJCookeSE
I managed to solve this:
1) I created my start date to:
2) And to make the zoom:
Thank you,
Sincerely,
Osvano.
I managed to solve this:
1) I created my start date to:
Code: Select all
var now = new Date (1970, 0, 1, 0, 0, 0, 0). getTime ();
Code: Select all
Chart1.onzoom = function () {
document.getElementById('frmDatas:idInicio').Chart1.axes.bottom.minimum.toFixed(0) / 1000;
document.getElementById('frmDatas:idFinal').Chart1.axes.bottom.maximum.toFixed(0) / 1000;
};
Sincerely,
Osvano.