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

Fill pattern of bars in gvisTimeline #88

Closed
mubashirqasim opened this issue Jun 8, 2020 · 1 comment
Closed

Fill pattern of bars in gvisTimeline #88

mubashirqasim opened this issue Jun 8, 2020 · 1 comment

Comments

@mubashirqasim
Copy link

hi there,

First of all, Thank you very much for the development of this library. I have been using it for a long time in many of my shiny apps.

This is to ask if it is possible to add some abilities to add more variables in gvisTimeline chart. One way to doing this could be fill patterns in the bars of gvisTimeline chart.

In the following example, for instance, I would like to use different fill patterns for the Course_Type variable.

library(googleVis)

df <- data.frame(Student = structure(c(rep("Allan",5), rep("Joan",5), rep("Kat", 5)), class = "character"),
                 Course = c(LETTERS[1:5], LETTERS[1:5], LETTERS[1:5]), 
                 Start = structure(c(16713,16768,16725,16758,16780,
                                     16714,16754,16765,16729,16785,
                                     16724,16730,16755,16760,16759), class = "Date"), 
                 End = structure(c(16733,16775,16755,16779,16790,
                                   16744,16762,16780,16760,16795,
                                   16744,16750,16758,16784,16798), class = "Date"))

df$Course_Type <- ifelse(df$Course %in% c("A","C","E"), "Compulsory", "Elective")

plot(gvisTimeline(data=df,
                  rowlabel = "Student",
                  barlabel = "Course",
                  start = "Start", end = "End",
                  options=list(width=600, height=1000) ))

Many thanks for your time.

Kind regards,

Mubashir

@mages
Copy link
Owner

mages commented Jun 8, 2020

I don't think this is possible, according to the Google documentation: https://developers.google.com/chart/interactive/docs/gallery/timeline

@mages mages closed this as completed Jun 16, 2020
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