PocketQuery.chart() ouputs c[qe] is not a function

Hi,

I upgraded to the latest version of PocketQuery (1.14.2) and when I visit a page using PocketQuery.chart(), I get the following error:

c[qe] is not a function

The error is displayed inside a red div box.

This is regardless of the options (or lack of) I send to the chart function. There are not additional errors in the Javascript console. I am using Confluence 5.5.6. I had no problems using the charts in 1.13.

Cheers,

6 answers

This widget could not be displayed.

Hi Alexandre!

Thank you for your interest in PocketQuery! I think I need some more information to have a look at this. Could you provide your SQL statement and maybe the rendered content if you use the default template for it?

Regards, Felix [Scandio]

This widget could not be displayed.

Hi Felix,

I don't have access to the machine today, so I'll try to build an example tomorrow. Given that the data is confidential, I was going to build something using : 

https://launchpad.net/test-db/

However, when I ran quick tests, even a simple query (ex: select the_date, sum(ac) from session_data group by the_date) would have a problem.

If it helps, the plugin is an update from 1.13.3. Should we try uninstalling the plugin and re-installing from scratch?

Cheers,

Alex

Thanks! I will try with this sample database and query too. I already have a suspect. Please don't re-install. Nothing has changed from a data/model perspective, so it wouldn't change anything. For now, could you try with a query that doesn't contain any dates?

This widget could not be displayed.

Confirmed, the problem is with the date. The error message disappeared when I changed the date column to :

concat(YEAR(the_date), '-',MONTH(the_date),'-',DAY(the_date)) AS 'Date'

Which is ironic because I upgraded form 1.13 to 1.14 because of problems handling dates smile

 Cheers,

This widget could not be displayed.

Hi Alexandre,

There is now version 1.14.3 at the marketplace. Can you try if this version solves your problem?

Regards, Felix

This widget could not be displayed.

Hi,

Sorry for the delay. Had to switch to other projects.

Yes. It solves the problem. However, I am back to the original problem where the data is formatted as a timestamp and I can't change the format to day/month/year. I'm using the following template.

 

<script>PocketQuery.chart('LineChart', {
 height:500,
 hAxis: {
   direction:-1, 
   slantedText:true,
   slantedTextAngle:85,
   format: 'dd-MMM-yyyy'
 }
});</script>
This widget could not be displayed.

Hi Alexandre!

Please check out my answer here: https://answers.atlassian.com/questions/9875213. I think in general you need to run through the data retrieved by PocketQuery and do some manipulations such that the data is in correct format for Google Charts. I provided an example on the mentioned thread.

Regards, Felix [Scandio]

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

508 views 3 18
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