Axis bug?
Posted: Wed Feb 27, 2008 4:10 pm
Hi,
I am drawing time series into a chart. The bottom axis and its corresponding labels and grid lines behave little strange. If I insert multiple series points for a period of several days with DateTime x coordinates, the first label/grid line to be shown for each particular day seems not to be the [date]/00:00 but [date]/1:00.
Also if I set the increment to one day and add two points having their datetimes set to two consecutive dates with zero hours and minutes, the labels are shown not below these two days but an hour later.
Is there a simple workaround for this? Am I possibly missing something?
Thanks,
Marian
chart.getAxes().getBottom().setIncrement(
com.steema.teechart.misc.Utils.getDateTimeStep(com.steema.teechart.DateTimeStep.ONEDAY)
);
...
Candle cse = new Candle();
DateTime d = new DateTime(2008, 2, 26);
cse.add(d, 25, 40, 20, 30);
for (int i=0; i<24; i++)
{
d.add(Calendar.HOUR_OF_DAY, 1);
cse.add(d, 19, 35, 15, 30);
}
d.add(Calendar.HOUR_OF_DAY, 1);
cse.add(d, 19, 20, 2, 5);
I am drawing time series into a chart. The bottom axis and its corresponding labels and grid lines behave little strange. If I insert multiple series points for a period of several days with DateTime x coordinates, the first label/grid line to be shown for each particular day seems not to be the [date]/00:00 but [date]/1:00.
Also if I set the increment to one day and add two points having their datetimes set to two consecutive dates with zero hours and minutes, the labels are shown not below these two days but an hour later.
Is there a simple workaround for this? Am I possibly missing something?
Thanks,
Marian
chart.getAxes().getBottom().setIncrement(
com.steema.teechart.misc.Utils.getDateTimeStep(com.steema.teechart.DateTimeStep.ONEDAY)
);
...
Candle cse = new Candle();
DateTime d = new DateTime(2008, 2, 26);
cse.add(d, 25, 40, 20, 30);
for (int i=0; i<24; i++)
{
d.add(Calendar.HOUR_OF_DAY, 1);
cse.add(d, 19, 35, 15, 30);
}
d.add(Calendar.HOUR_OF_DAY, 1);
cse.add(d, 19, 20, 2, 5);