Only build scale and calculate x,y values once on init and fix linting.

Building of scale and calculating x,y values for each point was done after each added datasetObject, causing a quadratic complexity. Improves initialization performance and fixes linting.