-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Faster axis autorange relayout #2546
Comments
Swapping plotly.js/test/jasmine/tests/click_test.js Lines 754 to 789 in 0de19be
By this old little test was enough to highlight a pretty important problem with this approach and 'calcIfAutorange' edits - which has the name suggests leads to a For example, scatter Plotly.newPlot(gd, [{
y: [1, 2, 1]
}], {
xaxis: {range: [0, 2]},
yaxis: {range: [0, 2]}
})
// then
Plotly.restyle(gd, 'marker.size', 30)
// then
Plotly.relayout(gd, {
'xaxis.autorange': true,
'yaxis.autorange': true
})
// then
gd.layout.xaxis.range
// (on master) => [-0.18848653667595172, 2.188486536675952]
// (with editType: 'plot' autorange) => [0, 2]
// i.e. the autorange change doesn't get picked up! There are a few ways to solve the problem:
Personally, I think speeding up double-click and legend |
Oh and here are some benchmarks for Scatter at 1e4 pts:
Scattergl at 1e5-1 pts (the worse case before the "mean(marker.size)" approximation):
Scattergl at 1e6 pts:
All in all, I think skipping |
A follow-up on #2527 where I first noticed:
and @alexcjohnson replied:
Getting this right will improve double-click axis autorange performance and play an important role in #2358 (faster
extendTraces
) and other autorange-related improvements (e.g. #387)The text was updated successfully, but these errors were encountered: