diff --git a/Plotter.js b/Plotter.js index c17556477..ff1bf1368 100644 --- a/Plotter.js +++ b/Plotter.js @@ -570,23 +570,23 @@ function newPlotter () { let x = 0 let y = 0 eval(point.pointFormula.code) - let dataPoint = { + let rawPoint = { x: x, y: y } - /* Contributing to Auto-Scale */ - coordinateSystem.reportYValue(dataPoint.y) /* The information we store in files is independent from the charing system and its coordinate systems. That means that the first thing we allways need to do is to trasform these points to the coordinate system of the timeline. */ - dataPoint = coordinateSystem.transformThisPoint(dataPoint) + let dataPoint + dataPoint = coordinateSystem.transformThisPoint(rawPoint) dataPoint = transformThisPoint(dataPoint, thisObject.container) dataPoint = canvas.chartingSpace.viewport.fitIntoVisibleArea(dataPoint) dataPoint = thisObject.fitFunction(dataPoint) /* Store the data point at the local map */ + dataPoint.rawPoint = rawPoint dataPoints.set(point.id, dataPoint) } } @@ -730,6 +730,12 @@ function newPlotter () { console.log('[WARN] You have a Polygon Vertex not referencing any Point.') continue } + + /* Contributing to Auto-Scale */ + if (dataPointObject.rawPoint.y > 1 && dataPointObject.rawPoint.y !== undefined && isNaN(dataPointObject.rawPoint.y) === false) { + coordinateSystem.reportYValue(dataPointObject.rawPoint.y) + } + let dataPoint = { x: dataPointObject.x, y: dataPointObject.y