Skip to content
v2.277.0

PivotTableConditionalFormattingOptionProperty Struct ​

Conditional formatting options for a PivotTableVisual .

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 pivotTableConditionalFormattingOptionProperty: quicksight.CfnAnalysis.PivotTableConditionalFormattingOptionProperty = {
  cell: {
    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_conditional_formatting_option_property = quicksight.CfnAnalysis.PivotTableConditionalFormattingOptionProperty(
    cell=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.*;

PivotTableConditionalFormattingOptionProperty pivotTableConditionalFormattingOptionProperty = PivotTableConditionalFormattingOptionProperty.builder()
        .cell(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())
        .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 pivotTableConditionalFormattingOptionProperty = new PivotTableConditionalFormattingOptionProperty {
    Cell = 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"

pivotTableConditionalFormattingOptionProperty := &PivotTableConditionalFormattingOptionProperty{
	Cell: &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 ​

The cell conditional formatting option for a pivot table.