vcl-404410-expresscharts-tutorials-line-view-tutorial-vcl-charts-line-view-tutorial-series-appearance-customization.md
The previous step explained how to bind created line series to data.
This step details how to display value markers and labels, customize line appearance, and change legend pane position.
The Chart control offers multiple options that can enhance diagram readability. For example, you can display markers and labels for series values.
Double-click the Chart control to invoke the Chart Designer dialog if it is closed. Select the PopualtionEurope series.
Expand View and Markers nodes for the selected series in the Object Inspector and set the Visible property to True to display value markers.
Value markers are visible for the PopulationEurope series as a result.
Expand the View.ValueLabels node in the Object Inspector and set the Visible property to True to display value labels.
Value labels complement value markers for the PopulationEurope series.
You can increase the default line width as you see fit. Expand View.Appearance and StrokeOptions nodes, and set the Width property to 2 to increase line width.
The resulting line width better matches the current value marker size.
Display value labels and markers for PopulationAmericas and PopulationAfrica series and increase their line width the same way you did for PopulationEurope.
The Chart control can display series captions in a legend pane at the chart (default) or diagram level. In the latter case, the legend pane is positioned within the diagram area. You can move series between chart and diagram legend panes individually.
Select the PopulationEurope series in the Chart Designer dialog and set the ShowInLegend property to TdxChartSeriesShowInLegend.Diagram.
As a result, the Chart control displays a legend pane with one series within the diagram area.
Set the ShowInLegend property to TdxChartSeriesShowInLegend.Diagram for PopulationAmericas and PopulationAfrica series to move their captions to the diagram legend pane.
The diagram legend pane with the default appearance settings blends with the diagram background and partially overlaps a series line. You can display a border for the legend pane and move it within the diagram area.
To display a border for the diagram legend pane, follow the steps below:
True:The diagram legend pane displays a border but still overlaps the PopulationAfrica series line.
To move the legend pane to the upper-left diagram corner, set the Legend.AlignmentHorz property to TdxChartLegendAlignment.Near.
As a result, the legend pane no longer overlaps series lines.
To minimize value label overlapping, you can resize the form and adjust value label positions.
Set the form’s Width and Height properties to 900 and 650, respectively.
You can use View.ValueLabels.LineLength and View.ValueLabels.TextAlignment properties of a line series to adjust value label positions to minimize overlapping:
0.5.7.The Chart control displays three line series with value markers and labels. The legend pane in the upper-left diagram corner lists series captions together with the corresponding colored value markers.
The next step describes how to add optional visual chart elements and customize general chart appearance settings to make diagrams more readable.
See Also
VCL Charts: Line View Tutorial Overview