{"id":15521,"date":"2015-10-06T10:08:45","date_gmt":"2015-10-06T09:08:45","guid":{"rendered":"https:\/\/help.instantatlas.com\/dashboard-builder-desktop\/desktop-user-guide\/about-this-section\/important-files\/custom-js\/"},"modified":"2019-04-30T23:34:16","modified_gmt":"2019-04-30T22:34:16","slug":"custom-js","status":"publish","type":"page","link":"https:\/\/help.instantatlas.com\/instantatlas-desktop\/en\/welcome\/desktop-user-guide\/the-instantatlas-desktop-publisher\/important-files\/custom-js\/","title":{"rendered":"custom.js"},"content":{"rendered":"<p>The custom.js is a report file where custom JavaScript can be added to extend functionalities in your report. This means you are not limited to the capabilities that a default report offers and can develop your report according to your needs. For example, a JavaScript can be placed to collapse the tree in the Data Explorer and\/or show a callout box that displays indicator data when a feature is selected on the map.<\/p>\n<p>The default custom.js file contains the following code:<\/p>\n<pre class=\"prettypring\">\/**\r\n* This function is called after the report has finished loading.\r\n* The report object is the entry point to the JavaScript API.\r\n*\r\n* @param report The InstantAtlas Report object.\r\n*\/\r\niaOnReportComplete = function(report)\r\n{\r\n\r\n};<\/pre>\n<p>When a report has finished loading it calls the function <span style=\"color: #993300;\">iaOn<span class=\"code\">ReportComplete<\/span><\/span> with a <span class=\"code\">report<\/span> object that can be used as the entry point to the InstantAtlas JavaScript API. Any code placed inside this function will be executed at this point.<\/p>\n<p>Users can access examples of custom JavaScript in our InstantAtlas Resource Library at\u00a0<a href=\"http:\/\/tools.instantatlas.com\/customers\/support\/library\/desktop\/tech-articles\/html\/custom-javascript\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/tools.instantatlas.com\/customers\/support\/library\/desktop\/tech-articles\/html\/custom-javascript<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The custom.js is a report file where custom JavaScript can be added to extend functionalities in your report. This means you are not limited to the capabilities that a default report offers and can develop your report according to your needs. For example, a JavaScript can be placed to collapse the tree in the Data &hellip; <a href=\"https:\/\/help.instantatlas.com\/instantatlas-desktop\/en\/welcome\/desktop-user-guide\/the-instantatlas-desktop-publisher\/important-files\/custom-js\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">custom.js<\/span><\/a><\/p>\n","protected":false},"author":22,"featured_media":0,"parent":14451,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-15521","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-json\/wp\/v2\/pages\/15521","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-json\/wp\/v2\/comments?post=15521"}],"version-history":[{"count":0,"href":"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-json\/wp\/v2\/pages\/15521\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-json\/wp\/v2\/pages\/14451"}],"wp:attachment":[{"href":"https:\/\/help.instantatlas.com\/instantatlas-desktop\/wp-json\/wp\/v2\/media?parent=15521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}