playground
playground copied to clipboard
Fix data point locations in data thumbnails
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.
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