TdxChartCustomLegend.MaxWidthPercent Property
Specifies the maximum legend pane width, as a percentage of the parent diagram or Chart control width.
Declaration
property MaxWidthPercent: Single read; write;
Property Value
| Type | Description |
|---|---|
| Single | The maximum legend pane width, as a percentage of the parent diagram or Chart control width. The property value can be within the range between |
Remarks
Use MaxWidthPercent and MaxHeightPercent properties to limit maximum legend pane dimensions.
Property Value Examples
| Value | Example[1] |
|---|---|
100 (default)[2] |
![]() |
50[3] |
![]() |
Property Setter Behavior
The MaxWidthPercent property setter limits an assigned value with the range between 0 and 100.
Default Value
The MaxWidthPercent property’s default value is the DefaultMaxSizePercent typed constant.
-
This example demonstrates different
MaxWidthPercentproperty values on the same legend pane under the following conditions:- The Direction property is set to TdxChartLegendDirection.LeftToRight.
- The AlignmentHorz property is set to TdxChartLegendAlignment.Center.
- The AlignmentVert property is set to TdxChartLegendAlignment.Near.
-
The legend pane is populated with items from left to right row by row. When the
MaxWidthPercentproperty is set to100, the legend pane can occupy the entire parent diagram or Chart control by width. The resulting legend pane layout consists of four columns. -
The legend pane is populated with items from left to right row by row. When the
MaxWidthPercentproperty is set to50, the legend pane can occupy only a half of the parent diagram or Chart control by width. The resulting legend pane layout consists of two columns because the width is limited.

