<?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: Plotly in Qlik Sense Extension - SyntaxError: Unexpected token '&amp;lt;' in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Plotly-in-Qlik-Sense-Extension-SyntaxError-Unexpected-token-lt/m-p/1642324#M11680</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;you could try to include the link to plotly in your array of dependencies instead of ‘Plotly’, which probably is what causes the error. If Plotly supports loading with requirejs that might work.&lt;/P&gt;</description>
    <pubDate>Sun, 03 Nov 2019 14:16:22 GMT</pubDate>
    <dc:creator>ErikWetterberg</dc:creator>
    <dc:date>2019-11-03T14:16:22Z</dc:date>
    <item>
      <title>Plotly in Qlik Sense Extension - SyntaxError: Unexpected token '&lt;'</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Plotly-in-Qlik-Sense-Extension-SyntaxError-Unexpected-token-lt/m-p/1637453#M11605</link>
      <description>&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;I'm currently trying to integrate Plotly into Qlik. However, I always get the error message: "Uncaught SyntaxError: Unexpected token '&amp;lt;'".&lt;/P&gt;&lt;P&gt;The Plotly script works outside of Qlik, so I assume that the problem belongs to Qlik himself or my programming skills in Qlik. ;D&lt;/P&gt;&lt;P&gt;This is how I integrated it into Qlik:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;define( [
        'jquery',
		'qlik',
		'Plotly'
    ],
    function ( $, qlik, Plotly ) {
        'use strict';

        return {

            paint: function ( $element, layout ) {

				$element.empty();
				
				$(document).ready(function() {
					var s = document.createElement("script");
					s.type = "text/javascript";
					s.charset = 'utf-8';
					s.src="https://cdn.plot.ly/plotly-1.2.0.min.js";

					$("head").append(s);
					
				});
				
//############################Other Stuff
            }
        };
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's how I call it (Simple example from the Plotly page: &lt;A href="https://plot.ly/javascript/getting-started/" target="_blank" rel="noopener"&gt;https://plot.ly/javascript/getting-started/&lt;/A&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;TESTER = document.getElementById('tester');
Plotly.plot( TESTER, [{
x: [1, 2, 3, 4, 5],
y: [1, 2, 4, 8, 16] }], {
margin: { t: 0 } } );&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After calling "Plotly.plot (TESTER ...);" I get the following error message: "Uncaught ReferenceError: Plotly is not defined". I think that's because there were problems interpreting the script...&lt;/P&gt;&lt;P&gt;Can you detect a mistake?&amp;nbsp;The current version with the link "&lt;A href="https://cdn.plot.ly/plotly-latest.min.js" target="_blank" rel="noopener"&gt;https://cdn.plot.ly/plotly-latest.min.js&lt;/A&gt;" and as local&amp;nbsp; plotly-latest.min.js doesn't work either.&lt;/P&gt;&lt;P&gt;Thank you very much for your help and have a nice weekend&lt;/P&gt;&lt;P&gt;A456B123&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:19:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Plotly-in-Qlik-Sense-Extension-SyntaxError-Unexpected-token-lt/m-p/1637453#M11605</guid>
      <dc:creator>A456B123</dc:creator>
      <dc:date>2024-11-16T04:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Plotly in Qlik Sense Extension - SyntaxError: Unexpected token '&lt;'</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Plotly-in-Qlik-Sense-Extension-SyntaxError-Unexpected-token-lt/m-p/1642324#M11680</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;you could try to include the link to plotly in your array of dependencies instead of ‘Plotly’, which probably is what causes the error. If Plotly supports loading with requirejs that might work.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Nov 2019 14:16:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Plotly-in-Qlik-Sense-Extension-SyntaxError-Unexpected-token-lt/m-p/1642324#M11680</guid>
      <dc:creator>ErikWetterberg</dc:creator>
      <dc:date>2019-11-03T14:16:22Z</dc:date>
    </item>
  </channel>
</rss>

