ChartJS v3 Migration: how to define annotation plugin? - annotations

I'm trying to migrate a Chart.js html file created using version 2.7.1
My first problem is how to replace first script found at begin of my HTML file
<script src='https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js'></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/chartjs-plugin-annotation/0.5.7/chartjs-plugin-annotation.js"></script>
I have already replaced first script named Chart.min.js by following line
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
I'm surprise that version number has been removed from script name but it is what is rated on Chart.js web site.
Now I try to find Annotation plugin but I don't find any script reference on the Web.
Where can I find Annotation plugin on the web and use it without installing this file on my PC ?
If what I search is impossible, how can I do to continue to use Annotation plugin ?
Thanks for any help

You can put the lib name in the search bar of the cdn
https://cdnjs.com/libraries/chartjs-plugin-annotation
<script src="https://cdnjs.cloudflare.com/ajax/libs/chartjs-plugin-annotation/1.0.2/chartjs-plugin-annotation.js" integrity="sha512-sAqZojh+v9iWel74NtgLdr9y2QWsy+kfFfffU9Gzgcrg6SmNDLIznMTyZIFo33dDcRMhYV9HGCDbaTVXxUwz7g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

Related

how to use ionic script in angular project

I need to know how to implement the below script in my angular index.html file
<script src='node_modules/#ionic/core/dist/ionic.js'></script>
It is throwing as above URL is not found even though I have installed #ionic/core. Can someone help me with this
i tried to include that script in angular index.html file but it not working
Thanks in advance
Regular
Pinterest

javascript library not loaded in ionic

Im including the google cast external javascript library. When I run with ionic serve it works good, but when I run the app in the phone, the library is not loaded. Debugging can see that :
https://cdn-enterprise.discourse.org/ionicframework/uploads/default/original/3X/a/d/ad4c985f45c1c538bdfbfbb02d10141b6929e1d5.png
The "http" is replaced by "file"!
I tried to include the libraries with that code:
script src="//www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1">
and with type="text/javascript" added; but all codes replaces http by file, and the library is not loaded.
Any suggestions?
When you run the app do not add cdn files starting with "//:", add them like "http://".
If its possible download those files and keep them in directory, after that give directory path to file.
e.g. <script type="text/javascript" src="assets/js/library.js">

Can't download bootstrap in netbeans

Even time I try to download bootstrap in netbeans I get this error and can't figure out why:
Network error occured while processing these requests: http://getbootstrap.com/2.3.2/assets/bootstrap.zip
Can someone please explain what is going on here?
You can download bootstrap from here then unzip it. you will find 3 folders named css/fonts/js. Then copy them to the public_htmldirectory of your site. Next create a new HTML file and insert these lines with in the<head> and </head>tags <script src="js/bootstrap.min.js" type="text/javascript"></script> and <link rel="stylesheet" href="css/bootstrap.min.css"/> Then you are good to go. for more information refer following links link1 link2

cordova 1.7.0 set info error

I am using cordova 1.7.0. My app is running fine in simulator but a message comes like
Error: executing module function 'setInfo' in module 'cordova/plugin/ios/device'. Have you included the iOS version of the cordova-1.7.0.js file?
I have included
<script type="text/javascript" charset="utf8" src="[location of cordova.ios(for ios)]"></script>
in index.html but did not work.Plz help.
there must be something wrong with the path to the js.
The index.html file is read?
Is your www folder maybe a group instead of a reference folder?
Go step by step
This generally happens when the cordova file is not properly available when the page is loaded. You can check that it is referencing properly by opening the index.html (or your start page) in the Chrome and check in Inspect Element that all the resources are loaded and there are no errors.
to solve this problem, just follow steps in picture

PhoneGap + WP7: how to use a plugin

How do I integrate a plugin with PhoneGap on Windows Phone 7?
I've found tutorials for iOS, Android and BlackBerry, but nothing about WP7.
I've put the .cs file in the Plugins folder, but I'm not sure it is enough.
To integrate a wp7 plugin with phonegap these are the general steps :
Include the plugin definition and js implementation javascrtip file in your html page head section
[script type="text/javascript" charset="utf-8" src="myPlugin.js"][/script]
in your code you need to call it like:
navigator.plugins.myPluginName.myPluginFunction(parameters);
you may need to make few additions in your html as per plugin required.
Also check for entry for myplugin in WMAppManifest.xml
I have used myPlugin as an reference so please replace the name with your actual plugin name.
Hope this help you
~K
The problem was in the .js file.
PhoneGap is now called Cordova, so the js files of old plugins have to be updated with the new class name.