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
Posted Monday in Confluence

Organizing your space just got easier - Page Tree Drag & Drop is here

Hi Community! I’m Elaine, Confluence Product Manager. You may have read my earlier post about page tree in space navigation sidebar. I'm excited to share another improvement that helps you organize ...

120 views 3 4
Join discussion

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