In case you have a string with a list of floats, you can convert it with this snippet:
var dataList = "2.1, 3.1, -4.5"
var dataListFloats = dataList.match(/[-+]?\d+(?:\.\d+)?/g).map(Number)
This will contain both negative and positive floats within the array.