I am trying to install high-charts through npm and use it on the server side to output the data to a jade template. I am using basic express framework.
The first section in the link below is the guide that I am following.
http://www.highcharts.com/docs/getting-started/install-from-npm
However I am getting an error when I use this line of code
require('highcharts/modules/exporting')(Highcharts);
I have tried this across multiple computers and it's the same error across all.
Code used:
I have no idea why its failing. Any help would be great.
The problem is that you are trying to use Highcharts on the server side, but that library requires DOM nodes from the client's HTML document to work (like the document object from the error you show and also the container where the chart will be drawn).
You can emulate the client side using PhantomJS. This way you can render your charts on the server.
You can try following this guide from Highcharts documentation website.
However, it's definitely easier to load and use the library on the client side and use the server only to send the chart data to the client.
Related
I had been happily using Java live reload while debugging my Vaadin application over the past few months.
Today, after I started my browser and directed it to my locally running Vaadin application I got a popup in the lower right corner stating:
Java live reload unavailable. Live reload for Java changes is currently not set up. Find out how to make use of this functionality to boost your workflow. Read more
Clicking onto the read more link (pointing to 'https://vaadin.com/docs/v14/flow/workflow/workflow-overview') just brings me to a "404 Page Not Found" error page.
So - two or actually three questions:
what could cause my live-reload functionality go missing? I am using MS Edge and the Live-reload plugin is enabled (and it used to work until yesterday).
where has the page gone explaining how to set that up?
and finally: Any idea, what to check or fix to get this working again? I consider that pretty essential functionality for efficient UI development!
For question 2, you can find the documentation here: https://vaadin.com/docs/v14/guide/live-reload
So it's the first time I'm trying to use the google reCAPTCHA v3 (actually it's the first time I'm using any kind of captcha).
I followed the documentation and a very basic tutorial.
What I understand is that I should be able to see the token in my browser inspector.
The first issue is that i can see the logo on the bottom right of my screen, but there is definitely no token in my input.
The second issue comes from the browser console which indicates 3 kind of errors.
I'm working with Symfony Framework on a local environment.
Any clue would be much appreciated !
My twig & javascript files
Browser screenshot
Content-Security-Policy issues
So i figured out how to get the token....
I just had to remove those lines in the js file:
function onclick(e) {
e.preventDefault();
I still didn't find about the Content-Policy issues.
I've added module highcharts in Flow project as it is written over here. Basically the problem is that whenever I use library Highcharts , I have to put into the code import Highcharts from "highcharts"; The results outcome with no errors in FlowJs interface, but with error in browser Unexpected token import( so it doesn't compile js file properly) . Does anyone know the answer for that? I would be appreciated!
Flow in general uses nonstandard syntax for type annotations, etc. In your case, the import is standard ES6 syntax, but it's not yet supported in whatever browser you are using.
Either way, the solution is to use Babel to transpile your code. You can configure it to target older versions of JavaScript and to strip Flow types. There's a bit more info about using it with Flow on the Running Flow code page.
Hi I have a swagger file written for my API and I could not test the paths of my API since I am getting: ERROR Server not found or an error occurred because my paths are all localhost, so how can i use swagger locally? thank you
I found a solution which is using the building from source way in swagger-editor
Assuming you are developing within Visual studio click the green play looking button to build & run your solution , a browser should now pop up. ignore whatever it comes up with and type localhost/swagger and it should provide you with the interface. Let me know what happens or if you require any assistance
I have a strange situation with a project for iOS.
Its created using browserify and React for Cordova and aimed at iOS.
We have built the project for iOS using Cordova commands without any issues. It runs with no xcode errors or Javascript errors either however none of the JS ui appears on screen. We just get a blank white screen with the system bar at the top. See attached screen shot.
So far we have found out that if you add HTML to the index.html in WWW folder it prints that fine so I assume its the JS.
When we run in a browser it works as well as building for Android.
We have no problems with anything other than iOS (simulator and device build).
hopefully someone can help me out here because I'm stumped. Please let me know what files you need to look at and I'll make them available.
Thanks in advance.
IMAGES
The error screen: http://www.voidapplications.co.uk/errorScreen.png
What we expect to be shown: http://www.voidapplications.co.uk/whatWeExpect.png
If you are using internationalization component that's because you need to use the Intl polyfill:
Intl.js and FT Polyfill Service
Intl.js polyfill was recently added to the Polyfill service, which is developed and maintained by a community of contributors led by a team at the Financial Times. It is available thru cdn.polyfill.io domain, which routes traffic through Fastly, which makes it available with global high availability and superb performance no matter where your users are.
To use the Intl polyfill thru the Polyfill service just add one script tag in your page before you load or parse your own JavaScript:
<script src="https://cdn.polyfill.io/v1/polyfill.min.jsfeatures=Intl.~locale.en"></script>
When specifying the features to use thru the polyfill service, you have to specify what locale, or locales to load along with the Intl polyfill for the page to function, in the example above we are specifying Intl.~locale.en, which means only en, but you could do something like this:
<script src="https://cdn.polyfill.io/v1/polyfill.min.js?features=Intl.~locale.fr,Intl.~locale.pt"></script>
note: the example above will load the polyfill with two locale data set, fr and pt.
This is by far the best option to use the Intl polyfill since it will only load the polyfill code and the corresponding locale data when it is really needed (e.g.: safari will get the code and patch the runtime while chrome will get an empty script tag).
source & other ways to include Intl polyfill: https://github.com/andyearnshaw/Intl.js#getting-started
You can debug the UIWebView in the simulator with Safari http://moduscreate.com/enable-remote-web-inspector-in-ios-6/. You'll probably see a big error message in the console, if not you will have access to the debugger so you can step through and sort it out.
I have had this issue in the past, it turned out to be unsupported javascript features. for example, setting default parameters in the function. I.e:
function test( myvalue=0 ) { /* ... */ };
I had to initialise the value inside the function instead. You could also try removing any ecma script 2016 features you may have implemented.
Trouble shooting this type of issue was painful. I created a minimal version of the smallest part of my product compiled and ran it on ios emulator, added another chunk of the product, rinse and repeat.
Im sure there's a better way to detect these issues, but I do not know it.