Class PivotViewConditionalFormatSetting
Configures conditional formatting for Pivot Table value cells, applying styles such as background color, font color, font family, and font size based on defined conditions.
Inheritance
Inherited Members
Namespace: Syncfusion.Blazor.PivotView
Assembly: Syncfusion.Blazor.dll
Syntax
public class PivotViewConditionalFormatSetting : PivotConditionalFormatSettings, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Constructors
PivotViewConditionalFormatSetting()
Declaration
public PivotViewConditionalFormatSetting()
Properties
Style
Gets or sets the custom styles applied to values in conditional formatting for the pivot table.
Declaration
[Parameter]
[JsonPropertyName("style")]
public PivotViewStyle Style { get; set; }
Property Value
| Type | Description |
|---|---|
| PivotViewStyle | A PivotViewStyle specifying the background color, font color, font family, and font size for conditionally formatted cells. |
Remarks
This property customizes the appearance of cells that meet conditional formatting criteria.
When set, the specified style overrides the default cell rendering for matching conditions.
The style settings include background color, text color, font family, and font size properties that are applied to cells matching the conditional format conditions.
Examples
The following example demonstrates how to apply custom styles to conditional formatting in a Pivot Table:
<SfPivotView TValue="ProductDetails" Width="800" Height="500">
<PivotViewDataSourceSettings DataSource="@data">
<!-- Configure rows, columns, values, and filters -->
</PivotViewDataSourceSettings>
<PivotViewConditionalFormatSettings>
<PivotViewConditionalFormatSetting Measure="Amount" Conditions="Condition.GreaterThan" Value1="5000">
<PivotViewStyle BackgroundColor="lightgreen" Color="darkgreen" />
</PivotViewConditionalFormatSetting>
</PivotViewConditionalFormatSettings>
</SfPivotView>
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderTreeBuilder | __builder |
Overrides
Dispose(bool)
Dispose unmanaged resources in the component.
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing |
Overrides
OnInitializedAsync()
Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree. Override this method if you will perform an asynchronous operation and want the component to refresh when that operation is completed.
Declaration
protected override Task OnInitializedAsync()
Returns
| Type | Description |
|---|---|
| Task | A System.Threading.Tasks.Task representing any asynchronous operation. |
Overrides
OnParametersSetAsync()
Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.
Declaration
protected override Task OnParametersSetAsync()
Returns
| Type | Description |
|---|---|
| Task | A System.Threading.Tasks.Task representing any asynchronous operation. |