presagia-analytics / ctrialsgov

Query Data from ClinicalTrials.gov
https://presagia-analytics.github.io/ctrialsgov/
Other
13 stars 3 forks source link

Plotly Timeline Display Issue #21

Open MDAZbuild opened 1 year ago

MDAZbuild commented 1 year ago

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 commented 1 year ago

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

MDAZbuild commented 1 year ago

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 commented 1 year ago

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

MDAZbuild commented 1 year ago

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

kaneplusplus commented 1 year ago

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