timeFromStart = date.getTime() - startTime;
float y = currentZeroCoordinate - value * yUnit;
float x = timeFromStart * xUnit;
Point p;
if (normalizedValues.size() == 1) {
/*
* Special behaviour for a graph with one point since we
* cannot calculate the width for it
*/
p = new Point(Math.round(x), Math.round(y), graph, 1,
value);
lastWidth = 1;
} else if (i == 0) {
/*
* Setting width for the first point to zero
*/
Date d = dates.get(1);
timeFromStart = d.getTime() - startTime;
lastWidth = 0;
p = new Point(Math.round(x), Math.round(y), graph,
lastWidth, value);
} else {
/*
* Other points calculate backwards
*/
if (getPlotMode() == PlotMode.BAR) {
// MT 22.3.2013: I have no idea why some points are
// ignored. Without this bars get totally messed,
// but without essential points may be dropped in
// lines (no 1 priority)
int diff = Math.round(x - lastX);
if (diff > 2) {
lastWidth = diff;
p = new Point(Math.round(x), Math.round(y),
graph, lastWidth, value);
} else {
p = null;
}
} else {
p = new Point(Math.round(x), Math.round(y), graph,
lastWidth, value);
}
}
if (p != null) {