<?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 Trying to create a knowledge graph Map using JS Api in ArcGIS Knowledge Questions</title>
    <link>https://community.esri.com/t5/arcgis-knowledge-questions/trying-to-create-a-knowledge-graph-map-using-js/m-p/1305404#M60</link>
    <description>&lt;P&gt;Hey,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not very knowledgeable (*he*he*he) in Arcgis / Esri JS API. Basically I'am learning ArcGis knowledge and I am trying to add my knowledge Graph to a Web APP using snowpack (API&amp;nbsp;&lt;SPAN&gt;4.27.6)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;=&amp;gt; Inspired by this (&amp;nbsp;&lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-knowledge/analytics/use-a-web-app-to-visualize-a-farm-to-table-supply-chain/" target="_blank"&gt;https://www.esri.com/arcgis-blog/products/arcgis-knowledge/analytics/use-a-web-app-to-visualize-a-farm-to-table-supply-chain/&amp;nbsp;&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;So far I managed to add my Entities to a Map using the Knowledge Layer / Sublayer and a Point renderer. I have now been trying to add the relationships as lines, but this turns out to be less straight forward than I was hoping... As far as I understand this: The relationships cannot be added using a line renderer through the method I used for the points... so... get the point realtionships and coordinates and render a line?&amp;nbsp;&lt;/P&gt;&lt;P&gt;=&amp;gt; Using "MATCH q = (a)--&amp;gt;()--&amp;gt;(c) RETURN q LIMIT 1"&lt;/P&gt;&lt;P&gt;with the REST Service directory gives the Information I need (Coordinates, origin Id, destination ID etc.).... using it here:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;knowlegeGraph&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;await&lt;/SPAN&gt; &lt;SPAN&gt;knowledgeGraphService&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;fetchKnowledgeGraph&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;url&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;results&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;await&lt;/SPAN&gt; &lt;SPAN&gt;knowledgeGraphService&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;executeQuery&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;knowlegeGraph&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;openCypherQuery&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"MATCH q = (a)--&amp;gt;()--&amp;gt;(b) RETURN q LIMIT 1"&lt;/SPAN&gt;&lt;SPAN&gt;, &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;does not ?? &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The path result contains a mostly empty properties array and no spatial references... do I have to add them to my entity types manually ??&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The coordinates have to exist somewhere, I mean the points are rendered correctly, though I could not find them inside a console.log() of the sublayers either &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The data is very simple: one entity type with entities (I have generated them by placing each one on a Map in Pro), related through one type of relationship&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Is there a better way to do this? Sorry for the amateur question, would be thankfull for some clues tho!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 03 Jul 2023 19:34:36 GMT</pubDate>
    <dc:creator>DonJon</dc:creator>
    <dc:date>2023-07-03T19:34:36Z</dc:date>
    <item>
      <title>Trying to create a knowledge graph Map using JS Api</title>
      <link>https://community.esri.com/t5/arcgis-knowledge-questions/trying-to-create-a-knowledge-graph-map-using-js/m-p/1305404#M60</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not very knowledgeable (*he*he*he) in Arcgis / Esri JS API. Basically I'am learning ArcGis knowledge and I am trying to add my knowledge Graph to a Web APP using snowpack (API&amp;nbsp;&lt;SPAN&gt;4.27.6)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;=&amp;gt; Inspired by this (&amp;nbsp;&lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-knowledge/analytics/use-a-web-app-to-visualize-a-farm-to-table-supply-chain/" target="_blank"&gt;https://www.esri.com/arcgis-blog/products/arcgis-knowledge/analytics/use-a-web-app-to-visualize-a-farm-to-table-supply-chain/&amp;nbsp;&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;So far I managed to add my Entities to a Map using the Knowledge Layer / Sublayer and a Point renderer. I have now been trying to add the relationships as lines, but this turns out to be less straight forward than I was hoping... As far as I understand this: The relationships cannot be added using a line renderer through the method I used for the points... so... get the point realtionships and coordinates and render a line?&amp;nbsp;&lt;/P&gt;&lt;P&gt;=&amp;gt; Using "MATCH q = (a)--&amp;gt;()--&amp;gt;(c) RETURN q LIMIT 1"&lt;/P&gt;&lt;P&gt;with the REST Service directory gives the Information I need (Coordinates, origin Id, destination ID etc.).... using it here:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;knowlegeGraph&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;await&lt;/SPAN&gt; &lt;SPAN&gt;knowledgeGraphService&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;fetchKnowledgeGraph&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;url&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;results&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;await&lt;/SPAN&gt; &lt;SPAN&gt;knowledgeGraphService&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;executeQuery&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;knowlegeGraph&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;openCypherQuery&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"MATCH q = (a)--&amp;gt;()--&amp;gt;(b) RETURN q LIMIT 1"&lt;/SPAN&gt;&lt;SPAN&gt;, &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;does not ?? &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The path result contains a mostly empty properties array and no spatial references... do I have to add them to my entity types manually ??&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The coordinates have to exist somewhere, I mean the points are rendered correctly, though I could not find them inside a console.log() of the sublayers either &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The data is very simple: one entity type with entities (I have generated them by placing each one on a Map in Pro), related through one type of relationship&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Is there a better way to do this? Sorry for the amateur question, would be thankfull for some clues tho!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 03 Jul 2023 19:34:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-knowledge-questions/trying-to-create-a-knowledge-graph-map-using-js/m-p/1305404#M60</guid>
      <dc:creator>DonJon</dc:creator>
      <dc:date>2023-07-03T19:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a knowledge graph Map using JS Api</title>
      <link>https://community.esri.com/t5/arcgis-knowledge-questions/trying-to-create-a-knowledge-graph-map-using-js/m-p/1308592#M63</link>
      <description>&lt;P&gt;Hello, thank you for your question! Which version of ArcGIS Enterprise are you using? There were breaking changes in 11.1, so JS SDK 4.27 will only work with ArcGIS Enterprise 11.1+. This could be causing the problem you are seeing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Making an edit to this, originally I did not see that you had the layers working fine and only the query is not working.&lt;/P&gt;&lt;P&gt;You could try taking out all of the variables and direction, it may help you to just get the return you're looking for from this query: "MATCH q = ()--()--() RETURN q LIMIT 1"&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 20:05:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-knowledge-questions/trying-to-create-a-knowledge-graph-map-using-js/m-p/1308592#M63</guid>
      <dc:creator>MeganBanaski1</dc:creator>
      <dc:date>2023-07-17T20:05:24Z</dc:date>
    </item>
  </channel>
</rss>

