Actions
Bug #1013
closedWAxis labels for DateTime scale
Start date:
10/05/2011
Due date:
% Done:
0%
Estimated time:
Description
I believe there to be a bug when using the DateTime scale on WCartesianChart.
The following line in getLabelTicks() will never return true for units smaller than days due to the ordering of the unit enumeration.
bool atTick = (interval > 1) || (unit <= Days);
Enum:
enum { Days, Months, Years, Hours, Minutes } unit;
I've attached a patch file which I believe fixes the enumeration ordering.
Files
Updated by Koen Deforche about 13 years ago
- Status changed from New to InProgress
- Assignee set to Pieter Libin
Hey Mark,
I believe you're right indeed. Thanks.
Regards,
koen
Updated by Pieter Libin about 13 years ago
- Status changed from InProgress to Resolved
reproduced (and fixed) the problem with this code:
WStandardItemModel model;
WDate d(2009, 10, 1);
WDateTime start(d, WTime(1, 0, 0));
WDateTime end(d, WTime(1, 5, 0));
WDateTime dt = start;
int row = 0;
model.insertColumns(0, 2);
while (dt < end) {
model.insertRow(model.rowCount());
model.setData(row, 0, boost::any(dt));
model.setData(row, 1, boost::any(row * 10));
dt = dt.addSecs(60);
row++;
}
plotTimeSeriesChart(&model, "minutes.svg", DateTimeScale);
Updated by Koen Deforche almost 13 years ago
- Status changed from Resolved to Closed
Actions