Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plotly Timeline Display Issue #21

Open
MDAZbuild opened this issue May 26, 2023 · 5 comments
Open

Plotly Timeline Display Issue #21

MDAZbuild opened this issue May 26, 2023 · 5 comments

Comments

@MDAZbuild
Copy link

Hello,

When I run ctgov_plot_timeline --> ctgov_to_plotly, the figure that is generated is partially incorrect. The completion dates for a few of the trials extend well beyond the actual completion date. For example, the completion date within the tooltip reads 2025 however, the chart appears as though the trial continues to nearly 2035. Please refer to below screenshot for an example.

image

Any advice to fix?

Thank you!

@kaneplusplus
Copy link
Contributor

Do you have a reproducible example you can provide? It's curious that the date names are not uniform on the left side.

@MDAZbuild
Copy link
Author

MDAZbuild commented May 30, 2023

Thank you for the quick reply, Michael.

Please see below:

PACKAGES

library(ctrialsgov)
library(ggplot2)
library(dplyr)
library(ggthemes)
library(tidyverse)
library(hrbrthemes)
library(plotly)
library(htmlwidgets)

ctgov_load_cache(force_download = FALSE)

breast = ctgov_query(study_type = "Interventional",
sponsor_type = "Industry",
description_kw = c("breast cancer"),
phase = c("Phase 3"),
date_range = c("2021-04-16", "2023-04-16")
)

breast1 = ctgov_plot_timeline(
breast,
start_date = "start_date",
completion_date = "completion_date",
label_column = "sponsor",
tooltip = ctgov_gantt_labeller(breast),
)+
theme_ipsum_es(
axis_text_size =10
)+
theme(legend.position = "none")+
theme(axis.title.y = element_text(size = 2, colour = "#FFFFFF"))+
theme(plot.title = element_text(face = "bold",
margin = margin(10, 0, 10, 0),
size = 14))
theme(
plot.title = element_text(hjust = 0.5,size = 14))

ctgov_to_plotly(breast1)

@kaneplusplus
Copy link
Contributor

Thanks. I'll take a look and respond in the next few days.

@MDAZbuild
Copy link
Author

Hi Michael, were you able to take a look at the example ? Thank you, appreciate the help!

@kaneplusplus
Copy link
Contributor

Ugh, sorry @MDAZbuild. I missed this one. I'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants