We are facing problem with the x-axis date time increment value. When the x axes increment time value is less than or equal to 1 hour the time value same for all the time zones.
Below is the example code for the increment value(<=1 hour),
Code: Select all
var Chart1;
function draw() {
Chart1 = new Tee.Chart("canvas");
var series1, series2, series3;
series1 = Chart1.addSeries(new Tee.Line());
series2 = Chart1.addSeries(new Tee.Line());
series3 = Chart1.addSeries(new Tee.Line());
series1.title = "Descricao do teste 1";
series2.title = "Descricao do teste 2";
series3.title = "Descricao do teste 3";
var startDate, tmp, values1, values2, values3;
//startDate = new Date(2014,12,4,14,30,53);
startDate = new Date(2000, 1, 1, 0, 0, 0);
values1 = [0.54881, 0.42365, 0.96366, 0.56804, 0.02022, 0.97862, 0.11827, 0.52185, 0.45615];
values2 = [0.59284, 0.62356, 0.27266, 0.39278, 0.36824, 0.47361, 0.72063, 0.10591, 0.21655];
values3 = [0.71519, 0.64589, 0.38344, 0.92560, 0.83262, 0.79916, 0.63992, 0.41466, 0.56843];
series1.data.values.length = values1.length;
series2.data.values.length = values2.length;
series3.data.values.length = values3.length;
series1.data.values = values1;
series2.data.values = values2;
series3.data.values = values3;
series1.data.x = new Array(values1.length);
series2.data.x = new Array(values2.length);
series3.data.x = new Array(values3.length);
for (i = 0; i < values1.length; i++) {
tmp = new Date(startDate.getTime() + i * 1800000);
series1.data.x[i] = tmp;
series2.data.x[i] = tmp;
series3.data.x[i] = tmp;
}
Chart1.axes.bottom.labels.dateFormat = "shortTime";
[b]Chart1.axes.bottom.increment = series1.data.x[1] - series1.data.x[0];[/b]
Chart1.draw();
}
But, if the x axes increment time value is greater than 1 hour the x axis value is dynamically changing based on the time zones.
To check the time zone issue please use the below code for the increment and change the time zone in your system.
Chart1.axes.bottom.increment = series1.data.x[2] - series1.data.x[0];
Please refer the attachment for the x-axis time zone error.