<?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: QlikSense .Net SDK: Retrieve chart dimensions and measure information in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/QlikSense-Net-SDK-Retrieve-chart-dimensions-and-measure/m-p/1419265#M8772</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually I am new to QlikSense, so I've a very little understanding of Hypercubes. But based on what I read, all the dimensions and measures that are created in the visuals will be in hypercube.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've gone through some public examples given in the Qlik website and able to get the dimensions and measures of the charts using the below piece of code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/184293_Capture.JPG" style="height: 278px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;I am calling the Print method with the required parameters. &lt;/P&gt;&lt;P&gt;Print(thePieChart.Properties.HyperCubeDef, thePieChart.Title, app);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it the best way? Also how can I retrieve other properties like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Bar chart - color properties (which color mode is used)&lt;/LI&gt;&lt;LI&gt;Bar chart layout - Vertical or Horizontal&lt;/LI&gt;&lt;LI&gt;Sorting - Asc or Desc.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Nov 2017 04:17:24 GMT</pubDate>
    <dc:creator>naveenbalanagu</dc:creator>
    <dc:date>2017-11-23T04:17:24Z</dc:date>
    <item>
      <title>QlikSense .Net SDK: Retrieve chart dimensions and measure information</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/QlikSense-Net-SDK-Retrieve-chart-dimensions-and-measure/m-p/1419262#M8769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to retrieve the following information of any type of visuals in .Net SDK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if there is a bar chart, I would like to retrieve&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Bar chart measure - SUM(something), AVG(something), COUNT(something) etc.&lt;/LI&gt;&lt;LI&gt;Bar chart dimension - Field used to apply the measure&lt;/LI&gt;&lt;LI&gt;Bar chart - color properties (which color mode is used)&lt;/LI&gt;&lt;LI&gt;Bar chart layout - Vertical or Horizontal&lt;/LI&gt;&lt;LI&gt;Sorting - Asc or Desc.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I am trying to retrieve measure and dimension information using DimensionInfo and MeasureInfo properties. But those are returning the object details instead of the actual values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Measures and Dimensions are not defined in Hyper cube in my case. I am able to retrieve the data in the chart using DataPages.First().Matrix.ToDictionary(row =&amp;gt; row.ElementAt(0).Text, row =&amp;gt; row.ElementAt(1).Num) but need the above mentioned additional properties as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Nov 2017 07:19:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/QlikSense-Net-SDK-Retrieve-chart-dimensions-and-measure/m-p/1419262#M8769</guid>
      <dc:creator>naveenbalanagu</dc:creator>
      <dc:date>2017-11-19T07:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: QlikSense .Net SDK: Retrieve chart dimensions and measure information</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/QlikSense-Net-SDK-Retrieve-chart-dimensions-and-measure/m-p/1419263#M8770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It sounds to me like your bar chart uses master measures and dimensions, so you need to lookup the id used for referencing them in the hypercube and look up the corresponding definitions among the master objects. So once you have you've gotten the ID from the hypercube, you can get a dimension object from the app using this method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.qlik.com/en-US/sense-developer/September2017/apis/net%20sdk/html/M_Qlik_Engine_IApp_GetGenericDimension.htm" title="http://help.qlik.com/en-US/sense-developer/September2017/apis/net%20sdk/html/M_Qlik_Engine_IApp_GetGenericDimension.htm"&gt;IApp.GetGenericDimension Method&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you have used this method, you can inspect the properties of the returned object to find the definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might also want to have a look at these two methods for accessing the lists of all master measures and dimensions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.qlik.com/en-US/sense-developer/September2017/apis/net%20sdk/html/M_Qlik_Sense_Client_AppExtensions_GetDimensionList.htm" title="http://help.qlik.com/en-US/sense-developer/September2017/apis/net%20sdk/html/M_Qlik_Sense_Client_AppExtensions_GetDimensionList.htm"&gt;AppExtensions.GetDimensionList Method&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.qlik.com/en-US/sense-developer/September2017/apis/net%20sdk/html/M_Qlik_Sense_Client_AppExtensions_GetMeasureList.htm" title="http://help.qlik.com/en-US/sense-developer/September2017/apis/net%20sdk/html/M_Qlik_Sense_Client_AppExtensions_GetMeasureList.htm"&gt;AppExtensions.GetMeasureList Method&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you have those list objects you can access the information from the layout like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15112589801614747 jive_text_macro" jivemacro_uid="_15112589801614747" modifiedtitle="true"&gt;
&lt;P&gt;var layout = await list.GetLayoutAsync();&lt;/P&gt;
&lt;P&gt;var listItems = layout.As&amp;lt;DimensionListLayout&amp;gt;().DimensionList.Items;&lt;/P&gt;
&lt;P&gt;var allMasterDimensionIds = listItems.Select(container =&amp;gt; container.Info.Id);&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2017 10:16:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/QlikSense-Net-SDK-Retrieve-chart-dimensions-and-measure/m-p/1419263#M8770</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2017-11-21T10:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: QlikSense .Net SDK: Retrieve chart dimensions and measure information</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/QlikSense-Net-SDK-Retrieve-chart-dimensions-and-measure/m-p/1419264#M8771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also, I can highly recommend this tool:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-17475"&gt;Qlik Explorer for Developers is here!&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's very useful for inspecting what the properties and layout structures of Qlik Sense objects are.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2017 10:18:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/QlikSense-Net-SDK-Retrieve-chart-dimensions-and-measure/m-p/1419264#M8771</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2017-11-21T10:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: QlikSense .Net SDK: Retrieve chart dimensions and measure information</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/QlikSense-Net-SDK-Retrieve-chart-dimensions-and-measure/m-p/1419265#M8772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually I am new to QlikSense, so I've a very little understanding of Hypercubes. But based on what I read, all the dimensions and measures that are created in the visuals will be in hypercube.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've gone through some public examples given in the Qlik website and able to get the dimensions and measures of the charts using the below piece of code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/184293_Capture.JPG" style="height: 278px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;I am calling the Print method with the required parameters. &lt;/P&gt;&lt;P&gt;Print(thePieChart.Properties.HyperCubeDef, thePieChart.Title, app);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it the best way? Also how can I retrieve other properties like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Bar chart - color properties (which color mode is used)&lt;/LI&gt;&lt;LI&gt;Bar chart layout - Vertical or Horizontal&lt;/LI&gt;&lt;LI&gt;Sorting - Asc or Desc.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2017 04:17:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/QlikSense-Net-SDK-Retrieve-chart-dimensions-and-measure/m-p/1419265#M8772</guid>
      <dc:creator>naveenbalanagu</dc:creator>
      <dc:date>2017-11-23T04:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: QlikSense .Net SDK: Retrieve chart dimensions and measure information</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/QlikSense-Net-SDK-Retrieve-chart-dimensions-and-measure/m-p/1419266#M8773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I have this installed. It is really useful to understand the structure of the visuals and hierarchy of different properties. Thank you for sharing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2017 04:18:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/QlikSense-Net-SDK-Retrieve-chart-dimensions-and-measure/m-p/1419266#M8773</guid>
      <dc:creator>naveenbalanagu</dc:creator>
      <dc:date>2017-11-23T04:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: QlikSense .Net SDK: Retrieve chart dimensions and measure information</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/QlikSense-Net-SDK-Retrieve-chart-dimensions-and-measure/m-p/1419267#M8774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A hypercube is the main structure for used by Qlik Sense for handling filtering of data. A list object is sort of a special case hypercube with just one dimension and no measures.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To look at the details of properties used explicitly for bar charts, you need to inspect the client specific properties for that type of visualization. This example gives a high level view of how to do that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/AptkQlik/PublicExamples/tree/master/AppTraverser" title="https://github.com/AptkQlik/PublicExamples/tree/master/AppTraverser"&gt;PublicExamples/AppTraverser at master · AptkQlik/PublicExamples · GitHub&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In particular, have a look at the type switch used in the last method in this file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/AptkQlik/PublicExamples/blob/master/AppTraverser/Traversing.cs" title="https://github.com/AptkQlik/PublicExamples/blob/master/AppTraverser/Traversing.cs"&gt;PublicExamples/Traversing.cs at master · AptkQlik/PublicExamples · GitHub&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a generic object is a bar chart, then you can access its properties like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_1511428090808468 jive_text_macro" jivemacro_uid="_1511428090808468" modifiedtitle="true"&gt;
&lt;P&gt;var barChart = theGenericObject as Barchart;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And once you have done that you can access it's definition through the "Properties" property. So to inspect the color definition, you could for instance do like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_15114281639013871" jivemacro_uid="_15114281639013871" modifiedtitle="true"&gt;
&lt;P&gt;var color = barChart.Properties.Color;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might want to check out this class that encapsulates the bar chart properties: &lt;A href="http://help.qlik.com/en-US/sense-developer/September2017/apis/net%20sdk/html/T_Qlik_Sense_Client_Visualizations_BarchartProperties.htm" title="http://help.qlik.com/en-US/sense-developer/September2017/apis/net%20sdk/html/T_Qlik_Sense_Client_Visualizations_BarchartProperties.htm"&gt;BarchartProperties Class&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The vertical/horizontal behavior can similarly be inspected through the "Orientation" property of BarchartProperties, but the sorting order is a concept used by the hypercube, so you have to go all the way into the definitions of the individual dimensions to inspect sort configurations.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2017 09:16:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/QlikSense-Net-SDK-Retrieve-chart-dimensions-and-measure/m-p/1419267#M8774</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2017-11-23T09:16:43Z</dc:date>
    </item>
  </channel>
</rss>

