Highcharts all js in one package - highcharts

Can I include all the highcharts js into one main js file and use it in my code.
Eg.
highcharts.js
highstocks.js
highcharts-more.js
exporting.js
all these js files into a highcharts_all.js file.
Will the code conflict?
Can I do like this.?

Use custom download builder at http://www.highcharts.com/download and choose whatever libs needed . it has stock,export and all options

Related

How I add custom link in Issue-link-section

I am creating a JIRA(Version- 7.2.2) plug-in, Here I want to insert my custom link in Issue-link-section. For your better understanding please view the below image.
Click to View Image
In order to add you custom link on that dialog you need to edit the bundled plugin associated with that dialogue. Technically that dialogue is part of the jira-issue-link-web-plugin which you can find the JAR file as jira-issue-link-web-plugin.jar in your installation directory. If I'm not mistaken you need to edit the velocity file in that JAR file and add your links over there. There is no way to add it from the UI unless you want to edit the JAR file and upload it as a newer version in your JIRA. Please note that it's bundled plugin and changing it may cause some malfunction in your production then be careful and test it in staging first.
Yes shailendra,You can try below solution for your query-
<web-item key="example-create-link" section="create-issue-link-types" weight="100">
<label key="MyCustomLink"/>
<link linkId="link-issue">url</link>
</web-item>

Which files needs to be deployed from a Dart project?

I have an AngularJS project that I am thinking of migrating to Dart. I do not want to migrate the whole project in a big-bang, so I am looking for ways to run the two apps side-by-side.
The dart app will run on the root as index.html. The js app will run on a separate path, say '/jsApp'.
When I build a test project, it seems that the /build directory includes a lot of unnecessary files. Would I need to deploy the complete contents of the /build/web directory?
What is it that actually gets loaded? Do html files still get loaded at runtime or are they bundled into the main file?
Do I need main.dart.js as well as main.dart.precompiled.js? It seems that they are very large files for a trivial app. Is that to be expected?
It is still unclear to me how all these things hang together.
If you want to keep the generated files as small as possible, you should:
Make sure your pubspec.yaml includes the angular transformer, as explained here: Angulardart. Creating your first app
Your pubspec.yaml should look like this:
name: angular_dart_demo
version: 0.0.1
dependencies:
angular: 0.12.0
[...]
transformers:
- angular
html_files:
- web/my_html_template.html
- web/another_html_template.html
Build from the command line with pub build
This way you will get 800KB js, instead of 5MB js ;)
That's because Angular Dart uses mirrors and, as a result, the generated js code can get very big if you don't use the angular transformer.
I think html templates are copied to the build directory and will be requested at runtime.
You will have to merge the contents you get from "pub build" with your existing js application somehow.
I am using AngularJS with Dart controllers mixed in. You do not have to adapt your current project structure to use the pub build. Just use dart2js to compile the individual dart files and include the ".js" files in your page. You do not have to add the native dart script tag or include the dart bootstrap in your code. Just include a script tag for the generated js file (the only file you need) and it will do what you expect. I plan to write up a brief overview of this soon.
Normally the entire build directory needs to be deployed and there are normally no unnecessary files.
The *.precompiled.js files are not generated anymore in recent Dart builds (this was for CSP compliance).
What Dart version are you using?
If you build in debug mode also the source map files are generated in the build directory.
The browser loads the HTML file the user requests and then loads the script files references in <script> tags in this HTML and all other resources (img, css, ...)
I don't know if the build output of an Angular component with an external HTML-template file is inlined in the index.html or if they are copied as they are.

How to use custom third party library in Zend Framework 2

I want to use TCPDF library in my ZF2 project. I have the source of library but it is incompatible with Zend Framework 2 namespace (not PSR-0). How to include it in the project? If there are any way to convert it with ZF2 compatible.
If there is a way to use the library as it is then please show the process (where to place library source and how to include it).
Please do not suggest ZendPdf as an alternative.
Thanks
So one way to do this with the command line tool that foozy mentioned, but this leads to altering some one else's code and who wants that headache. You can can also do this with Composer using the autoload:classmap directive since it is a class even though it's not PSR-0.
Basically, you would place the TCPDF files somewhere convenient (vendor folder, lib folder, etc.) and then add the autoload directive to composer.json like so:
{
"autoload": {
"classmap": ["vendor/tcpdf"]
}
}
Assuming you placed the tcpdf folder in the vendor folder and that the TCPDF class is in the root of the tcpdf folder. Then you run php composer.phar update . Composer will then add that folder as a source location to the autoloader function it registers with the SPL autoloder.
Then where ever you want to use the TCPDF class you would do $pdf = new \TCPDF().
NOTE: I'm not 100% on the path being relative to the project root, composer.phar, or the vendor folder.

Highcharts, old look of exporting i 3.0

there is some code for changing back to the old look of export buttons even if you're running version 3.0.
It's here:
https://github.com/highslide-software/highcharts.com/blob/master/js/modules/exporting-old-look.src.js
My only question is, how do I include this code into my graph?
You can just copy that javascript into your own project between and tags,
or
you can include it from github in a script tag:
or
You can download it to your own project area and include it in a script tag from your own web server.
The script will load and run when the page loads, so make sure to include it after highcharts.

Include library from data directory in main.js in Firefox add-on

In my Firefox add-on using the Add-on SDK, I'm trying to include two library files from the data directory in main.js, and it's not working.
I have the following directory structure:
data
-- jquery-latest.min.js
-- pagemodscript.js
-- mylibrary.js
lib
-- main.js
pagemodscript.js uses jQuery, and that works (using contentScriptFile).
I also want to use jQuery and mylibrary.js in main.js, but that's not working.
Various things I've tried result in error messages "ReferenceError: [class in mylibrary.js] is not defined", "ModuleNotFoundError: unable to satisfy: require(mylibrary.js)", and "has no authority to load".
I tried moving mylibrary.js and copying jquery-latest.min.js to lib, but that resulted in one of those error messages.
What's the best way to set this up?
Note: the reason I want to use jQuery in main.js is because - after an event generated by pagemodscript.js - I want main.js to add a div to the current page in which it will display a list of objects it created from another event generated by pagemodscript.js. Is the better practice to have pagemodscript.js create those objects and create the div? In that case, this would work: I'd load mylibrary.js into pagemodscript.js using contentScriptFile. In that case, pagemodscript.js would be creating objects of the class defined in mylibrary.js, and that doesn't seem as good a design as the way I'd prefer to do things.
I also want to use jQuery and mylibrary.js in main.js
That won't do you any good. jQuery expects to run in a window and works with the DOM. Extension files execute in an entirely different environment - there is no window to access and some typical window functions are unavailable. Also, extension files simply aren't allowed to access the DOM, all web page access has to happen in content scripts.
I want main.js to add a div to the current page
You should send a message to your content script (pagemodscript.js) and let it create the div for you. That's how it works with the Add-on SDK.

Resources