PDA

View Full Version : TimeAxis problem (Beta2)



EthiC
19 Jan 2012, 1:39 AM
It seems that it is impossible to set a startDate and endDate on the TimeAxis (that isn't part of the attached store/model).
Setting the steps on the timeAxis also does nothing at all.
It seems that it only displays the available values stored in the ListStore.

wanted:
30824

Received:
30825
Given that startDate = day1:0h00 and endDate = day2:0h00 (4 steps should result into 6h interval)

xAxis = new TimeAxis<GWTComScheduleStatusSummaryDTO>();
xAxis.setPosition(Position.BOTTOM);
xAxis.setField(ACCESSOR.date());
xAxis.setLabelProvider(new LabelProvider<Date>() {
@Override
public String getLabel(Date item) {
return FORMAT.format(item);
}
});

store.replaceAll(new ArrayList<GWTComScheduleStatusSummaryDTO>(dto.getStatusCollection()));


xAxis.setStartDate(dto.getStartDate());
xAxis.setEndDate(dto.getEndDate());
xAxis.setSteps(4);

addAxis(xAxis);