Unable to see x axis labels completely
オープン
まだ誰も着手していません。
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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
` 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
)
)
})`
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
提供された renderPlotly の例を使って報告内容を再現し、ggplotly(plot1) と layout の xaxis 設定に焦点を当てます。scale_x_date(date_breaks = "1 month") と dynamicTicks が、描画された x 軸ラベルにどのような影響を与えるかを確認します。通常のズームで意図した月ラベルが表示され、インタラクティブなチャートを引き続き利用できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- r
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 30/100