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

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]

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?

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,

Hi Alexandre,

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

Regards, Felix

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>

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Apr 10, 2018 in Marketplace Apps

Learn about how Stefan K. built one of the *first ever* Marketplace apps

In this post you will discover more about the evolution of K15t software, some big topics they're currently focusing on in the app space, and a rare (not not funny!) photo of founders Mike Cannon-Bro...

12,839 views 11 24
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