Fill chart series in python
QML doesn't have a method for replacing all points at once, which makes it extremely slow when loading large profiles
This commit is contained in:
@ -29,13 +29,8 @@ ApplicationWindow {
|
||||
}
|
||||
|
||||
function onProfileChanged(data) {
|
||||
profileSeries.clear();
|
||||
var last_x = 0;
|
||||
for (var point of data) {
|
||||
profileSeries.append(point[0], point[1]);
|
||||
last_x = point[0];
|
||||
}
|
||||
axisX.max = last_x;
|
||||
profile_handler.fill_series(profileSeries);
|
||||
axisX.max = data[data.length - 1][0];
|
||||
axisX.applyNiceNumbers();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user