TCustomChartLegend.TextStyle
TCustomChartLegend
property TextStyle: TLegendTextStyle;
Unit
Chart
Description
Default Value: ltsLeftValue
The TextStyle property stipulates how TCustomChart.Legend text items are formatted.
- ltsPlain shows the point TChartSeries.XLabel only.
- ltsLeftValue shows the point Value and the point Label.
- ltsRightValue shows the point Label and the point Value.
- ltsLeftPercent shows the percent the point represents and the point Label.
- ltsRightPercent shows the point Label and the percent the points represent.
- ltsXValue shows the point's X value. It applies only to Series with X (horizontal) values.
Values are pre-formatted using the Series TChartSeries.ValueFormat property. Percents are pre-formatted using the Series TChartSeries.PercentFormat property.
You can also use the TChart.TCustomChart.OnGetLegendText event to supply customized Legend texts.
Example
These are examples of different Legend's TextStyle values:
ltsPlain Summer
ltsLeftValue 1234 Summer
ltsRightValue Summer 1234
ltsLeftPercent 5.1 % Summer
ltsRightPercent Summer 5.1 %
**ltsXValue 4321
**Applies only to Series with X values. See TChartSeries TChartSeries.AddXY method.