I am looking for a way to create a line graph where my x axis is a discrete set of sequential values and my y axis is some metric. Suppose I have the following SQL query to pull Jenkins build numbers, the amount of time the build took, and the time the build ended:
SELECT
jj_name as job,
jb_number as metric,
TIME_TO_SEC(timediff(jb_end_time, jb_start_time)) as value,
unix_timestamp(jb_end_time) as time_sec
from jenkins_job join jenkins_build on jj_id = jb_jj_id;
Sample mock data:
Job Build Time End Date
Job1 578 234 9/28/2017 14:56
Job1 577 222 9/28/2017 14:52
Job1 576 219 9/28/2017 14:47
Job1 575 460 9/28/2017 14:41
Job1 574 229 9/28/2017 14:28
Job1 573 240 9/28/2017 14:01
Job1 572 246 9/28/2017 13:08
Job1 571 246 9/28/2017 12:22
Job1 570 249 9/28/2017 11:31
Job1 569 220 9/28/2017 11:17
Job2 578 234 9/28/2017 14:56
Job2 577 222 9/28/2017 14:52
Job2 576 1219 9/28/2017 14:47
Job2 575 1220 9/28/2017 14:41
Job2 574 229 9/28/2017 14:28
Job2 573 540 9/28/2017 14:01
Job2 572 646 9/28/2017 13:08
Job2 571 746 9/28/2017 12:22
Job2 570 349 9/28/2017 11:31
Job2 569 420 9/28/2017 11:17
Now I can “cheat” by changing the x axis to series to make each build number appear to be a separate series:
The problem is I want to be able to have multiple builds specified on the same graph as a line graph (assume for now they have correlated build numbers i.e. always run together). Each series would be a separate job. In excel it would look something like this:
Is something like this possible? It does not appear so. Basically I want to still use a line graph while having my x axis be something other than time.