Contenuto principale

mlreportgen.chart.ShapeFormat Class

Namespace: mlreportgen.chart

Specify the properties of chart shape

Since R2026b

Description

Use an object of the mlreportgen.chart.ShapeFormat class to specify the properties of a chart shape.

The mlreportgen.chart.ShapeFormat class is a handle class.

Class Attributes

HandleCompatible
true
ConstructOnLoad
true

For information on class attributes, see Class Attributes.

Creation

Description

shapeFormatObj = mlreportgen.chart.ShapeFormat creates an empty shape format object.

shapeFormatObj = mlreportgen.chart.ShapeFormat(fillColor) creates an mlreportgen.chart.ShapeFormat object and sets the Fill property to an mlreportgen.chart.SolidFill object with the Color property set to fillColor.

shapeFormatObj = mlreportgen.chart.ShapeFormat(fillColor,borderColor) also sets the Border property to an mlreportgen.chart.Border object with the Color property set to borderColor.

Input Arguments

expand all

Fill color of the chart shape, specified as one of the formats in the table.

FormatValue
CSS color nameSpecify a CSS color name. For a list of CSS color names, see https://www.w3.org/wiki/CSS/Properties/color/keywords.
Hexadecimal RGB valueUse the format "#RRGGBB". Use # as the first character and two-digit hexadecimal numbers for the red, green, and blue values. You can use uppercase or lowercase letters.
Decimal RGB color valueUse the format "rgb(r,g,b)", where r, g, and b are comma-separated positive integers that specify the red, green, and blue values, respectively. Each value range must be between 0 and 255.
Decimal percent RGB color valueSpecify a row vector of three positive numerical values. The digits specify the red, green, and blue values. Each value must be between 0 and 1.

Example: "red" specifies a red color using a CSS color name.

Example: "#0000ff" specifies a blue color using a hexadecimal RGB value.

Example: "rgb(128,0,128)" specifies a purple color using a decimal RGB color value. specifies the color blue

Example: [0 1 0] specifies a green color using a decimal percent RGB color value.

Border color of the chart shape, specified as one of the formats in the table.

FormatValue
CSS color nameSpecify a CSS color name. For a list of CSS color names, see https://www.w3.org/wiki/CSS/Properties/color/keywords.
Hexadecimal RGB valueUse the format "#RRGGBB". Use # as the first character and two-digit hexadecimal numbers for the red, green, and blue values. You can use uppercase or lowercase letters.
Decimal RGB color valueUse the format "rgb(r,g,b)", where r, g, and b are comma-separated positive integers that specify the red, green, and blue values, respectively. Each value range must be between 0 and 255.
Decimal percent RGB color valueSpecify a row vector of three positive numerical values. The digits specify the red, green, and blue values. Each value must be between 0 and 1.

Example: "red" specifies a red color using a CSS color name.

Example: "#0000ff" specifies a blue color using a hexadecimal RGB value.

Example: "rgb(128,0,128)" specifies a purple color using a decimal RGB color value.

Example: [0.5 0 0.5] specifies a purple color using a decimal percent RGB color value.

Properties

expand all

Border applied to the chart shape, specified as an mlreportgen.chart.Border object.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Fill applied to the chart shape, specified as an object of these fill classes:

  • mlreportgen.chart.SolidFill

  • mlreportgen.chart.GradientFill

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Effects applied to the chart shape, specified as a vector of these effect objects:

  • mlreportgen.chart.GlowEffect

  • mlreportgen.chart.ShadowEffect

  • mlreportgen.chart.SoftEdgesEffect

  • mlreportgen.chart.ThreeDEffect

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Version History

Introduced in R2026b