Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Unable to see x axis labels completely

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

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
30/100
Issue-Typ
Bug
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
r

Rechercherichtung

Reproduziere den Bericht anhand des bereitgestellten renderPlotly-Beispiels und konzentriere dich dabei auf ggplotly(plot1) und die xaxis-Einstellungen von layout. Überprüfe, wie scale_x_date(date_breaks = "1 month") und dynamicTicks die gerenderten Beschriftungen der x-Achse beeinflussen. Als erledigt gilt die Aufgabe, wenn die vorgesehenen Monatsbeschriftungen bei normaler Zoomstufe sichtbar sind und das interaktive Diagramm weiterhin nutzbar ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Unable to show all the months , Its skipping one month after the other, the months are present but not visible until you zoom in.
What needs to be done here

Capture

` output$TP1 <- renderPlotly({
df_plot <- filtered_data()

# Ensure the 'date' column is of Date type
df_plot$date <- as.Date(df_plot$date)

# Set font size
base_size <- 15

# Custom label function to split month and year onto separate lines
library(scales)
custom_date_label <- function(x) {
  format(x, "%b\n%Y")
}

# Plot 1: Month vs Interest Coverage Ratio
plot1 <- ggplot(df_plot, aes(x = date, y = interest_coverage_ratio_ttm, group = 1)) +
  geom_line(color = "red", size = 1) +
  labs(title = "Month vs Interest Coverage Ratio", x = "Date", y = "Interest Coverage Ratio") +
  theme_minimal(base_size = base_size) +
  theme(
    axis.text.x = element_text(size = 8, angle = 0, hjust = 0.5),  # Reduce size of x-axis labels
    panel.spacing = unit(2, "lines")
  ) +
  scale_x_date(labels = custom_date_label, date_breaks = "1 month")  # Custom label formatting

# Convert ggplot objects to plotly objects for interactive tooltips
ggplotly(plot1, dynamicTicks = TRUE) %>%
  layout(
    xaxis = list(
      tickformat = "%b\n%Y"  # Format the tooltips as month and year on separate lines
    )
  )

})`

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus plotly/plotly.R

Alle Issues in plotly/plotly.R

Ähnliche Issues

Weitere Issues zu R

Neue Issues direkt in Ihr Postfach

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