Can't get the Gantt Chart working

Hi, I'm trying to use the Gantt Chart form Google Charts but can't seem to get it to run.

Based on my investigation, it may be due to some limitations of Google Charts or the specific version you're bundling with Pocket Query (not sure if you're bundling or loading from CDN?)

What version of GChart is included? I'm using Pocket Query 2.1


Here's my current template content:

#set($sprintLenghtInMs = 13 * 24 * 60 * 60 * 1000)
<script type="text/javascript">
	PocketQuery.loadCharts(['gantt'], {
		dataTable: [
		#foreach ($story in $result)
			#set( $Int = 0 )
			#set( $year  = $story.StartDate.substring(0,4) )
			#set( $month = $Int.parseInt( $story.StartDate.substring(5,7).replaceFirst("^0+(?!$)","") ) - 1 )
			#set( $day   = $story.StartDate.substring(8,10).replaceFirst("^0+(?!$)","") )
			["$story.Id", "$story.Title", "$story.Team", new Date($year, $month, $day), null, $sprintLenghtInMs, 100, null]#if($velocityHasNext),#end


And get the following error:

?file=visualization&v=1.0&packages=gantt&async=2:3 Uncaught Error: Module: 'visualization' with package: 'gantt' not found! 


Thanks for your awesome plugin!

1 answer

Hi Julien!

The Gantt Chart is currently the only chart type that is not supported by the PocketQuery API, unfortunately. There is also a note in the docs:

The Gantt chart is in beta and may be undergoing substantial revisions in future Google Charts releases.

You can't use another chart type for your purpose? If not so, there might still be a workaround. If you are good in JS programming, you can use one or more of the methods PocketQuery.queryArray(queryName), PocketQuery.queryObject(queryName), PocketQuery.queryColumns(queryName). These will return your data as JavaScript structures. Using these, you can use the Google Charts API directly as written in their example, without using PocketQuery.chart. But this will require some time experimenting with JS Code, I fear.

Let me know if you need further help!

Regards, Felix (Scandio)

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,035 views 2 13
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