startPadAngle and endPadAngle

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript
Lĩnh vực
data-visualization

Hướng nghiên cứu

Read src/arc.js and trace how padAngle affects the arc geometry. The issue proposes separate start and end padding, defaulting to the existing padAngle, but notes that the geometry requires mathematical work. Done means the new parameters support independent values and preserve the stated default behavior.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Dear All,

I would like to implement two optional parameters for the function arc().

At the moment arc().padAngle(x) create a symetric padding on each side of the arc sector. I have posted on d3 slack about my issue and I think it would be worth implement a solution at the source level. (notice the last comment on this stakOverflow post that bumped into the same problem).

Basically, I would like to modify the arc.js of d3-shape to be able to specify something like :

const arc = d3.arc()
    .innerRadius(0)
    .outerRadius(100)
    .startAngle(0)
    .endAngle(Math.PI / 2)
    .startPadAngle(0.03)
    .endPadAngle(0)

by default startPadAngle and endPadAngle should be equal to padAngle if not specified.

I have been giving a quick try in the source code here for exemple, but I don't understand all the mathematics... any help ?

Thanks!

Ngôn ngữ chính
JavaScript
Star
2.5k
Fork
307
Merge trung bình
4 giờ 16 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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.

Issue khác của d3/d3-shape

Tất cả issue của d3/d3-shape

Issue tương tự

Thêm issue về JavaScript

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.