Trouble rendering Google Charts with PocketQuery

I'd like to create a Google Gantt chart, using PocketQuery, to illustrate JIRA version durations. However, I've had no success. Are Gantt charts supported in PocketQuery?

As an alternative, I've created the charts using Timelines, but I've run into issues here, as well. I seem to be having problems with the date format. The only query, which has resulted in a successful rendering, returns the date as seconds since year 0, e.g. 

SELECT vname, to_seconds(startdate), to_seconds(releasedate)
FROM projectversion

This is fine, other than the x-axis showing hours of the day, rather than date. What date formats are acceptable? When not using seconds, I receive an error which states "date, number, or datetime" must be used, but converting startdate and releasedate to the date format doesn't work either. 

1 answer

1 accepted

1 vote
Accepted answer

Hi Drew,

Thank you for your interest in PocketQuery! I just checked this and sadly, I found that Gantt charts are currently not usable with the PocketQuery JS API. I will provide a fix for that in the next version.

You should be able to use the Timeline chart type for your example. But you'll have to work a little with the PQ JS API to make it work. I reproduced your issue locally and I found this to work fine for me...


SELECT vname, startdate, releasedate FROM projectversion;


(function() {
  var result = PocketQuery.queryArray();
  var dataTable = [['Column1', 'Column2', 'Column3']];
  jQuery.each(result, function(index, row) {
    dataTable.push([row.vname, new Date(row.startdate), new Date(row.releasedate)]);
  PocketQuery.chart('Timeline', {
    dataTable: dataTable

Does this work for you?

Regards, Felix (Scandio)

That worked. Thanks!

Glad to hear that! If you like PocketQuery, would you consider leaving a review at the marketplace? :)

Thanks a lot for the really awesome review, Drew!!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 07, 2019 in Marketplace Apps

A Timeless Love Story

It started as any story starts, on a normal, rainy day.   Admin meets App, and her name was Klok2, and like any first relationship we were both trying to make it work but neither one knew what...

457 views 8 27
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you