Skip to content

928536: To update code snippets for Blazor Pivot Table UG documentation(Section-2) #6249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: hotfix/hotfix-v30.1.37
Choose a base branch
from
29 changes: 14 additions & 15 deletions blazor/pivot-table/data-binding.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,25 +267,25 @@ In the meantime, the CSV data from the local *. csv file type can also be connec
@using System.IO;
@using System.Net;

<SfPivotView TValue="string[]" Width="1500" Height="300">
<SfPivotView TValue="string[]" Width="800" Height="300">
<PivotViewDataSourceSettings TValue="string[]" DataSource="@dataSource" ExpandAll=false EnableSorting=true Type=DataSourceType.CSV>
<PivotViewColumns>
<PivotViewColumn Name="Item Type"></PivotViewColumn>
<PivotViewColumn Name="Sales Channel"></PivotViewColumn>
<PivotViewColumn Name="ItemType"></PivotViewColumn>
<PivotViewColumn Name="SalesChannel"></PivotViewColumn>
</PivotViewColumns>
<PivotViewRows>
<PivotViewRow Name="Region"></PivotViewRow>
<PivotViewRow Name="Country"></PivotViewRow>
</PivotViewRows>
<PivotViewValues>
<PivotViewValue Name="Total Cost"></PivotViewValue>
<PivotViewValue Name="Total Revenue"></PivotViewValue>
<PivotViewValue Name="Total Profit"></PivotViewValue>
<PivotViewValue Name="TotalCost"></PivotViewValue>
<PivotViewValue Name="TotalRevenue"></PivotViewValue>
<PivotViewValue Name="TotalProfit"></PivotViewValue>
</PivotViewValues>
<PivotViewFormatSettings>
<PivotViewFormatSetting Name="Total Cost" Format="C0" UseGrouping=true></PivotViewFormatSetting>
<PivotViewFormatSetting Name="Total Revenue" Format="C0" UseGrouping=true></PivotViewFormatSetting>
<PivotViewFormatSetting Name="Total Profit" Format="C0" UseGrouping=true></PivotViewFormatSetting>
<PivotViewFormatSetting Name="TotalCost" Format="C0" UseGrouping=true></PivotViewFormatSetting>
<PivotViewFormatSetting Name="TotalRevenue" Format="C0" UseGrouping=true></PivotViewFormatSetting>
<PivotViewFormatSetting Name="TotalProfit" Format="C0" UseGrouping=true></PivotViewFormatSetting>
</PivotViewFormatSettings>
</PivotViewDataSourceSettings>
<PivotViewGridSettings ColumnWidth="120"></PivotViewGridSettings>
Expand Down Expand Up @@ -385,11 +385,10 @@ OData is a standardized protocol for creating and consuming data. User can retri
@using Syncfusion.Blazor.PivotView
@using Syncfusion.Blazor.Data

<SfPivotView TValue="OrderDetails" Width="800" Height="340">
<SfPivotView TValue="OrderDetails" Width="800" Height="340" ShowFieldList="true">
<PivotViewDataSourceSettings TValue="OrderDetails">
<SfDataManager Url="https://js.syncfusion.com/ejServices/Wcf/Northwind.svc/Orders" Adaptor="Syncfusion.Blazor.Adaptors.ODataAdaptor"></SfDataManager>
<SfDataManager Url="https://services.odata.org/Northwind/Northwind.svc/Orders" Adaptor="Syncfusion.Blazor.Adaptors.ODataAdaptor"></SfDataManager>
<PivotViewColumns>
<PivotViewColumn Name="OrderDate"></PivotViewColumn>
<PivotViewColumn Name="ShipCity"></PivotViewColumn>
</PivotViewColumns>
<PivotViewRows>
Expand All @@ -399,10 +398,10 @@ OData is a standardized protocol for creating and consuming data. User can retri
<PivotViewValues>
<PivotViewValue Name="Freight"></PivotViewValue>
</PivotViewValues>
</PivotViewDataSourceSettings>
</PivotViewDataSourceSettings>
</SfPivotView>

@code{
@code {
public class OrderDetails
{
public int OrderID { get; set; }
Expand Down Expand Up @@ -1185,7 +1184,7 @@ The event [OnLoad](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Pivot
<PivotViewValue Name="Amount" Caption="Sold Amount"></PivotViewValue>
</PivotViewValues>
<PivotViewFormatSettings>
<PivotViewFormatSetting Name="Amount" Format="C"></PivotViewFormatSetting>
<PivotViewFormatSetting Name="Amount" Format="C0"></PivotViewFormatSetting>
</PivotViewFormatSettings>
<PivotViewEvents TValue="ProductDetails" OnLoad="load"></PivotViewEvents>
</PivotViewDataSourceSettings>
Expand Down
31 changes: 27 additions & 4 deletions blazor/pivot-table/filtering.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ This will help to avoid performance lags when opening a member editor whose hier

@using Syncfusion.Blazor.PivotView

<SfPivotView TValue="ProductDetails" Width="800" Height="350" LoadOnDemandInMemberEditor="true">
<SfPivotView TValue="ProductDetails" Width="800" Height="350" LoadOnDemandInMemberEditor="true" ShowFieldList="true">
<PivotViewDataSourceSettings TValue="ProductDetails" ProviderType="ProviderType.SSAS" Catalog="Adventure Works DW 2008 SE" Cube="Adventure Works" Url="https://bi.syncfusion.com/olap/msmdpump.dll" LocaleIdentifier="1033" EnableSorting="true">
<PivotViewColumns>
<PivotViewColumn Name="[Product].[Product Categories]" Caption="Product Category"></PivotViewColumn>
Expand All @@ -202,6 +202,17 @@ This will help to avoid performance lags when opening a member editor whose hier
}
</style>

@code {
public class ProductDetails
{
public int Sold { get; set; }
public double Amount { get; set; }
public string Country { get; set; }
public string Products { get; set; }
public string Year { get; set; }
public string Quarter { get; set; }
}
}
```

![On-Demand Loading in Blazor PivotTable](images/blazor-pivottable-on-demand-load.png)
Expand All @@ -227,7 +238,7 @@ Allows user to load the members on the basis of the level number set in the [Lev

@using Syncfusion.Blazor.PivotView

<SfPivotView TValue="ProductDetails" Width="800" Height="350" >
<SfPivotView TValue="ProductDetails" Width="800" Height="350" ShowFieldList="true">
<PivotViewDataSourceSettings TValue="ProductDetails" ProviderType="ProviderType.SSAS" Catalog="Adventure Works DW 2008 SE" Cube="Adventure Works" Url="https://bi.syncfusion.com/olap/msmdpump.dll" LocaleIdentifier="1033" EnableSorting="true">
<PivotViewColumns>
<PivotViewColumn Name="[Product].[Product Categories]" Caption="Product Category"></PivotViewColumn>
Expand All @@ -241,8 +252,8 @@ Allows user to load the members on the basis of the level number set in the [Lev
<PivotViewValue Name="[Measures].[Internet Sales Amount]" Caption="Internet Sales Amount"></PivotViewValue>
</PivotViewValues>
<PivotViewFilterSettings>
        <PivotViewFilterSetting Name="[Customer].[Customer Geography]" Type=FilterType.Exclude Items="@(new string[] { '[Customer].[Customer Geography].[State-Province].&[NSW]&[AU]' })" LevelCount="2"></PivotViewFilterSetting>
    </PivotViewFilterSettings>
<PivotViewFilterSetting Name="[Customer].[Customer Geography]" Type=FilterType.Exclude Items="@(new string[] { "[Customer].[Customer Geography].[State-Province].&[NSW]&[AU]" })" LevelCount="2"></PivotViewFilterSetting>
</PivotViewFilterSettings>
</PivotViewDataSourceSettings>
<PivotViewGridSettings ColumnWidth="160"></PivotViewGridSettings>
</SfPivotView>
Expand All @@ -252,6 +263,18 @@ Allows user to load the members on the basis of the level number set in the [Lev
}
</style>

@code {
public class ProductDetails
{
public int Sold { get; set; }
public double Amount { get; set; }
public string Country { get; set; }
public string Products { get; set; }
public string Year { get; set; }
public string Quarter { get; set; }
}
}

```

![Loading Member based on Level Count in Blazor PivotTable](images/blazor-pivottable-load-member-based-on-level.png)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ In the following example, the [OnRender](https://help.syncfusion.com/cr/blazor/S
var element = document.getElementById(ID);
var cellElement = document.elementFromPoint(left, top);
if (cellElement) {
var colIndex = Number(cellElement.getAttribute('aria-colindex'));
var colIndex = Number(cellElement.getAttribute('aria-colindex')) - 1;
var rowIndex = Number(cellElement.getAttribute('index'));
}
var cellInfo = {};
Expand Down
Binary file modified blazor/pivot-table/images/blazor-pivotchart-custom-axis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blazor/pivot-table/images/blazor-pivottable-csv-data-binding.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blazor/pivot-table/images/blazor-server-side-demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blazor/pivot-table/images/blazor-server-side-with-csv-data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blazor/pivot-table/images/blazor-server-side-with-json-data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion blazor/pivot-table/olap.md
Original file line number Diff line number Diff line change
Expand Up @@ -751,8 +751,9 @@ N> The [Roles](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.PivotView
```cshtml

@using Syncfusion.Blazor.PivotView
@using System.Dynamic

<SfPivotView TValue="ExpandoObject" Width="800" Height="350" >
<SfPivotView TValue="ExpandoObject" Width="800" Height="350">
<PivotViewDataSourceSettings TValue="ExpandoObject" ProviderType="ProviderType.SSAS" Catalog="Adventure Works DW 2008 SE" Cube="Adventure Works" Url="https://bi.syncfusion.com/olap/msmdpump.dll" Roles="Role1" LocaleIdentifier="1033" EnableSorting="true">
<PivotViewColumns>
<PivotViewColumn Name="[Product].[Product Categories]" Caption="Product Category"></PivotViewColumn>
Expand All @@ -772,6 +773,9 @@ N> The [Roles](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.PivotView
</PivotViewDataSourceSettings>
<PivotViewGridSettings ColumnWidth="120"></PivotViewGridSettings>
</SfPivotView>
@code {
//other codes here...
}

```

Expand Down
6 changes: 6 additions & 0 deletions blazor/pivot-table/pdf-export.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ N> This support is applicable only when the virtual scrolling is enabled.
}
```

Additionally, we recommend configuring the maximum incoming SignalR message size in your **Program.cs** file, as shown in the code snippet below. This configuration helps ensure smooth handling of large data operations, especially when exporting data from the Pivot Table component

```csharp
builder.Services.AddServerSideBlazor().AddHubOptions(options => { options.MaximumReceiveMessageSize = 1024 * 128; });
```

## To add header and footer while exporting

You can customize text, page number, line, page size and changing orientation in header and footer of the exported document.
Expand Down
2 changes: 1 addition & 1 deletion blazor/pivot-table/pivot-chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,7 @@ N> Axis customization is not applicable for the accumulation chart types like pi
<PivotViewDisplayOption View=View.Chart></PivotViewDisplayOption>
<PivotChartSettings Title="Sales Analysis">
<PivotChartSeries Type=ChartSeriesType.Column></PivotChartSeries>
<PivotChartPrimaryYAxis Title="Y Axis Title" LabelFormat="P" LabelPosition="PivotChartAxisPosition.Outside">
<PivotChartPrimaryYAxis Title="Y Axis Title" LabelPosition="PivotChartAxisPosition.Outside">
</PivotChartPrimaryYAxis>
<PivotChartPrimaryXAxis Title="X Axis Title" IsInversed="true" LabelPosition="PivotChartAxisPosition.Outside">
</PivotChartPrimaryXAxis>
Expand Down
31 changes: 17 additions & 14 deletions blazor/pivot-table/row-and-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,21 +239,24 @@ N> By default, the column resizing option is enabled.
```cshtml
@using Syncfusion.Blazor.PivotView

<SfPivotView TValue="ProductDetails">
<SfPivotView TValue="ProductDetails" Width="800">
<PivotViewDataSourceSettings DataSource="@data">
     <PivotViewColumns>
            <PivotViewColumn Name="Year"></PivotViewColumn>
            <PivotViewColumn Name="Quarter"></PivotViewColumn>
        </PivotViewColumns>
        <PivotViewRows>
            <PivotViewRow Name="Country"></PivotViewRow>
            <PivotViewRow Name="Products"></PivotViewRow>
        </PivotViewRows>
        <PivotViewValues>
            <PivotViewValue Name="Amount" Caption="Sold Amount"></PivotViewValue>
        </PivotViewValues>
    </PivotViewDataSourceSettings>
<PivotViewGridSettings AllowResizing="true"></PivotViewGridSettings>
<PivotViewColumns>
<PivotViewColumn Name="Year"></PivotViewColumn>
<PivotViewColumn Name="Quarter"></PivotViewColumn>
</PivotViewColumns>
<PivotViewRows>
<PivotViewRow Name="Country"></PivotViewRow>
<PivotViewRow Name="Products"></PivotViewRow>
</PivotViewRows>
<PivotViewValues>
<PivotViewValue Name="Amount" Caption="Sold Amount"></PivotViewValue>
</PivotViewValues>
<PivotViewFormatSettings>
<PivotViewFormatSetting Name="Amount" Format="C0"></PivotViewFormatSetting>
</PivotViewFormatSettings>
</PivotViewDataSourceSettings>
<PivotViewGridSettings AllowResizing="true"></PivotViewGridSettings>
</SfPivotView>

@code{
Expand Down