Leverage react component/editor for interactive code generation
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- R
- Star
- 2.7k
- Fork
- 641
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Programmatically placing annotations/shapes/images etc is difficult. Ideally we'd have some sort of GUI to assist in generating the relevant code. Plotly cloud does offer a solution, but there are two main issues:
- Code generation works on the JSON-level, meaning any high-level R code gets lost.
- The UI is complex -- it tries to do everything plotly.js can do without making common things easy.
https://github.com/plotly/react-chart-editor was recently open-sourced and could provide infrastructure for generating "focused" and locally-rendered GUIs that could help you generate code for these use-cases. For example, something like:
library(plotly)
qplot(1:10) %>%
ggplotly() %>%
layout_edit("annotations")
Could pop-up a shiny gadget wrapper around the react editor specifically for adding and/or editing existing annotation(s). It seems likely that we could retain the high-level (input) code and add the relevant code necessary to recreate the manual edits:
qplot(1:10) %>%
ggplotly() %>%
add_annotations(
text = "My label",
x = 0,
y = 1,
...
)
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 đọc dự án react-chart-editor được liên kết và các ví dụ R trong issue này, đặc biệt là quy trình layout_edit() và add_annotations() được đề xuất. Issue không nêu tên các tệp trong repository, các bài kiểm thử hoặc tiêu chí chấp nhận; để hoàn thành, cần thống nhất về một GUI tập trung, giữ nguyên mã R cấp cao và xác định cách xác thực các chỉnh sửa được tạo ra.
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, r, react
- Lĩnh vực
- data-visualization, frontend
- 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
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100