Unable to see x axis labels completely
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- r
- Lĩnh vực
- data-visualization
Hướng nghiên cứu
Tái hiện báo cáo bằng ví dụ renderPlotly được cung cấp, tập trung vào ggplotly(plot1) và các thiết lập xaxis của layout. Kiểm tra cách scale_x_date(date_breaks = "1 month") và dynamicTicks ảnh hưởng đến các nhãn trục x được hiển thị. Được xem là hoàn tất khi các nhãn tháng dự kiến hiển thị ở mức thu phóng bình thường và biểu đồ tương tác vẫn sử dụng được.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
)
)
})`
- Ngôn ngữ chính
- R
- Star
- 2.7k
- Fork
- 641
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của plotly/plotly.R
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
-
Data gets dropped in add_trace and consequently points have the wrong color if NA is present Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
-
save_image Error Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
Tất cả issue của plotly/plotly.R
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
pharmaverse/rtables#1123 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Trying to reassign a reactiveVal to the name of an existing reactiveVal doesn't overwrite the latter Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
RConsortium/rconsortium_website#649 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
posit-dev/r-shinylive#203 ·