plotly / plotly/plotly.py

[FEATURE]: Make it possible to base heights of horizontal bars (and widths of vertical bars) on a given variable

Đang mở
#5,720 4 bình luận 0 reaction 1 người được giao Xem trên GitHub

@camdecoster đang làm issue này rồi.

Từ ngày 15/9/2026.

enhancement feature P3 size: 5
Ngôn ngữ chính
Python
Star
18.8k
Fork
2.8k
Merge trung bình
16 giờ 26 phút
Pull request đã merge (30 ngày)
21

Mô tả

Description

I would love to make it possible to easily vary the width of vertical bars, or the height of horizontal bars, within a bar chart, to reflect a certain variable (such as the sample size on which that bar is based).

Why should this feature be added?

This would make it easier to visually represent an additional data point (e.g. sample size, monthly revenue, etc.), thus allowing viewers to get more context about a bar.

For example, suppose that you're showing the percentage of individuals in five political parties that support or oppose a certain measure. However, some of these parties have only a small amount of respondents. Varying the thickness of these bars by your sample size would make it clearer that some of your data points are based on a relatively small sample.

Mocks/Designs

Here is an example of what a variable-height horizontal bar chart would look like. (I created this using go.Bar() rather than px.bar(), but this involved a decent amount of additional code, including a custom legend. Being able to customize these heights via a 'bar_width' or 'bar_height' argument within px.bar would be terrific.

Image

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.