function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rakshana Cube84Rakshana Cube84 

Dashboard Componet size issue on Partner community portal

Hi,

I got an issue with Dashboard component on partner community portal like size issue. Even I specified a maximum height size on the Dashboard component, it is showing up with scrollbar and dashboard bars are hided inside the component. I will need to keep scrolling to see the Dashboards. I have added screenshot below. I am hopeful in this, someone will reach out me to clarify

Dashboard with scrollbars
Thanks,
Rakshana
Saravana Muthu 8Saravana Muthu 8
Hi,

We also have the same issue for enterprise edition. I think it may be a glitch in salesforce.

If you have a community in developer edition and If you view the dashboard component Developer edition it works good.

So, Please file a case to salesforce support.

Thanks,
Saravana
Rakshana Cube84Rakshana Cube84
Saravana - Thanks for replying, we have filed a case with support team and being wait for them. Please let us know if you get any solutions

Thanks,
Rakshana 
cleveraardvarkcleveraardvark
The problem is in the component's CSS: 
<div class="dashboardTopLevelContainer desktopDashboardsDashboard" data-aura-rendered-by="32:2;a" data-aura-class="desktopDashboardsDashboard" style="height: 300px;">

The solution is to open your community builder, click on the "edit theme" button and then choose the drop-down arrow in the top-right of the theme flyout menu and "edit css." Insert the following (or whatever height value you prefer):
.desktopDashboardsDashboard {
   height: 100% !important;
}

 
grajangrajan
Yes, it is working. Thanks!
Rakshana Cube84Rakshana Cube84

Guys - Please let me explain again, we are displaying dashboard on the partner portal by using components. So it is weird to say the dashboard is showing up along with scrollbar. 

We guess it might be an issue with the template of the community or component level. But above solution was separate from this requirement.

 

Please let us know if you have any questions about this. We are hopefully about someone will help us.

Thanks,
Rakshana

cleveraardvarkcleveraardvark
Components are packed with CSS. In this case, the CSS generated by the dashboard component should read and adhere to the value set in the Community Builder component settings  but it overrides it instead with the value shown. This produces the truncated view. The workaround is to override the compnent's value for the desktopDashboardsDashboard class. You're mistaken in assuming that components are self-contained and separate from community templates. 
Saravana Muthu 8Saravana Muthu 8
Hi,

We have fixed the issue by contacting salesforce support.

Please refer this link below.

https://success.salesforce.com/issues_view?title=dashboard-lightning-component-height-is-being-set-at-incorrect-value-regardless-of-the-value-set-for-the-component&Id=a1p3A000000mDRP

Thanks,
Sarav
Sweet Potato Tec
cleveraardvarkcleveraardvark
Exactly the solution I posted the previous day, after spending hours combing through CSS. Glad it's official.