tentone 5 gadi atpakaļ
vecāks
revīzija
c5cf1355a6
2 mainītis faili ar 4 papildinājumiem un 6 dzēšanām
  1. 2 3
      build/escher.js
  2. 2 3
      source/objects/chart/BarGraph.js

+ 2 - 3
build/escher.js

@@ -4636,9 +4636,8 @@
 		{
 		{
 			var y = this.box.max.y - ((this.data[i] - this.min) / gamma) * height;
 			var y = this.box.max.y - ((this.data[i] - this.min) / gamma) * height;
 
 
-
-			context.moveTo(this.box.min.x + s, y);
-			context.rect(this.box.min.x + s - barHalfWidth, y, barWidth, height);
+			context.moveTo(this.box.min.x + s - barHalfWidth, y);
+			context.rect(this.box.min.x + s - barHalfWidth, y, barWidth, this.box.max.y - y);
 		}
 		}
 
 
 		if(this.strokeStyle !== null)
 		if(this.strokeStyle !== null)

+ 2 - 3
source/objects/chart/BarGraph.js

@@ -47,9 +47,8 @@ BarGraph.prototype.draw = function(context, viewport, canvas)
 	{
 	{
 		var y = this.box.max.y - ((this.data[i] - this.min) / gamma) * height;
 		var y = this.box.max.y - ((this.data[i] - this.min) / gamma) * height;
 
 
-
-		context.moveTo(this.box.min.x + s, y);
-		context.rect(this.box.min.x + s - barHalfWidth, y, barWidth, height);
+		context.moveTo(this.box.min.x + s - barHalfWidth, y);
+		context.rect(this.box.min.x + s - barHalfWidth, y, barWidth, this.box.max.y - y);
 	}
 	}
 
 
 	if(this.strokeStyle !== null)
 	if(this.strokeStyle !== null)