diff --git a/plot/graph/graph.view.ts b/plot/graph/graph.view.ts index d775db1cad7..fda0ba1b3e7 100644 --- a/plot/graph/graph.view.ts +++ b/plot/graph/graph.view.ts @@ -55,19 +55,12 @@ namespace $.$$ { const series_x = this.series_x() const series_y = this.series_y() for(let i = 0; i < series_x.length; i++) { - if( series_x[i] > next.x.max ) next.x.max = series_x[i] - if( series_x[i] < next.x.min ) next.x.min = series_x[i] - if( series_y[i] > next.y.max ) next.y.max = series_y[i] - if( series_y[i] < next.y.min ) next.y.min = series_y[i] + if( series_x[i] > next.x.max ) next.x.max = this.repos_x( series_x[i] ) + if( series_x[i] < next.x.min ) next.x.min = this.repos_x( series_x[i] ) + if( series_y[i] > next.y.max ) next.y.max = this.repos_y( series_y[i] ) + if( series_y[i] < next.y.min ) next.y.min = this.repos_y( series_y[i] ) } - next.x.max = this.repos_x( next.x.max ) - next.x.min = this.repos_x( next.x.min ) - if( next.x.max < next.x.min ) next.x = next.x.inversed - next.y.max = this.repos_y( next.y.max ) - next.y.min = this.repos_y( next.y.min ) - if( next.y.max < next.y.min ) next.y = next.y.inversed - return next }