plotly / plotly/plotly.R

Geometry does not show when using ggplotly function to convert ggplot plot

Offen
#2,303 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
R
Sterne
2.7k
Forks
641
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Geometry does not show when using ggplotly function to convert ggplot plot, but if I hover over where the geometry is supposed to be, a hover box shows. The following warning is also displayed. If this is not related to this warning, please let me know and I'll submit the question on Stack Overflow:

Warning message:
In geom2trace.default(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]]) :
geom_GeomLabel() has yet to be implemented in plotly.
If you'd like to see this geom implemented,
Please open an issue with your example code at
https://github.com/ropensci/plotly/issues

ganttplot <- ganttrify::ganttrify(
  plot,
  spots = plot,
  by_date = TRUE,
  exact_date = TRUE,
  colour_palette = RColorBrewer::brewer.pal(8,"Set2"),
  mark_years = TRUE,
  hide_wp = TRUE,
  month_number_label = FALSE,
  month_date_label = TRUE,
  x_axis_position = "bottom",
  spot_fill = NA,
  spot_size_text_relative = .8,
  spot_fontface = "plain",
  spot_border = NA,
) +
  ggplot2::labs(title = "Test Plot")

ganttplot

plotly::ggplotly(ganttplot)

![ggplot](https://github.com/plotly/plotly.R/assets/77899397/581fbd74-57a9-4aca-8a32-78431bd5ac7e)
![plotly](https://github.com/plotly/plotly.R/assets/77899397/cb319701-b9d4-4dab-aca4-8fb2264203cd)
[sample_data.csv](https://github.com/plotly/plotly.R/files/12896318/sample_data.csv)


Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, das bereitgestellte R-Beispiel mit ggplotly zu reproduzieren, und untersuche die geom2trace.default-Warnung zu geom_GeomLabel(). Ermittle, wie die fehlende Geometrie während der Konvertierung dargestellt wird; abgeschlossen ist die Aufgabe, wenn die Geometrie im konvertierten Plot gerendert wird und die Warnung nicht mehr zutrifft.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
r
Bereich
data-visualization
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.