diff --git a/src/Axis.jsx b/src/Axis.jsx index 9de3706..4fd4b13 100644 --- a/src/Axis.jsx +++ b/src/Axis.jsx @@ -104,9 +104,9 @@ class YAxis extends React.Component { } if (this.props.yTitle) { - let rotation = "rotate(-90,30,"+String(this.props.y+this.props.height/2)+")" + let rotation = "rotate(-90,15,"+String(this.props.y+this.props.height/2)+")" yAxis.push( - {this.props.yTitle} @@ -116,7 +116,7 @@ class YAxis extends React.Component { let ySpace = this.props.height / (this.props.ySteps - 1) - for (var i=0; i < this.props.ySteps; i++) { + for (var i=0; i < this.props.ySteps - 1; i++) { let tickPos = this.props.height+this.props.y-i*ySpace let yVal = 0