Issue with PocketQuery Templating with Google Charts

I'm having some issues with adding a tooltip to a Google Line Chart.  Here's what I have setup:


select date Date,  total  Total, 'example tooltip' from table


2014-05-01	255	example tooltip
2014-06-01	1232	example tooltip
2014-07-01	1981	example tooltip

Pocket Query Template:

PocketQuery.chart('LineChart', {
 displayMode: 'text',
 pointSize: '3',
data.addColumn({type: 'string', role: 'tooltip'});

The issue is, the pocketquery results are blank.  I also don't see anything in the preview stack trace.  


Any ideas what I'm doing wrong?


3 answers

1 accepted

This widget could not be displayed.

Hi Chris,

please check out version 2.0.1 from the marketplace. There is now a callback JS function beforeDraw in the chart method that you can use to manipulate the dataTable object before the chart is drawn.

Example query:

SELECT Name, LifeExpectancy, GovernmentForm
FROM Country
WHERE LifeExpectancy IS NOT NULL
AND Continent = :Continent
AND Population > :MinPopulation

Example template:

PocketQuery.chart('BarChart', {
	showTip: true,
	beforeDraw: function(dataTable, options) {
		dataTable.setColumnProperty(2, 'role', 'tooltip');

The setColumnProperty call says "please make my column 2 the tooltip" (starting with 0). So in my query, the column "GovernmentForm" will become the tooltip.

Let me know if this helps!

Regards, Felix (Scandio)

This widget could not be displayed.

Hi Chris! Just wanted to let you know I've seen this. It's actually not that straight-forward. I'll let you know about a solution during the next days. I'm interested in this very much myself ;)

This widget could not be displayed.


Thanks!  That worked perfectly.  I really appreciate the help and the upgrade to 2.x.



Hi Chris! Thanks for the feedback! Would you mind to contribute to the PocketQuery community and mark my answer as accepted? And would you mind leaving a review for PocketQuery at the marketplace?

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

509 views 7 6
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