Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Editing my Sankey

Hello,
I working on my own code in HTML and it works well and I get the input from CSV File.

var ccs=loadCSV("test1.csv");

console.log(ccs);

var json = ccs.split('\n').reduce(function(result, line, index) {

  if (index > 0) { // Skip header.

    var data = line.split(';');

console.log (data);

    if (data.length === 5) { // Skip rows with incomplete columns.

      var containsSourceNode = result.nodes.some(function(node) { return node.name === data[0]; });

      if (!containsSourceNode) {

        result.nodes.push({

          node : result.nodes.length,

          name : data[0],

          xPos : data[1]

        });

      }

      var containsTargetNode = result.nodes.some(function(node) { return node.name === data[2]; });

      if (!containsTargetNode) {

        result.nodes.push({

          node : result.nodes.length,

          name : data[2],

          xPos : data[3]

        });

      }

      result.links.push({

        source : result.nodes.filter(function(node) { return node.name === data[0]; })[0].node,

        target : result.nodes.filter(function(node) { return node.name === data[2]; })[0].node,

        value : data[4]

      });

    }

  }

  return result;

}, {

  nodes : [],

  links : []

});

that's how i get the array for Nodes and Links and now i want to do create an extension for Qlik Sense, but I don't know how to get the Dimensions and the Measurements or how to link them to my code..
any help hint could help.
Thnx

Labels (1)
0 Replies