Skip to content

Commit

Permalink
fixed rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
EinsamHauer committed Jul 29, 2015
1 parent 3c16e52 commit bacbc47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/iponweb/disthene/reader/graph/Graph.java
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ protected void consolidateDataPoints() {

for (DecoratedTimeSeries ts : data) {
double numberOfDataPoints = ts.getValues().length;
double divisor = ts.getValues().length;
double divisor = ts.getValues().length - 1;
double bestXStep = numberOfPixels / divisor;

if (bestXStep < imageParameters.getMinXStep()) {
Expand Down Expand Up @@ -776,7 +776,7 @@ protected void setupXAxis() {
startDateTime = new DateTime(startTime * 1000, renderParameters.getTz());
endDateTime = new DateTime(endTime * 1000, renderParameters.getTz());

double secondsPerPixel = (endTime - startTime) / graphWidth;
double secondsPerPixel = (endTime - startTime) / (double) graphWidth;
xScaleFactor = (double) graphWidth / (endTime - startTime);

xAxisConfig = XAxisConfigProvider.getXAxisConfig(secondsPerPixel, endTime - startTime);
Expand Down

0 comments on commit bacbc47

Please sign in to comment.