Actions
Bug #1013
closed
MS
PL
WAxis labels for DateTime scale
Bug #1013:
WAxis 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
KD Updated by Koen Deforche almost 15 years ago
- Status changed from New to InProgress
- Assignee set to Pieter Libin
Hey Mark,
I believe you're right indeed. Thanks.
Regards,
koen
PL Updated by Pieter Libin almost 15 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);
KD Updated by Koen Deforche almost 15 years ago
- Status changed from Resolved to Closed
Actions