Remove calling update once for each dataset on init. Index from each loop was used as update parameter. Remove unnecessary x and y calculation. Recalculate scale after adding dataset.