diff --git a/src/GHistogram.js b/src/GHistogram.js index 2368743..20d46f7 100644 --- a/src/GHistogram.js +++ b/src/GHistogram.js @@ -285,7 +285,7 @@ GHistogram.prototype.setPlotPoints = function(plotPoints) { this.plotPoints[i].set(plotPoints[i]); } - for ( i = this.plotPoints.lengh; i < nPoints; i++) { + for ( i = this.plotPoints.length; i < nPoints; i++) { this.plotPoints[i] = new GPoint(plotPoints[i]); } } diff --git a/src/GLayer.js b/src/GLayer.js index c7d2145..a9821fd 100644 --- a/src/GLayer.js +++ b/src/GLayer.js @@ -608,7 +608,7 @@ GLayer.prototype.drawLines = function() { }; GLayer.prototype.drawLine = function() { - var point1, point2, lc, lw, slope, ycut; + var point1, point2, lc, lw, slope, yCut; if (arguments.length === 4 && arguments[0] instanceof GPoint) { point1 = arguments[0]; @@ -617,7 +617,7 @@ GLayer.prototype.drawLine = function() { lw = arguments[3]; } else if (arguments.length === 4) { slope = arguments[0]; - ycut = arguments[1]; + yCut = arguments[1]; lc = arguments[2]; lw = arguments[3]; } else if (arguments.length === 2 && arguments[0] instanceof GPoint) { @@ -627,7 +627,7 @@ GLayer.prototype.drawLine = function() { lw = this.lineWidth; } else if (arguments.length === 2) { slope = arguments[0]; - ycut = arguments[1]; + yCut = arguments[1]; lc = this.lineColor; lw = this.lineWidth; } else { @@ -1465,7 +1465,7 @@ GLayer.prototype.setPoint = function() { index = arguments[0]; x = arguments[1]; y = arguments[2]; - label = (index < nPoins) ? this.points[index].getLabel() : ""; + label = (index < nPoints) ? this.points[index].getLabel() : ""; } else if (arguments.length === 2) { index = arguments[0]; x = arguments[1].getX(); diff --git a/src/GPlot.js b/src/GPlot.js index 792dc4e..92ffafc 100644 --- a/src/GPlot.js +++ b/src/GPlot.js @@ -571,7 +571,7 @@ GPlot.prototype.centerAndZoom = function(factor, xValue, yValue) { this.xAxis.setLim(this.xLim); this.topAxis.setLim(this.xLim); this.yAxis.setLim(this.yLim); - this.rightAxis.setLim(yLim); + this.rightAxis.setLim(this.yLim); // Update the plot limits (the layers, because the limits are fixed) this.updateLimits(); @@ -925,8 +925,7 @@ GPlot.prototype.drawLegend = function(text, xRelativePos, yRelativePos) { } else { this.parent.fill(this.layerList[i - 1].getLineColor()); this.parent.rect(plotPosition[0], plotPosition[1], rectSize, rectSize); - this.layerList[i - i].drawAnnotation(text[i], position[0], position[1], this.parent.LEFT, - this.parent.CENTER); + this.layerList[i - i].drawAnnotation(text[i], position[0], position[1], this.parent.LEFT, this.parent.CENTER); } } @@ -1475,19 +1474,19 @@ GPlot.prototype.setVerticalAxesTicks = function(ticks) { }; GPlot.prototype.setFontName = function(fontName) { - this.maniLayer.setFontName(fontName); + this.mainLayer.setFontName(fontName); }; GPlot.prototype.setFontColor = function(fontColor) { - this.maniLayer.setFontColor(fontColor); + this.mainLayer.setFontColor(fontColor); }; GPlot.prototype.setFontSize = function(fontSize) { - this.maniLayer.setFontSize(fontSize); + this.mainLayer.setFontSize(fontSize); }; GPlot.prototype.setFontProperties = function(fontName, fontColor, fontSize) { - this.maniLayer.setFontProperties(fontName, fontColor, fontSize); + this.mainLayer.setFontProperties(fontName, fontColor, fontSize); }; GPlot.prototype.setAllFontProperties = function(fontName, fontColor, fontSize) { @@ -1499,7 +1498,7 @@ GPlot.prototype.setAllFontProperties = function(fontName, fontColor, fontSize) { this.mainLayer.setAllFontProperties(fontName, fontColor, fontSize); - for (var i = 0; i < layerList.length; i++) { + for (var i = 0; i < this.layerList.length; i++) { this.layerList[i].setAllFontProperties(fontName, fontColor, fontSize); } };