We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Anyway to resize panels in Dashboard Layout component

Anyway to resize panels in Dashboard Layout component ? I tried the following :


<EjsDashboardLayout @ref="DashboardObj" CellSpacing="@(new double[]{10 ,10 })" CellAspectRatio="1" Columns="3">
    <DashboardLayoutEvents Created="@onCreate"></DashboardLayoutEvents>
    <DashboardLayoutPanels>
            <DashboardLayoutPanel SizeX="1" SizeY="1">
                <ContentTemplate><div>3</div></ContentTemplate>
            </DashboardLayoutPanel>
        </DashboardLayoutPanels>
</EjsDashboardLayout>


    y = new PanelModel()
                {
                    Content = "<img src=\"data:image/png;base64,"+ stringo+"\">" , 
                    SizeX = .1, 
                    SizeY = .1
                };

but didn't work , it always shows the default panel size even if i try a small size < 1 , is there anything like defining 100px for the height and width ?

1 Reply

PK Prem Kumar Madhan Raj Syncfusion Team November 4, 2019 01:31 PM UTC

Hi Waleed, 

Thanks for contacting Syncfusion Support. 

We have checked with your query and would like to let you know that we can’t set the value less than 1 for SizeX and SizeY values of the panels. We would like to let you know that the Dashboard layout component is a grid structured layout that renders based on the parent element’s dimensions (height and width). The columns property is used to define the number of cells per row which split the parent element width into equal halves based on number of columns (for eg. if parent element width is 600px and column value is 3, each panel will have 200px width and 200px of height). So we suggest you to adjust the number of columns in the dashboard layout component to achieve you requirement at your end. 

Please check the below documentation link for further details. 


Regards, 

Prem Kumar M 


Loader.
Up arrow icon