<?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 PowerBI-JavaScript - Embed For Mobile  does not work work for dashboards in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/PowerBI-JavaScript-Embed-For-Mobile-does-not-work-work-for/m-p/1480793#M26393</link>
    <description>&lt;P&gt;I'm using&amp;nbsp;&lt;A href="https://github.com/microsoft/PowerBI-JavaScript" target="_blank" rel="noopener"&gt;PowerBI-JavaScript&lt;/A&gt;&amp;nbsp;to show dashboard mobile view on the website and it doesn't work, it is fine when I choose type: report then the MobilePortrait layout is applied but with dashboard, this layout is completely ignored and the default MobileLandscape layout is shown instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would expect that embedding mobile layout will work for reports and dashboards:&amp;nbsp;&lt;A href="https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-For-Mobile" target="_blank" rel="noopener"&gt;https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-For-Mobile&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;    var models = window['powerbi-client'].models;
    var permissions = models.Permissions.All;

    var embedConfiguration = {
        type: 'dashboard',
        tokenType: models.TokenType.Embed,
        accessToken: "&amp;lt;some token&amp;gt;",
        id: '&amp;lt;dashboard id&amp;gt;',
        embedUrl: 'https://app.powerbi.com/dashboardEmbed',
        settings: {
            layoutType: models.LayoutType.MobilePortrait
        }        
        // pageView: 'fitToWidth',
    }; 

    var embedContainer = $('#reportContainer')[0];
    report = powerbi.embed(reportContainer, embedConfiguration);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 08 Nov 2020 08:23:00 GMT</pubDate>
    <dc:creator>idelix</dc:creator>
    <dc:date>2020-11-08T08:23:00Z</dc:date>
    <item>
      <title>PowerBI-JavaScript - Embed For Mobile  does not work work for dashboards</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/PowerBI-JavaScript-Embed-For-Mobile-does-not-work-work-for/m-p/1480793#M26393</link>
      <description>&lt;P&gt;I'm using&amp;nbsp;&lt;A href="https://github.com/microsoft/PowerBI-JavaScript" target="_blank" rel="noopener"&gt;PowerBI-JavaScript&lt;/A&gt;&amp;nbsp;to show dashboard mobile view on the website and it doesn't work, it is fine when I choose type: report then the MobilePortrait layout is applied but with dashboard, this layout is completely ignored and the default MobileLandscape layout is shown instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would expect that embedding mobile layout will work for reports and dashboards:&amp;nbsp;&lt;A href="https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-For-Mobile" target="_blank" rel="noopener"&gt;https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-For-Mobile&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;    var models = window['powerbi-client'].models;
    var permissions = models.Permissions.All;

    var embedConfiguration = {
        type: 'dashboard',
        tokenType: models.TokenType.Embed,
        accessToken: "&amp;lt;some token&amp;gt;",
        id: '&amp;lt;dashboard id&amp;gt;',
        embedUrl: 'https://app.powerbi.com/dashboardEmbed',
        settings: {
            layoutType: models.LayoutType.MobilePortrait
        }        
        // pageView: 'fitToWidth',
    }; 

    var embedContainer = $('#reportContainer')[0];
    report = powerbi.embed(reportContainer, embedConfiguration);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Nov 2020 08:23:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/PowerBI-JavaScript-Embed-For-Mobile-does-not-work-work-for/m-p/1480793#M26393</guid>
      <dc:creator>idelix</dc:creator>
      <dc:date>2020-11-08T08:23:00Z</dc:date>
    </item>
  </channel>
</rss>

