Leverage react component/editor for interactive code generation
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- R
- Sterne
- 2.7k
- Forks
- 641
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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,
...
)
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, das verlinkte react-chart-editor-Projekt und die R-Beispiele in diesem Issue zu lesen, insbesondere den vorgeschlagenen Ablauf mit layout_edit() und add_annotations(). Das Issue nennt keine Repository-Dateien, Tests oder Akzeptanzkriterien; für den Abschluss müsste man sich auf eine fokussierte GUI einigen, den übergeordneten R-Code bewahren und festlegen, wie generierte Änderungen validiert werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, r, react
- Bereich
- data-visualization, frontend
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100