<?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 D3.js  collapsible tree diagram in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/D3-js-collapsible-tree-diagram/m-p/1641281#M11661</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to reuse a code from&amp;nbsp; 3d&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;A href="https://bl.ocks.org/d3noob/43a860bc0024792f8803bba8ca0d5ecd" target="_blank" rel="noopener"&gt;https://bl.ocks.org/d3noob/43a860bc0024792f8803bba8ca0d5ecd&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I have problem converting the treeData&amp;nbsp; Object&lt;/P&gt;&lt;P&gt;the data source format&amp;nbsp; should be like this&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="undefined"&gt;var treeData =
  {
    "name": "Top Level",
    "children": [
      { 
        "name": "Level 2: A",
        "children": [
          { "name": "Son of A" },
          { "name": "Daughter of A" }
        ]
      },
      { "name": "Level 2: B" }
    ]
  };&lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;How can I have this format reading from the hypercube ?&lt;/P&gt;&lt;P&gt;Starting with 2 dimensions the data Object come with this format&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;var qMatrix = layout.qHyperCube.qDataPages[0].qMatrix ;

var data =qMatrix.map(function (d) {

return {
          "dim1": d[0].qText ,
         "dim2": d[1].qText
            }
})&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;many thanks for your advice.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Enrico&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 04:13:15 GMT</pubDate>
    <dc:creator>enricocamerin</dc:creator>
    <dc:date>2024-11-16T04:13:15Z</dc:date>
    <item>
      <title>D3.js  collapsible tree diagram</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/D3-js-collapsible-tree-diagram/m-p/1641281#M11661</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to reuse a code from&amp;nbsp; 3d&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;A href="https://bl.ocks.org/d3noob/43a860bc0024792f8803bba8ca0d5ecd" target="_blank" rel="noopener"&gt;https://bl.ocks.org/d3noob/43a860bc0024792f8803bba8ca0d5ecd&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I have problem converting the treeData&amp;nbsp; Object&lt;/P&gt;&lt;P&gt;the data source format&amp;nbsp; should be like this&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="undefined"&gt;var treeData =
  {
    "name": "Top Level",
    "children": [
      { 
        "name": "Level 2: A",
        "children": [
          { "name": "Son of A" },
          { "name": "Daughter of A" }
        ]
      },
      { "name": "Level 2: B" }
    ]
  };&lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;How can I have this format reading from the hypercube ?&lt;/P&gt;&lt;P&gt;Starting with 2 dimensions the data Object come with this format&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;var qMatrix = layout.qHyperCube.qDataPages[0].qMatrix ;

var data =qMatrix.map(function (d) {

return {
          "dim1": d[0].qText ,
         "dim2": d[1].qText
            }
})&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;many thanks for your advice.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Enrico&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:13:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/D3-js-collapsible-tree-diagram/m-p/1641281#M11661</guid>
      <dc:creator>enricocamerin</dc:creator>
      <dc:date>2024-11-16T04:13:15Z</dc:date>
    </item>
  </channel>
</rss>

