Autoexpand does not work for axes
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ả
Seems like autoexpand does not work (or I do something wrong). In the example below, I increased y axis tick label size and font size, so they consume much more space, but margins are not adjusted, and labels are partially hidden outside of the chart container.
Reproduction
https://codepen.io/shadow-identity/pen/abeQprO
This is slightly modified example from the documentation: https://plotly.com/javascript/line-and-scatter/#line-and-scatter-plot
What is modified:
- y axis tick values increased to have more symbols
- y axis tick font size increased
- I also tested it with explicitly set
margin: {autoexpand: true}, but it does not change anything
Expected results
Grid size should be reduced (margin should be added to the left) to keep y axis ticks visible
Actual results
Y axis ticks are partially hidden
Environment
Chrome 130, Firefox 133 beta
Plotly from https://cdn.plot.ly/plotly-2.35.2.min.js
Additional info
At the same time, legend seems to increase corresponding margin. I increased the name length of one of the series to check if it will expand the margin, and it works.
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 bản tái hiện trên CodePen và so sánh với ví dụ biểu đồ đường và phân tán được liên kết trong tài liệu Plotly bằng Plotly 2.35.2. Kiểm tra lý do các nhãn vạch trên trục y được phóng to không kích hoạt việc mở rộng lề trái, trong khi chú giải dài hơn lại có; được coi là hoàn tất khi các nhãn trục y vẫn hiển thị đầy đủ mà không cần đặt lề thủ công.
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
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 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
- 42/100