0 Replies Latest reply: Oct 31, 2016 2:32 PM by Robert Zeydelis RSS

    Trouble adding a graph in Mash-Up

    Robert Zeydelis

      Hey,

       

      So I am following the tutorial created by Qlik on Youtube and I am having trouble adding the graph on Mash-Up via the code he provides in the video.

       

      To be specific and I am talking about this part:

      https://youtu.be/OzzsynxIUMM?t=310

       

      <!doctype html>
      <html><head>
          <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
          <title>Qlik Sense: Mashup</title>
          <meta charset="utf-8">
          <meta http-equiv="content-type" content="text/html; charset=UTF-8">
          <meta name="HandheldFriendly" content="True">
          <meta name="MobileOptimized" content="320">
          <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
          <meta name="apple-mobile-web-app-capable" content="yes">
          <meta name="apple-mobile-web-app-status-bar-style" content="black">
          <meta http-equiv="cleartype" content="on">
          <!--Add host to these 3 links if the mashup is on another webserver than qlik sense static content-->
          <link rel="stylesheet" href="/resources/autogenerated/qlikui.css">
          <link rel="stylesheet" href="/resources/assets/client/client.css" media="all">
          <script src="/resources/assets/external/requirejs/require.js"></script>
          <script src="delete4.js"></script>
      </head>
      <body style="overflow:auto">
      <div id="myDiv" style="width: 600px; height= 300px;" class="qvobject" data-qvid="HTFthp"></div>
      </body></html>
      

       

      This is my HTML code ^^

       

      vv This is my JS code

       

      /*global require, alert*/
      /*
       * 
       * @owner Enter you name here (xxx)
       */
      /*
       *    Fill in host and port for Qlik engine
       */
      var config = {
        host: window.location.hostname,
        prefix: "/",
        port: window.location.port,
        isSecure: window.location.protocol === "https:"
      };
      require.config( {
        baseUrl: ( config.isSecure ? "https://" : "http://" ) + config.host + (config.port ? ":" + config.port: "") + config.prefix + "resources"
      } );
      
      
      require( ["js/qlik"], function ( qlik ) {
        qlik.setOnError( function ( error ) {
        alert( error.message );
        } );
      
      
        //callbacks -- inserted here --
        //open apps -- inserted here --
        var app = qlik.openApp('Redesigning dashboard.qvf', config);
      
      
      
        //get objects -- inserted here --
      
        app.getObject('CurrentSelections','CurrentSelections')});
      
      
        //create cubes and lists -- inserted here --
      
      
      } );
      

       

      Note: I did not touch the JS code, but it does look different when he shows his JS code. The author of the video doesn't mention anywhere in the video on what code to put there and that it just automatically pops in there. I tried also writing the code he has in his JS code, but that did not also work.

       

      Any help will be much appreciated.