Letractively / flot

Automatically exported from code.google.com/p/flot
MIT License
0 stars 0 forks source link

Clone data before manipulate (before setData(data_)) #640

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
While you have hooks to manipulate with series data, I think better to clone it 
first to not touch the real input series data in the main function Plot(...):
-- setData(data_);
++ var dataClone = $.extend(true, [], data_);
++ setData(dataClone);

And if some plugin changes data in any series, the real input data will not 
change.

Original issue reported on code.google.com by milke...@gmail.com on 25 Nov 2011 at 1:09

GoogleCodeExporter commented 9 years ago
sorry, found you clone data in parseData function, can be closed )

Original comment by milke...@gmail.com on 25 Nov 2011 at 1:21

GoogleCodeExporter commented 9 years ago

Original comment by dnsch...@gmail.com on 1 May 2012 at 8:29