Is it possible to transform y-scale data using a JavaScript function as an argument?