|
<SfButton Content="Add Panel" OnClick="click"></SfButton>
<SfDashboardLayout @ref="dashboard" CellSpacing="@(new double[]{10 ,10 })" Columns="10" AllowResizing="true" AllowFloating="false">
<DashboardLayoutEvents OnResizeStop="ResizeStop" Created="created"></DashboardLayoutEvents>
<DashboardLayoutPanels>
<DashboardLayoutPanel Row="0" Col="0" SizeX="2" SizeY="2">
<HeaderTemplate><div>Circular Gauge</div></HeaderTemplate>
<ContentTemplate>
</ContentTemplate>
</DashboardLayoutPanel>
</DashboardLayoutPanels>
</SfDashboardLayout>
public void click()
{
this.dashboard.AddPanel(new PanelModel
{
SizeX = 2,
SizeY = 2,
Row = 0,
Col = 1,
Content =@<div style="height:100%; width:100%;">
<SfChart Width="100%" Height="100%">
<ChartPrimaryXAxis ValueType="Syncfusion.Blazor.Charts.ValueType.Category">
</ChartPrimaryXAxis>
<ChartSeriesCollection>
<ChartSeries DataSource="@SalesReports" XName="X" YName="Y"
Type="ChartSeriesType.Radar" DrawType="ChartDrawType.Line">
</ChartSeries>
</ChartSeriesCollection>
</SfChart>
</div>,
Header = @<div>Header Content</div>,
});
} |