Skip to content
v2.277.0

TableConditionalFormattingProperty Struct ​

The conditional formatting 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 tableConditionalFormattingProperty: quicksight.CfnTemplate.TableConditionalFormattingProperty = {
  conditionalFormattingOptions: [{
    cell: {
      fieldId: 'fieldId',

      // the properties below are optional
      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',
          },
        },
      },
    },
    row: {
      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',
        },
      },
      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

table_conditional_formatting_property = quicksight.CfnTemplate.TableConditionalFormattingProperty(
    conditional_formatting_options=[quicksight.CfnTemplate.TableConditionalFormattingOptionProperty(
        cell=quicksight.CfnTemplate.TableCellConditionalFormattingProperty(
            field_id="fieldId",

            # the properties below are optional
            text_format=quicksight.CfnTemplate.TextConditionalFormatProperty(
                background_color=quicksight.CfnTemplate.ConditionalFormattingColorProperty(
                    gradient=quicksight.CfnTemplate.ConditionalFormattingGradientColorProperty(
                        color=quicksight.CfnTemplate.GradientColorProperty(
                            stops=[quicksight.CfnTemplate.GradientStopProperty(
                                gradient_offset=123,

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

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

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

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

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

                        # the properties below are optional
                        color="color"
                    )
                )
            )
        ),
        row=quicksight.CfnTemplate.TableRowConditionalFormattingProperty(
            background_color=quicksight.CfnTemplate.ConditionalFormattingColorProperty(
                gradient=quicksight.CfnTemplate.ConditionalFormattingGradientColorProperty(
                    color=quicksight.CfnTemplate.GradientColorProperty(
                        stops=[quicksight.CfnTemplate.GradientStopProperty(
                            gradient_offset=123,

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

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

                            # the properties below are optional
                            color="color",
                            data_value=123
                        )]
                    ),
                    expression="expression"
                ),
                solid=quicksight.CfnTemplate.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.*;

TableConditionalFormattingProperty tableConditionalFormattingProperty = TableConditionalFormattingProperty.builder()
        .conditionalFormattingOptions(List.of(TableConditionalFormattingOptionProperty.builder()
                .cell(TableCellConditionalFormattingProperty.builder()
                        .fieldId("fieldId")

                        // the properties below are optional
                        .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())
                .row(TableRowConditionalFormattingProperty.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())
                        .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 tableConditionalFormattingProperty = new TableConditionalFormattingProperty {
    ConditionalFormattingOptions = new [] { new TableConditionalFormattingOptionProperty {
        Cell = new TableCellConditionalFormattingProperty {
            FieldId = "fieldId",

            // the properties below are optional
            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"
                    }
                }
            }
        },
        Row = new TableRowConditionalFormattingProperty {
            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"
                }
            },
            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"

tableConditionalFormattingProperty := &TableConditionalFormattingProperty{
	ConditionalFormattingOptions: []interface{}{
		&TableConditionalFormattingOptionProperty{
			Cell: &TableCellConditionalFormattingProperty{
				FieldId: jsii.String("fieldId"),

				// the properties below are optional
				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"),
						},
					},
				},
			},
			Row: &TableRowConditionalFormattingProperty{
				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"),
					},
				},
				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 ​

conditionalFormattingOptionsoptionalIResolvable | IResolvable | CfnTemplate.TableConditionalFormattingOptionProperty[]conditional_formatting_optionsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, TableConditionalFormattingOptionProperty]]]conditionalFormattingOptionsoptionalIResolvableConditionalFormattingOptionsoptionalIResolvableConditionalFormattingOptionsoptionalinterface{}#
Conditional formatting options for a `PivotTableVisual` .