Skip to content
v2.277.0

PivotTableCellConditionalFormattingProperty Struct ​

The cell conditional formatting option for a pivot table.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_quicksight as quicksight } from 'aws-cdk-lib';
const pivotTableCellConditionalFormattingProperty: quicksight.CfnAnalysis.PivotTableCellConditionalFormattingProperty = {
  fieldId: 'fieldId',

  // the properties below are optional
  scope: {
    role: 'role',
  },
  scopes: [{
    role: 'role',
  }],
  textFormat: {
    backgroundColor: {
      gradient: {
        color: {
          stops: [{
            gradientOffset: 123,

            // the properties below are optional
            color: 'color',
            dataValue: 123,
          }],
        },
        expression: 'expression',
      },
      solid: {
        expression: 'expression',

        // the properties below are optional
        color: 'color',
      },
    },
    icon: {
      customCondition: {
        expression: 'expression',
        iconOptions: {
          icon: 'icon',
          unicodeIcon: 'unicodeIcon',
        },

        // the properties below are optional
        color: 'color',
        displayConfiguration: {
          iconDisplayOption: 'iconDisplayOption',
        },
      },
      iconSet: {
        expression: 'expression',

        // the properties below are optional
        iconSetType: 'iconSetType',
      },
    },
    textColor: {
      gradient: {
        color: {
          stops: [{
            gradientOffset: 123,

            // the properties below are optional
            color: 'color',
            dataValue: 123,
          }],
        },
        expression: 'expression',
      },
      solid: {
        expression: 'expression',

        // the properties below are optional
        color: 'color',
      },
    },
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_quicksight as quicksight

pivot_table_cell_conditional_formatting_property = quicksight.CfnAnalysis.PivotTableCellConditionalFormattingProperty(
    field_id="fieldId",

    # the properties below are optional
    scope=quicksight.CfnAnalysis.PivotTableConditionalFormattingScopeProperty(
        role="role"
    ),
    scopes=[quicksight.CfnAnalysis.PivotTableConditionalFormattingScopeProperty(
        role="role"
    )],
    text_format=quicksight.CfnAnalysis.TextConditionalFormatProperty(
        background_color=quicksight.CfnAnalysis.ConditionalFormattingColorProperty(
            gradient=quicksight.CfnAnalysis.ConditionalFormattingGradientColorProperty(
                color=quicksight.CfnAnalysis.GradientColorProperty(
                    stops=[quicksight.CfnAnalysis.GradientStopProperty(
                        gradient_offset=123,

                        # the properties below are optional
                        color="color",
                        data_value=123
                    )]
                ),
                expression="expression"
            ),
            solid=quicksight.CfnAnalysis.ConditionalFormattingSolidColorProperty(
                expression="expression",

                # the properties below are optional
                color="color"
            )
        ),
        icon=quicksight.CfnAnalysis.ConditionalFormattingIconProperty(
            custom_condition=quicksight.CfnAnalysis.ConditionalFormattingCustomIconConditionProperty(
                expression="expression",
                icon_options=quicksight.CfnAnalysis.ConditionalFormattingCustomIconOptionsProperty(
                    icon="icon",
                    unicode_icon="unicodeIcon"
                ),

                # the properties below are optional
                color="color",
                display_configuration=quicksight.CfnAnalysis.ConditionalFormattingIconDisplayConfigurationProperty(
                    icon_display_option="iconDisplayOption"
                )
            ),
            icon_set=quicksight.CfnAnalysis.ConditionalFormattingIconSetProperty(
                expression="expression",

                # the properties below are optional
                icon_set_type="iconSetType"
            )
        ),
        text_color=quicksight.CfnAnalysis.ConditionalFormattingColorProperty(
            gradient=quicksight.CfnAnalysis.ConditionalFormattingGradientColorProperty(
                color=quicksight.CfnAnalysis.GradientColorProperty(
                    stops=[quicksight.CfnAnalysis.GradientStopProperty(
                        gradient_offset=123,

                        # the properties below are optional
                        color="color",
                        data_value=123
                    )]
                ),
                expression="expression"
            ),
            solid=quicksight.CfnAnalysis.ConditionalFormattingSolidColorProperty(
                expression="expression",

                # the properties below are optional
                color="color"
            )
        )
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.quicksight.*;

PivotTableCellConditionalFormattingProperty pivotTableCellConditionalFormattingProperty = PivotTableCellConditionalFormattingProperty.builder()
        .fieldId("fieldId")

        // the properties below are optional
        .scope(PivotTableConditionalFormattingScopeProperty.builder()
                .role("role")
                .build())
        .scopes(List.of(PivotTableConditionalFormattingScopeProperty.builder()
                .role("role")
                .build()))
        .textFormat(TextConditionalFormatProperty.builder()
                .backgroundColor(ConditionalFormattingColorProperty.builder()
                        .gradient(ConditionalFormattingGradientColorProperty.builder()
                                .color(GradientColorProperty.builder()
                                        .stops(List.of(GradientStopProperty.builder()
                                                .gradientOffset(123)

                                                // the properties below are optional
                                                .color("color")
                                                .dataValue(123)
                                                .build()))
                                        .build())
                                .expression("expression")
                                .build())
                        .solid(ConditionalFormattingSolidColorProperty.builder()
                                .expression("expression")

                                // the properties below are optional
                                .color("color")
                                .build())
                        .build())
                .icon(ConditionalFormattingIconProperty.builder()
                        .customCondition(ConditionalFormattingCustomIconConditionProperty.builder()
                                .expression("expression")
                                .iconOptions(ConditionalFormattingCustomIconOptionsProperty.builder()
                                        .icon("icon")
                                        .unicodeIcon("unicodeIcon")
                                        .build())

                                // the properties below are optional
                                .color("color")
                                .displayConfiguration(ConditionalFormattingIconDisplayConfigurationProperty.builder()
                                        .iconDisplayOption("iconDisplayOption")
                                        .build())
                                .build())
                        .iconSet(ConditionalFormattingIconSetProperty.builder()
                                .expression("expression")

                                // the properties below are optional
                                .iconSetType("iconSetType")
                                .build())
                        .build())
                .textColor(ConditionalFormattingColorProperty.builder()
                        .gradient(ConditionalFormattingGradientColorProperty.builder()
                                .color(GradientColorProperty.builder()
                                        .stops(List.of(GradientStopProperty.builder()
                                                .gradientOffset(123)

                                                // the properties below are optional
                                                .color("color")
                                                .dataValue(123)
                                                .build()))
                                        .build())
                                .expression("expression")
                                .build())
                        .solid(ConditionalFormattingSolidColorProperty.builder()
                                .expression("expression")

                                // the properties below are optional
                                .color("color")
                                .build())
                        .build())
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.QuickSight;

var pivotTableCellConditionalFormattingProperty = new PivotTableCellConditionalFormattingProperty {
    FieldId = "fieldId",

    // the properties below are optional
    Scope = new PivotTableConditionalFormattingScopeProperty {
        Role = "role"
    },
    Scopes = new [] { new PivotTableConditionalFormattingScopeProperty {
        Role = "role"
    } },
    TextFormat = new TextConditionalFormatProperty {
        BackgroundColor = new ConditionalFormattingColorProperty {
            Gradient = new ConditionalFormattingGradientColorProperty {
                Color = new GradientColorProperty {
                    Stops = new [] { new GradientStopProperty {
                        GradientOffset = 123,

                        // the properties below are optional
                        Color = "color",
                        DataValue = 123
                    } }
                },
                Expression = "expression"
            },
            Solid = new ConditionalFormattingSolidColorProperty {
                Expression = "expression",

                // the properties below are optional
                Color = "color"
            }
        },
        Icon = new ConditionalFormattingIconProperty {
            CustomCondition = new ConditionalFormattingCustomIconConditionProperty {
                Expression = "expression",
                IconOptions = new ConditionalFormattingCustomIconOptionsProperty {
                    Icon = "icon",
                    UnicodeIcon = "unicodeIcon"
                },

                // the properties below are optional
                Color = "color",
                DisplayConfiguration = new ConditionalFormattingIconDisplayConfigurationProperty {
                    IconDisplayOption = "iconDisplayOption"
                }
            },
            IconSet = new ConditionalFormattingIconSetProperty {
                Expression = "expression",

                // the properties below are optional
                IconSetType = "iconSetType"
            }
        },
        TextColor = new ConditionalFormattingColorProperty {
            Gradient = new ConditionalFormattingGradientColorProperty {
                Color = new GradientColorProperty {
                    Stops = new [] { new GradientStopProperty {
                        GradientOffset = 123,

                        // the properties below are optional
                        Color = "color",
                        DataValue = 123
                    } }
                },
                Expression = "expression"
            },
            Solid = new ConditionalFormattingSolidColorProperty {
                Expression = "expression",

                // the properties below are optional
                Color = "color"
            }
        }
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

pivotTableCellConditionalFormattingProperty := &PivotTableCellConditionalFormattingProperty{
	FieldId: jsii.String("fieldId"),

	// the properties below are optional
	Scope: &PivotTableConditionalFormattingScopeProperty{
		Role: jsii.String("role"),
	},
	Scopes: []interface{}{
		&PivotTableConditionalFormattingScopeProperty{
			Role: jsii.String("role"),
		},
	},
	TextFormat: &TextConditionalFormatProperty{
		BackgroundColor: &ConditionalFormattingColorProperty{
			Gradient: &ConditionalFormattingGradientColorProperty{
				Color: &GradientColorProperty{
					Stops: []interface{}{
						&GradientStopProperty{
							GradientOffset: jsii.Number(123),

							// the properties below are optional
							Color: jsii.String("color"),
							DataValue: jsii.Number(123),
						},
					},
				},
				Expression: jsii.String("expression"),
			},
			Solid: &ConditionalFormattingSolidColorProperty{
				Expression: jsii.String("expression"),

				// the properties below are optional
				Color: jsii.String("color"),
			},
		},
		Icon: &ConditionalFormattingIconProperty{
			CustomCondition: &ConditionalFormattingCustomIconConditionProperty{
				Expression: jsii.String("expression"),
				IconOptions: &ConditionalFormattingCustomIconOptionsProperty{
					Icon: jsii.String("icon"),
					UnicodeIcon: jsii.String("unicodeIcon"),
				},

				// the properties below are optional
				Color: jsii.String("color"),
				DisplayConfiguration: &ConditionalFormattingIconDisplayConfigurationProperty{
					IconDisplayOption: jsii.String("iconDisplayOption"),
				},
			},
			IconSet: &ConditionalFormattingIconSetProperty{
				Expression: jsii.String("expression"),

				// the properties below are optional
				IconSetType: jsii.String("iconSetType"),
			},
		},
		TextColor: &ConditionalFormattingColorProperty{
			Gradient: &ConditionalFormattingGradientColorProperty{
				Color: &GradientColorProperty{
					Stops: []interface{}{
						&GradientStopProperty{
							GradientOffset: jsii.Number(123),

							// the properties below are optional
							Color: jsii.String("color"),
							DataValue: jsii.Number(123),
						},
					},
				},
				Expression: jsii.String("expression"),
			},
			Solid: &ConditionalFormattingSolidColorProperty{
				Expression: jsii.String("expression"),

				// the properties below are optional
				Color: jsii.String("color"),
			},
		},
	},
}

Properties ​

fieldIdstringfield_idstrfieldIdStringFieldIdstringFieldId*stringrequired#
The field ID of the cell for conditional formatting.
scopeoptionalIResolvable | CfnAnalysis.PivotTableConditionalFormattingScopePropertyscopeoptionaltyping.Union[IResolvable, PivotTableConditionalFormattingScopeProperty]scopeoptionalIResolvableScopeoptionalIResolvableScopeoptionalinterface{}#
The scope of the cell for conditional formatting.
scopesoptionalIResolvable | IResolvable | CfnAnalysis.PivotTableConditionalFormattingScopeProperty[]scopesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, PivotTableConditionalFormattingScopeProperty]]]scopesoptionalIResolvableScopesoptionalIResolvableScopesoptionalinterface{}#
A list of cell scopes for conditional formatting.
textFormatoptionalIResolvable | CfnAnalysis.TextConditionalFormatPropertytext_formatoptionaltyping.Union[IResolvable, TextConditionalFormatProperty]textFormatoptionalIResolvableTextFormatoptionalIResolvableTextFormatoptionalinterface{}#
The text format of the cell for conditional formatting.