Incorrect warning in `layout()` when using `bargroupgap`
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- R
- Sterne
- 2.7k
- Forks
- 641
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
When using the bargroupgap argument, the following waring is thrown:
Warning message:
'layout' objects don't have these attributes: 'bargroupgap'
Valid attributes include: ...
However the attribute clearly exists and works
library(ggplot2)
library(plotly)
test <- tibble::tibble(
A = c(1,2,3),
B = c(3,2,1),
C = c(4,1,4)
)
plot_ly(
test,
y = ~A,
type = 'bar',
name = 'Option A',
marker = list(
color = '#4E0F53'
)
) |>
add_trace(
y = ~B,
name = 'Option B',
marker = list(
color = '#DC9542'
)
) |>
add_trace(
y = ~C,
name = 'Option C',
marker = list(
color = '#a8aaad'
)
) |>
layout(
barmode = 'group',
bargroupgap = 0.1
)
plot_ly(
test,
y = ~A,
type = 'bar',
name = 'Option A',
marker = list(
color = '#4E0F53'
)
) |>
add_trace(
y = ~B,
name = 'Option B',
marker = list(
color = '#DC9542'
)
) |>
add_trace(
y = ~C,
name = 'Option C',
marker = list(
color = '#a8aaad'
)
) |>
layout(
barmode = 'group'
)
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
Führen Sie zunächst das reproduzierbare R-Beispiel im Issue aus und prüfen Sie, wie layout() Attribute validiert, wobei Sie sich darauf konzentrieren, warum bargroupgap abgelehnt wird, obwohl es funktioniert. Erledigt ist die Aufgabe, wenn das Beispiel nicht mehr die Warnung wegen eines ungültigen Attributs ausgibt und das Verhalten beim Abstand gruppierter Balken erhalten bleibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- r
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100