-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Implement different data-based autorange mode #928
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
Comments
This is the intended behaviour at the moment. Can you expand on why this undesirable for your use case? |
I'm showing the data for specified time range selected by user. On Pan event (or Zoom) I load the data for the new interval. The data is continuous time series stored in historian database for several years so user can pan backwards to see older data. |
... and what's wrong with the current |
I guess you're looking for some autorange padding setting? |
Exactly, I would use padding=0 for my case |
When all traces have |
Great. I'll change this issue title accordingly. This issue is somewhat related to #387 |
Any progress on this? It's a bit of a waste to have padding that could be used for actual data at both ends of the chart when markers are used. |
I'm looking for the opposite - only some scatter traces seem to have the padding but bar traces or filled-area traces don't. So if we have two or more types of traces in a plot, toggling one on or off affects the axis range. (In my specific example, I have a marker+lines scatter trace and bar trace. If I toggle off the scatter, then the bar trace "extends" to occupy the full x-axis). |
This issue has been tagged with A community PR for this feature would certainly be welcome, but our experience is deeper features like this are difficult to complete without the Plotly maintainers leading the effort. What Sponsorship includes:
Please include the link to this issue when contacting us to discuss. |
Not sure if this helps you guys, but here is an example of removing the padding on the X-Axis for line+scatter charts. https://jsfiddle.net/amroczeK90/waj25yc8/3/ Setting the range on the X-Axis did the trick. xaxis: { range: [data[0]["x"][0], data[0]["x"][data[0]["x"].length-1]] } Also make sure you haven't set "autorange" to true. |
FYI: I just discovered that adding I changed the fiddle form above accordingly: https://jsfiddle.net/zv6kuh1f/ |
@ajafff good observation but seems not suitable for all cases. I tried it from Python and it enforces the chart to extend down to the zero line (since Edit: Changing yaxes range fixed it for me. |
Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson |
Scatter graph with traces using autorange on x-axis has left and right gap if any of the traces has
markers
flag set ontrace.mode
.If
mode='lines'
for all traces, the leftmost trace points are displayed on the leftmost point of X-axis, but if themode
is changed to e.g.lines+markers
, there is a gap from the left and from the right. This visualization looks strange for time series data - it looks like there are no data point within the gaps..See sample, change the
traceX.mode
tolines
to see the difference.The text was updated successfully, but these errors were encountered: