<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using other JS libraries in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574512#M15353</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Florian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By putting &lt;STRONG&gt;window.path + 'libs/canvasjs/canvasjs.js'&lt;/STRONG&gt; into the resources array in init.js file, the WAB should load the canvasjs.js file from the libs/canvasjs folder relative to the init.js file.&lt;/P&gt;&lt;P&gt;So, the init.js file configuration should be fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure with the custom widget sample code snippet you send.&lt;/P&gt;&lt;P&gt;What does the [...] and 'CanvasJS' in define mean?&lt;/P&gt;&lt;P&gt;Your custom widget doesn't need to load CanvasJS dependency, because the CanvasJS should be already available at global scope.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your custom widget:&lt;/P&gt;&lt;P&gt;define([&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'dojo/_base/declare',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'jimu/BaseWidget'&lt;/P&gt;&lt;P&gt;], function (declare, BaseWidget) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return declare([BaseWidget], {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; startup: function() {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log('CanvasJS=', CanvasJS);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Jul 2015 11:43:47 GMT</pubDate>
    <dc:creator>MatejVrtich</dc:creator>
    <dc:date>2015-07-27T11:43:47Z</dc:date>
    <item>
      <title>Using other JS libraries</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574502#M15343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;Hello everybody !&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;BR /&gt;I would like to make available an external JS library for all widgets so I followed this documentation &lt;A href="https://developers.arcgis.com/web-appbuilder/sample-code/add-a-third-party-library.htm"&gt;here &lt;/A&gt;but I did not manage to implement ... My library is not recovered !&lt;BR /&gt;It is functional forall because I managed to use it for a single widget but my problem is to make it available for all I am afraid that the doc is not updated or I forget something!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;Someone could refer me about the procedure?&lt;BR /&gt;thank you in advance !&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 13:46:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574502#M15343</guid>
      <dc:creator>FlorianCADOZ</dc:creator>
      <dc:date>2015-07-22T13:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: Using other JS libraries</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574503#M15344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My real question is : what and how can I do this with a cdn link ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 15:18:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574503#M15344</guid>
      <dc:creator>FlorianCADOZ</dc:creator>
      <dc:date>2015-07-22T15:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using other JS libraries</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574504#M15345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does this help? &lt;A href="https://community.esri.com/message/520986"&gt;Re: Uncaught Error: Bootstrap's JavaScript requires jQuery&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 01:55:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574504#M15345</guid>
      <dc:creator>JunshanLiu</dc:creator>
      <dc:date>2015-07-23T01:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using other JS libraries</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574505#M15346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not really...&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;I do not understand ... My goal is to add the library canvasjs to insert statistical graphs in widgets so I tried to follow the doc ESRI :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt; - I placed my canvasjs.js file in a directory canvasjs , all in the libs directory ( ../libs/canvasjs/canvasjs.js ) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt; - &lt;SPAN lang="en"&gt;I changed the main.js file ( ../libs/main.js ) by adding my library : &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;define ( [" ./ usng / usng ", " ./storejs/json ", " ./storejs/store " " ./canvasjs/canvasjs "] , function () {&lt;BR /&gt;});&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;- &lt;SPAN lang="en"&gt;I changed the Init.js file ( ../stemapp/init.js ) by adding my library :&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;resources resources.concat = ( [&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.apiUrl + ' dojo / resources / dojo.css '&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.apiUrl + ' dijit / themes / Claro / claro.css '&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.apiUrl + ' esri / css / esri.css '&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.apiUrl + ' dojox / layout / resources / ResizeHandle.css '&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.path + ' jimu.js / css / jimu.css '&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.path + ' libs / canvasjs / canvasjs.js '&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ] ) ;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt; - And finally I tried to make it work in a widget but it doesn't... (but if I put my library in only one widget it works, but my goal is to make it shared for all the widget...)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;Thank you by advance for your help !&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;--EDIT--&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;Oh maybe there's something I didn't understood with the delaration in the widget ! &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;In my widget.js I have :&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;define([&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'dojo/_base/declare',&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'dijit/_WidgetsInTemplateMixin',&lt;/P&gt;&lt;P&gt;[...]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'canvasjs'&lt;/P&gt;&lt;P&gt;],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function(&lt;/P&gt;&lt;P&gt;&amp;nbsp; declare,&lt;/P&gt;&lt;P&gt;&amp;nbsp; _WidgetsInTemplateMixin,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;[...]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; canvasjs&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;){&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the mistake is here ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 08:45:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574505#M15346</guid>
      <dc:creator>FlorianCADOZ</dc:creator>
      <dc:date>2015-07-23T08:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using other JS libraries</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574506#M15347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming you have copied the canvasjs.js file into the libs/canvasjs folder, just delete config you made in init.js and create an alias for canvasjs inside the init.js file as following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// init.js&lt;/P&gt;&lt;P&gt;dojoConfig.aliases = [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ['canvasjs', 'libs/canvasjs/canvasjs']&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, in your custom widget, just require the canvasjs as dependency.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// YourWidget.js&lt;/P&gt;&lt;P&gt;define([&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'dojo/_base/declare',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'jimu/BaseWidget',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'canvasjs'&lt;/P&gt;&lt;P&gt;], function (declare, BaseWidget, canvasjs) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 06:31:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574506#M15347</guid>
      <dc:creator>MatejVrtich</dc:creator>
      <dc:date>2015-07-24T06:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: Using other JS libraries</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574507#M15348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matej,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First thank you for your answer, u&lt;SPAN lang="en"&gt;nfortunately it's not working ... I just look different dojo's doc and aliases but the syntax changes in each documentation! &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;- I do have my canvasjs.js file libs / canvasjs&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;- In my Init.js file ( ../stemapp/init.js ) I go back to the originaly code and just add the alias&amp;nbsp; :&lt;/P&gt;&lt;P&gt;&lt;EM&gt;resources = resources.concat ( [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.apiUrl + ' dojo / resources / dojo.css '&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.apiUrl + ' dijit / themes / Claro / claro.css '&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.apiUrl + ' esri / css / esri.css '&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.apiUrl + ' dojox / layout / resources / ResizeHandle.css '&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.path + ' jimu.js / css / jimu.css '&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ] ) ;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojoConfig.aliases = [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ['canvasjs', 'libs/canvasjs/canvasjs']&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;- For my custom widget, it's done (&lt;SPAN lang="en"&gt;thank you for having me reassured about the syntax elsewhere)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;- Also, should I remove the configuration made ​​in the main.js (in libs / main.js ) ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;define ( [" ./ usng / usng ", " ./storejs/json ", " ./storejs/store " " ./canvasjs/canvasjs "] , function () {&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;});&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 08:46:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574507#M15348</guid>
      <dc:creator>FlorianCADOZ</dc:creator>
      <dc:date>2015-07-24T08:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using other JS libraries</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574508#M15349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Florian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess there is no need to require canvasjs dependency in libs/main.js so revert the changes in this file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just include the canvasjs dependency in your custom widget. I use external libs like react and d3 this way and it works just fine.&lt;/P&gt;&lt;P&gt;In your custom widget, require the canvasjs dependency by its alias:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// YourWidget.js&lt;/P&gt;&lt;P&gt;define([&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'dojo/_base/declare',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'jimu/BaseWidget',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'canvasjs'&lt;/P&gt;&lt;P&gt;], function (declare, BaseWidget, canvasjs) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 12:12:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574508#M15349</guid>
      <dc:creator>MatejVrtich</dc:creator>
      <dc:date>2015-07-24T12:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using other JS libraries</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574509#M15350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;I really do not understand ... I did everything you said above and it still does not work ...&lt;BR /&gt;At witch line in the init.js file did you put the :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="en"&gt;dojoConfig.aliases = [&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [' canvasjs ', ' libs / canvasjs / canvasjs ']&lt;BR /&gt;] ;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 14:36:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574509#M15350</guid>
      <dc:creator>FlorianCADOZ</dc:creator>
      <dc:date>2015-07-24T14:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using other JS libraries</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574510#M15351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Florian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I found, the CanvasJS library is not AMD compatible. The workflow I suggested (using aliases) is supported only for AMD/UMD packages.&lt;/P&gt;&lt;P&gt;However, you should be able to load the CanvasJS library following your previous workflow (add CanvasJS lib to resources array in init.js file).&lt;/P&gt;&lt;P&gt;After that, the CanvasJS is accessible as global variable window.CanvasJS (or just CanvasJS) in your custom widget.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI, there is nice ArcGIS GeoServices charting lib created by Esri: &lt;A href="https://github.com/Esri/cedar" title="https://github.com/Esri/cedar"&gt;Esri/cedar · GitHub&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 06:39:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574510#M15351</guid>
      <dc:creator>MatejVrtich</dc:creator>
      <dc:date>2015-07-27T06:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using other JS libraries</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574511#M15352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matej,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;Thank you for your explanations , it already makes me feel a little more about the non-functioning of canvasjs in my widget !&lt;BR /&gt;However , the statement in the file Init.js still does not work and I do not understand why ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="en"&gt;In my ressources array there is :&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; resources = resources.concat([&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.apiUrl + 'dojo/resources/dojo.css',&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.apiUrl + 'dijit/themes/claro/claro.css',&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.apiUrl + 'esri/css/esri.css',&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.apiUrl + 'dojox/layout/resources/ResizeHandle.css',&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.path + 'jimu.js/css/jimu.css',&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.path + 'libs/canvasjs/canvasjs.js'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And in my custom widget there is :&lt;/P&gt;&lt;P&gt;&lt;EM&gt;define([&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; 'dojo/_base/declare',&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; 'dijit/_WidgetsInTemplateMixin',&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[...]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'CanvasJS'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;],&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;function(&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; declare,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; _WidgetsInTemplateMixin,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[...]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CanvasJS&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;){...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;When I run my custom widget, in the console I see it seems to search canvasjs in &lt;SPAN style="text-decoration: underline;"&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http://js.arcgis.com/3.14/dojo/CanvasJS.js" rel="nofollow" target="_blank"&gt;http://js.arcgis.com/3.14/dojo/CanvasJS.js&lt;/A&gt;&lt;/SPAN&gt; , whatever I do in the Init.js'code ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;Otherwise, I thank you for the track is cedar unfortunately I need pie and stacked percentage column chart and cedar doesn't seem to provide this kind of functionality ....&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;I'm a little stuck right now !&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 08:16:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574511#M15352</guid>
      <dc:creator>FlorianCADOZ</dc:creator>
      <dc:date>2015-07-27T08:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using other JS libraries</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574512#M15353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Florian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By putting &lt;STRONG&gt;window.path + 'libs/canvasjs/canvasjs.js'&lt;/STRONG&gt; into the resources array in init.js file, the WAB should load the canvasjs.js file from the libs/canvasjs folder relative to the init.js file.&lt;/P&gt;&lt;P&gt;So, the init.js file configuration should be fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure with the custom widget sample code snippet you send.&lt;/P&gt;&lt;P&gt;What does the [...] and 'CanvasJS' in define mean?&lt;/P&gt;&lt;P&gt;Your custom widget doesn't need to load CanvasJS dependency, because the CanvasJS should be already available at global scope.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your custom widget:&lt;/P&gt;&lt;P&gt;define([&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'dojo/_base/declare',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'jimu/BaseWidget'&lt;/P&gt;&lt;P&gt;], function (declare, BaseWidget) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return declare([BaseWidget], {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; startup: function() {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log('CanvasJS=', CanvasJS);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 11:43:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574512#M15353</guid>
      <dc:creator>MatejVrtich</dc:creator>
      <dc:date>2015-07-27T11:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using other JS libraries</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574513#M15354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;Oh ?! I just created a new application to see if there wasn't a problem with the file's refreshing system and on this new application it works perfectly! (not a caching problem, I clean all my navigator's files after this discovery but didn't work with the first app)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;--------------------------------------------------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;[...] mean that there wasn't significant text and the canvasjs in the define it was a mistake by myself !&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;--------------------------------------------------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;This behavior is strange but anyway thank you very much for your help!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 12:17:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/using-other-js-libraries/m-p/574513#M15354</guid>
      <dc:creator>FlorianCADOZ</dc:creator>
      <dc:date>2015-07-27T12:17:14Z</dc:date>
    </item>
  </channel>
</rss>

