Skip to content
v2.277.0

TextConditionalFormatProperty Struct ​

The conditional formatting for the text.

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 textConditionalFormatProperty: quicksight.CfnTemplate.TextConditionalFormatProperty = {
  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

text_conditional_format_property = 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"
        )
    )
)
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.*;

TextConditionalFormatProperty textConditionalFormatProperty = 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();
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 textConditionalFormatProperty = 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"

textConditionalFormatProperty := &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 ​

backgroundColoroptionalIResolvable | CfnTemplate.ConditionalFormattingColorPropertybackground_coloroptionaltyping.Union[IResolvable, ConditionalFormattingColorProperty]backgroundColoroptionalIResolvableBackgroundColoroptionalIResolvableBackgroundColoroptionalinterface{}#
The conditional formatting for the text background color.
iconoptionalIResolvable | CfnTemplate.ConditionalFormattingIconPropertyiconoptionaltyping.Union[IResolvable, ConditionalFormattingIconProperty]iconoptionalIResolvableIconoptionalIResolvableIconoptionalinterface{}#
The conditional formatting for the icon.
textColoroptionalIResolvable | CfnTemplate.ConditionalFormattingColorPropertytext_coloroptionaltyping.Union[IResolvable, ConditionalFormattingColorProperty]textColoroptionalIResolvableTextColoroptionalIResolvableTextColoroptionalinterface{}#
The conditional formatting for the text color.