<?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: Any Documentation for Custom Sort in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Any-Documentation-for-Custom-Sort/m-p/796478#M2571</link>
    <description>&lt;P&gt;No worries, &lt;SPAN&gt;I appreciate the clarification and quick response.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/112988"&gt;@v-evelk&lt;/a&gt;&amp;nbsp;might be able to shed some light in this area.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Sep 2019 03:52:52 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-09-19T03:52:52Z</dc:date>
    <item>
      <title>Any Documentation for Custom Sort</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Any-Documentation-for-Custom-Sort/m-p/796382#M2567</link>
      <description>&lt;P&gt;&lt;A href="https://microsoft.github.io/PowerBI-visuals/docs/how-to-guide/sorting/#custom-sorting" target="_blank"&gt;https://microsoft.github.io/PowerBI-visuals/docs/how-to-guide/sorting/#custom-sorting&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So there appears to be documentation for default and implicit sort, but nothing for custom sorting. Are there any examples I can look at.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 01:14:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Any-Documentation-for-Custom-Sort/m-p/796382#M2567</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-19T01:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Any Documentation for Custom Sort</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Any-Documentation-for-Custom-Sort/m-p/796419#M2568</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&lt;/P&gt;&lt;P&gt;I have a custom visual that sorts by various statistics, so I've added an object to my &lt;FONT face="courier new,courier"&gt;capabilities.json&lt;/FONT&gt;&amp;nbsp;to let the user select how they want to sort and then manage the sorting of the resolved view model in my code based on these values.&lt;/P&gt;&lt;P&gt;The visual's codebase is pretty expansive but I'm happy to point you in the right direction if you want to review my implementation:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT face="courier new,courier"&gt;capabilities.json&lt;/FONT&gt; - &lt;A href="https://bitbucket.org/dm-p/power-bi-visuals-violin-plot/src/a83d709080931c12604ba872120fff874dc8283f/capabilities.json#lines-197" target="_self"&gt;where the property menu and objects are declared&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="courier new,courier"&gt;viewModelHandler.ts&lt;/FONT&gt; - &lt;A href="https://bitbucket.org/dm-p/power-bi-visuals-violin-plot/src/a83d709080931c12604ba872120fff874dc8283f/src/viewModelHandler.ts#lines-412" target="_self"&gt;where I check the setting and sort the view model according to user preferences&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Note that in my &lt;FONT face="courier new,courier"&gt;capabilities.json&lt;/FONT&gt;, I'm actually using &lt;FONT face="courier new,courier"&gt;implicit&lt;/FONT&gt; sorting, and it looks like I forgot to set it to &lt;FONT face="courier new,courier"&gt;custom&lt;/FONT&gt; when I added in the sorting functionality that's there now. It's just forcing the &lt;FONT face="courier new,courier"&gt;dataViewMapping&lt;/FONT&gt; to sort by category when the data comes across from the data model and it subsequently doesn't get used like this due to the overrides detailed above anyway.&lt;/P&gt;&lt;P&gt;According to the &lt;A href="https://github.com/microsoft/powerbi-visuals-api/blob/master/schema.capabilities.json#L807" target="_self"&gt;validation schema for &lt;FONT face="courier new,courier"&gt;capabilities.json&lt;/FONT&gt;&lt;/A&gt;, you would just set this up as follows (much like &lt;FONT face="courier new,courier"&gt;default&lt;/FONT&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;"sorting" : {
    "custom": { }
}&lt;/PRE&gt;&lt;P&gt;Both &lt;FONT face="courier new,courier"&gt;implicit&lt;/FONT&gt; or &lt;FONT face="courier new,courier"&gt;custom&lt;/FONT&gt; sorting will disable the sort options in the visual header.&lt;/P&gt;&lt;P&gt;I hope that this helps you out!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 02:30:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Any-Documentation-for-Custom-Sort/m-p/796419#M2568</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2019-09-19T02:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Any Documentation for Custom Sort</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Any-Documentation-for-Custom-Sort/m-p/796445#M2569</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397"&gt;@dm-p&lt;/a&gt;&amp;nbsp;, thanks for the informative reply, I really appreciate it. The examples you gave were very interesting and illuminating.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just have a small question. I've noticed that you are using a dataReductionAlgorithm of Top - 30,000 which will load the first 30,000 values.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hypothetically, if I have a dataset with 50,000 values and I implement a custom sort like this. Will it sort only the first 30,000 values or will it sort through all 50,000 values, then return the top 30,000?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for your detailed reply.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 02:59:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Any-Documentation-for-Custom-Sort/m-p/796445#M2569</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-19T02:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Any Documentation for Custom Sort</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Any-Documentation-for-Custom-Sort/m-p/796472#M2570</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;No probs! There's not many of us that do custom visuals on here so I try to jump in where I can.&lt;/P&gt;&lt;P&gt;I believe that anything managed in code with respect to sorting will have to work post-data load from Power BI, as you can't work on the &lt;FONT face="courier new,courier"&gt;dataViewMapping&lt;/FONT&gt; until the data comes across from the data model and it's populated.&lt;/P&gt;&lt;P&gt;We might need guidance from&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/112988"&gt;@v-evelk&lt;/a&gt; or someone else from the team around the specifics on this one as anything I can offer would be wild speculation, I'm afraid.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;FONT size="2"&gt;But if you did want my speculation, I'd hazard a guess at just getting the top N rows that Power BI decides to provide, and something in my brain is nagging at me as to why I used &lt;FONT face="courier new,courier"&gt;implicit&lt;/FONT&gt; sorting here. There appears to &lt;A href="https://bitbucket.org/dm-p/power-bi-visuals-violin-plot/commits/b94f04b578a29a5788b3d0552015de314353c937" target="_self"&gt;have been a conscious decision to have done it&lt;/A&gt;, from looking back at my commit history. I'd further speculate that I probably wanted to make sure that if we had multiple categories, that we ensured at least some of them would be fully loaded in if we sorted the data this way. A good lesson here for improving quality of my commit messages to describe 'why' rather than 'what'...&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 03:32:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Any-Documentation-for-Custom-Sort/m-p/796472#M2570</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2019-09-19T03:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: Any Documentation for Custom Sort</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Any-Documentation-for-Custom-Sort/m-p/796478#M2571</link>
      <description>&lt;P&gt;No worries, &lt;SPAN&gt;I appreciate the clarification and quick response.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/112988"&gt;@v-evelk&lt;/a&gt;&amp;nbsp;might be able to shed some light in this area.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 03:52:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Any-Documentation-for-Custom-Sort/m-p/796478#M2571</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-19T03:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: Any Documentation for Custom Sort</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Any-Documentation-for-Custom-Sort/m-p/796661#M2572</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are no limits to use your own sorting algorithm&amp;nbsp;within your visual. Set in the &lt;FONT face="courier new,courier"&gt;capabilities.json&lt;/FONT&gt; sorting to '&lt;FONT face="courier new,courier"&gt;custom&lt;/FONT&gt;' and there will no sorting option the the visual menu.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And if you are retrieve multiple data segments with size defined via the&amp;nbsp;&lt;FONT face="courier new,courier"&gt;dataReductionAlgorithm&lt;/FONT&gt; property&amp;nbsp; (via &lt;FONT face="courier new,courier"&gt;fetchMoreData()&lt;/FONT&gt; -&amp;nbsp;&lt;A href="https://microsoft.github.io/PowerBI-visuals/api/references/fetchmoredata/" target="_blank"&gt;https://microsoft.github.io/PowerBI-visuals/api/references/fetchmoredata/&lt;/A&gt;) users expect &lt;STRONG&gt;all&lt;/STRONG&gt; the data to be sorted by the visual, so use your sorting algorithm&amp;nbsp;for the complete dataview.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-JP&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 07:49:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Any-Documentation-for-Custom-Sort/m-p/796661#M2572</guid>
      <dc:creator>jppp</dc:creator>
      <dc:date>2019-09-19T07:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: Any Documentation for Custom Sort</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Any-Documentation-for-Custom-Sort/m-p/796668#M2573</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just realized I got some code examples of &lt;FONT face="courier new,courier"&gt;fetchMoreData()&lt;/FONT&gt; and custom sorting:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;fetchMoreData:&amp;nbsp;&lt;A href="https://github.com/liprec/powerbi-boxWhiskerChart/blob/8f21307825b5ca68f8e4aaaa6eb0fd371654f12d/src/boxWhiskerChart.ts#L600" target="_self"&gt;https://github.com/liprec/powerbi-boxWhiskerChart/blob/8f21307825b5ca68f8e4aaaa6eb0fd371654f12d/src/boxWhiskerChart.ts#L600&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;custom sort:&amp;nbsp;&lt;A href="https://github.com/liprec/powerbi-boxWhiskerChart/blob/8f21307825b5ca68f8e4aaaa6eb0fd371654f12d/src/boxWhiskerChart.ts#L283" target="_self"&gt;https://github.com/liprec/powerbi-boxWhiskerChart/blob/8f21307825b5ca68f8e4aaaa6eb0fd371654f12d/src/boxWhiskerChart.ts#L283&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Technicly the visual waits untill no data segments are available any more before parsing/converting the dataView.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-JP&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 07:57:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Any-Documentation-for-Custom-Sort/m-p/796668#M2573</guid>
      <dc:creator>jppp</dc:creator>
      <dc:date>2019-09-19T07:57:32Z</dc:date>
    </item>
  </channel>
</rss>

