Table Unable to Become Invisible with 'updatemenus' Buttons
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ả
I love plotly.js, such a fantastic library. I have very little javascript knowledge and yet have accomplished quite a lot. Unfortunately, I have run into a problem with the layout/updatemenus buttons. I am trying to create a set of buttons that would allow a user to switch from a "Chart" mode to a "Table" mode. When the user clicks "Table", it successfully displays the table, as you can see from the included codepen. Unfortunately, once the table is set to visible, it will never leave the screen, no matter what you select. The table continues to obscure the chart after you select "Chart".
https://codepen.io/rar83/pen/OJVvXWW
If this is indeed a bug, could someone possibly point out an alternative way of doing this? Or it is quite possible I am just using the plotly.js badly.
I have included a portion of the relevant code to show how I am turning on/off visibility, just as the documentation shows.
var updatemenus=[
{
buttons: [
{
args: [{'visible': [true, true, true, true, false]},{'xaxis.visible': true, 'yaxis.visible': true, 'autosize': true}],
label: 'Chart',
method: 'update'
},
{
args: [{'visible': [false, false, false, false, true]},{'xaxis.visible': false, 'yaxis.visible': false, 'autosize': false, 'width': 500}],
label: 'Table',
method:'update'
}
],
direction: 'left',
pad: {'r': 5, 't': 5},
showactive: true,
type: 'buttons',
x: 0.01,
xanchor: 'left',
y: 1.1,
yanchor: 'middle',
font: {size: '30'}
}
]
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 với CodePen được liên kết và cấu hình layout/updatemenus được cung cấp; theo dõi các lệnh gọi method: 'update' và các mảng visible tương ứng cho các nút Chart và Table. Tái hiện cả hai chuyển tiếp và xác nhận rằng việc chọn Chart sẽ xóa bảng và khôi phục bố cục biểu đồ.
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, frontend
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- 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