I am trying to get an area chart in my application however, I cannot get even the most basic one displayed (I literally checked to see if their implementation would work but it doesnt and throws this error)
Example I tried to run http://www.moxiegroup.com/moxieapps/gwt-highcharts/showcase/#area-range
com.google.gwt.core.client.JavaScriptException: (TypeError)
#org.moxieapps.gwt.highcharts.client.BaseChart::nativeRenderChart(Ljava/lang/String;Lcom/google/gwt/core/client/JavaScriptObject;ZZLcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;)([string:
'Chart', JavaScript object(10), bool: false, bool: false, JavaScript
object(36), JavaScript object(37), JavaScript object(38), JavaScript
object(26), JavaScript object(32), JavaScript object(25), JavaScript
object(30), JavaScript object(31), JavaScript object(34), JavaScript
object(35)]): $wnd.Highcharts is undefined
Is it possible im using the incorrect JQuery? Any and all help is greatly appreciated since this feature is important to our application
The reason for this error was that while I was including highcharts.js, i was not including highcharts-more.js. Including this solved my problem!!
Related
I'm using the html2canvas module to make a screenshot of angular components made of d3.js and c3.js libraries to show charts.
Everything works fine in angular, the problem comes when i convert the angular components in custom elements and try to get the screenshot of the charts.
I get two different behaviors based on the browser using:
On Firefox I get in the console this error ERROR TypeError: this.ngElementStrategy is undefined but the screenshot works fine.
On Chrome I get this error SyntaxError: Error parsing CSS component value, unexpected EOF and the screenshot is not created.
My goal would be to make the library working also on chrome obviously; looking on the web the Chrome error should be related to a CSS class not supported by html2canvas, but i tried removing all the CSS imports from my test page and the error persists.
The different behaviors are strange assumed that in angular works but after the conversion to custom elements it doesn't only on chrome...
Anyone has any idea?
I love React, it has quickly become my favorite development tool. It is a fantastic library that creates the kind of flexibility I've always dreamed about.
That said, I'm having a very hard time getting Facebook login to work with React in production.
I have tried all of the following methods. In all three cases, I implemented the examples exactly as shown in the code using the simplest possible technique:
https://github.com/seeden/react-facebook
https://github.com/keppelen/react-facebook-login
http://jslancer.com/blog/2017/11/27/facebook-google-login-react/
Everything works great in development. :)
When I create the production build using create-react-app and push it live, it breaks and reports: Error: Facebook is not initialized or Uncaught TypeError: Cannot read property 'login' of undefined where undefined is FB.
Basically it seems like the Facebook javascript SDK is not loaded or initialized.
The first two links above are for existing component libraries, but the third is a custom implementation that places the Facebook initialization code in the index.html file and creates an event listener. The results are the same in all three examples.
It is as if something about the create-react-app compression method is obfuscating the variables to the point that Facebook can no longer work, or at least is not available to the react code. This includes all calls to window.FB as recommended in many tutorials.
I've been working at this for a couple of weeks now (off and on) and am now turning to the hive mind. Anyone have any ideas on how to get Facebook to actually work with Facebook's own code library (React)? It seems so painfully odd that it causes this much trouble and I have been unable to find a clear solution that works in production.
Most of the debugging steps are already mentioned in the comments section.
Here are the steps laid down:
1) Check the network tab in your browser's console and see if the request to load FB's SDK is successful or not
2) Most common culprit is some extension like Ad-Blocker blocking such async requests which loads JS on your web page. Disable it or try it incognito mode
3) Other common mistake I have seen is forgetting to use the FB.init({ // config }); function - which is the actual call which initializes the fb sdk and makes available the FB variable globally.
I am trying to parse html code from wicket application to Java. My application uses wicket and I found a method
tester.getLastResponse().getDocument()
which does just that. However not all html code gets included there. When I saved this output I can see that there are places like
< MARKUP FOR
com. ... .form.PlainCheckBoxPanel END
>
How can I make it parse the full html code?
It seems you run your application in DEVELOPMENT mode and org.apache.wicket.settings.DebugSettings#isOutputMarkupContainerClassName() returns true.
Change it to PRODUCTION mode or call org.apache.wicket.settings.DebugSettings#setOutputMarkupContainerClassName(false).
I am using an external JS file to generate QR codes
The JS file is loading correctly, it just can't refer to that function. The specific error I am getting is:
Uncaught ReferenceError: qrcode is not defined
enter image description here
The error suggest the tag qrcode could not be found. Is it in your HTML page as id? Also as suggested in the comment you need to do new $wnd.QRCode(... in createQRCode. Also you could pass the element found as argument to the latter method and do the search getElementById in GWT code as Java and use: Document.getElementById
I was trying to mess around with this new "easy" way to use google analytics API. Did not work for me even though I followed the instructions correctly. Anyone have any issues with this?
Try it out...
http://analytics-api-samples.googlecode.com/svn/trunk/src/reporting/javascript/ez-ga-dash/docs/user-documentation.html
Another easy fix is to set up a button to actually call the render method, rather than having it execute instantly like the basic example. (last line, chained method)
- or a 3-5 second timeout
Or use the "cool demo" link for a better starting point code
yes i tried it also and not worked.
It seems like i'm missing some library on my localhost. I've checked the scripts execution and when it does
if (gapi.client.analytics) {
it throws the error:
Uncaught TypeError: Cannot read property 'analytics' of undefined
this.renderFunction();
Regards
While I was getting an undefined error, I changed code in line 220 as a temporary fix.
Know it loads perfectly. this is the code:
// If the client library has loaded.
if(typeof gapi.client != 'undefined'){ //new code
//if (gapi.client.analytics) {