enable tonexty without fallback to tozeroy
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 18.3k
- Fork
- 2k
- Merge trung bình
- 2 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 28
Mô tả
In our use case, we are plotting quantiles of a data set, with lower and upper bound as well as the median. For convenience, we need to fill in the area between the upper and lower bound shown.
The way we have solved this is by setting fill_type=tonexty on all traces and fill_color=gray on the top four traces, but fill_color=None on the bottom trace.
It looks like this:

The problem is if a user disables the bottom trace, the tonexty fill of the second-to-last trace falls back to tozeroy:

This makes no sense in our case. The expected/intended behavior is:

We have tried/considered several methods:
- Creating a stackgroup; this does allow a fill 'inside' the group only, but requires the trace values to be stacked, which they fundamentally aren't; hiding a trace in that case moves the traces above, which is incorrect.
- Disabling the trace toggle; this hides the problem of course, but it also disables a useful feature
- Dynamically changing the
fill_colors when a trace is hidden; this might work, but I can't find an event to hook into, and since we are using Dash, doing this kind of hacking between Python and clientside callbacks is nontrivial at best.
The best solution would be a fill_type that fills to next but falls back to no fill.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện ví dụ quantile-trace được mô tả trong issue và kiểm tra cách fill_type=tonexty hoạt động khi trace liền trước bị ẩn. Xem lại hành vi fill hiện có của Plotly.js và xác định cách biểu diễn fallback không fill; được xem là hoàn tất khi trường hợp trace bị ẩn vẫn giữ nguyên vùng giữa các biên còn lại mà không chuyển sang tozeroy.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- data-visualization
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100