Forum Discussion
nitin_sp
8 years agoRegular Visitor
Report Embed in Phone Layout shows only middle part
Hi, I am trying to use the mobile embed layout as explained here; https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-For-Mobile Here is my config settings looks like for embed; ...
v-micsh-msft
8 years agoMicrosoft Employee
The Layout have two values for the Mobile, make sure you configured it as MobilePortrait.
Code example:
var embedConfiguration = {
type: 'report',
id: '5dac7a4a-4452-46b3-99f6-a25915e0fe55',
embedUrl: 'https://app.powerbi.com/reportEmbed',
tokenType: models.TokenType.Embed,
accessToken: 'h4...rf',
settings: {
layoutType: models.LayoutType.MobilePortrait
}
};Regards,
Michael
nitin_sp
8 years agoRegular Visitor
Hi Michael,
Yes i do change the layout using following code;
if (util.is.mobilePortrait()) {
if (data.hasMobilePortraitLayout) {
config.settings.layoutType = models.LayoutType.MobilePortrait;
config.pageView = "oneColumn";
}
}
That code also executes before
powerbi.embed(reportContainer, config);
I also thought pageView might help but it doesnt. So I tried with and without page view but no luck.
Seems some bug with embed API?