I'm new to R and would like to create a Gantt-style diagram where I can see how long jobs on a SQL Server run over the week. So my y-axis would be filled with job names and my x-axis has a (in and out zoom-able) scale with Weekdays, hours, minutes and seconds.
My dataset can still be configured. I can transform the start and end times to every format since I have them as DateTimes.
This is how the data looks like:
structure(list(JobName = structure(c(1L, 1L, 1L, 2L, 2L), .Label = c("ATLAS_Admin_DeployClientDatabase", "ATLAS_Admin_ParseMasterCubeDatabase"), class = "factor"), RunDateTime = structure(c(1L,3L, 5L, 2L, 4L), .Label = c("2016-11-10T15:39:36.0000000", "2016-11-16T11:30:20.0000000","2016-11-16T11:37:25.0000000", "2016-11-16T15:51:56.0000000","2016-11-16T15:52:59.0000000"), class = "factor"), StartWeekday = structure(c(1L,2L, 2L, 2L, 2L), .Label = c("Thursday", "Wednesday"), class = "factor"), StartTime = structure(c(3L, 2L, 5L, 1L, 4L), .Label = c("1899-12-30T11:30:20.0000000", "1899-12-30T11:37:25.0000000", "1899-12-30T15:39:36.0000000", "1899-12-30T15:51:56.0000000", "1899-12-30T15:52:59.0000000" ), class = "factor"), EndRunDateTime = structure(c(1L, 3L, 5L, 2L, 4L), .Label = c("2016-11-10T16:02:39.0000000", "2016-11-16T11:31:24.0000000", "2016-11-16T12:03:10.0000000", "2016-11-16T15:52:57.0000000", "2016-11-16T16:19:06.0000000"), class = "factor"), EndWeekday = structure(c(1L, 2L, 2L, 2L, 2L), .Label = c("Thursday", "Wednesday"), class = "factor"), EndTime = structure(c(4L, 2L, 5L, 1L, 3L), .Label = c("1899-12-30T11:31:24.0000000", "1899-12-30T12:03:10.0000000", "1899-12-30T15:52:57.0000000", "1899-12-30T16:02:39.0000000", "1899-12-30T16:19:06.0000000" ), class = "factor")), .Names = c("JobName", "RunDateTime","StartWeekday", "StartTime", "EndRunDateTime", "EndWeekday","EndTime"), row.names = c(NA, 5L), class = "data.frame")
The names are linked over the JobID.
In the end it should look like this: Gantt-Diagram with weekdays/times instead of dates
I'm not limited to any library, yet ggplot is already installed.