Hi,
I try achive auto resize content dashboard elements like charts but:
- After resize any of dashboard elements chart1 (SFChart) disapear.
- Auto resize of chart2 (SFStockChart) not working.
In code I'm handle OnResizeStop event, and use extra style for e-chart.
<style>
.e-chart {
width: inherit !important;
height: inherit !important;
}
.e-accumulationchart {
width: inherit !important;
height: inherit !important;
}
</style>
<SfDashboardLayout @ref="dashboardObject" AllowFloating="true" AllowResizing="true" Columns="5">
<DashboardLayoutEvents OnResizeStop="onResizeStop"></DashboardLayoutEvents>
<DashboardLayoutPanels>
<DashboardLayoutPanel Id="one" Column="0" Row="0">
<HeaderTemplate>Panel 1</HeaderTemplate>
<ContentTemplate>
<div style="height:100%; width:100%">
<SfChart @ref="chart1" Title="AAPL Stock Price">
</SfChart>
</div>
</ContentTemplate>
</DashboardLayoutPanel>
<DashboardLayoutPanel Id="three" Row="0" Column="1" SizeX=2 SizeY=2>
<HeaderTemplate>Panel 3</HeaderTemplate>
<ContentTemplate>
<div style="height:100%; width:100%">
<SfStockChart @ref="chart2" Title="AAPL Stock Price">
</SfStockChart>
</div>
</ContentTemplate>
</DashboardLayoutPanel>
</DashboardLayoutPanels>
</SfDashboardLayout>
@code {
SfDashboardLayout? dashboardObject;
SfChart? chart1;
SfStockChart? chart2;
void onResizeStop()
{
chart1?.RefreshAsync();
chart2?.Refresh();
}
}
Attachment:
Index_b8b8b744.zip