playground icon indicating copy to clipboard operation
playground copied to clipboard

Fix data point locations in data thumbnails

Open aboggust opened this issue 7 years ago • 1 comments

The dataset thumbnails were upside down because the thumbnail canvas' coordinate system moves positively from top to bottom whereas the data point coordinates move negatively from top to bottom. To convert data point coordinates to canvas coordinates the y-coordinate must be negated.

aboggust avatar Dec 03 '18 23:12 aboggust

Note that this same bug was incorrectly addressed in #85.

Example: data point (0,0) maps to (50,50) My function: y = h*(-d.y + 6)/12 = 50 #85 function: y = h - h * (d.y + 6) / 12 - 4 = 46

aboggust avatar Dec 04 '18 00:12 aboggust