Skip to main content
A newer version of this page is available. .

VCL Charts: Line View Tutorial. Step 1. Create Line Series

  • 3 minutes to read

This step describes how to add a VCL Chart control, create XY line series, and apply a skin to the project at design time.

VCL Chart Control: Line View Tutorial. Step 1 - Three Empty Line Series

Add a Chart Control to the Form

Drag a VCL Chart control (TdxChartControl) from the Tool Palette onto the form. Set the control’s Align property to alClient in the Object Inspector to allow the control to occupy the form’s client area.

VCL Chart Control: Line View Tutorial. Step 1 - Add a Chart Control

Add and Configure a Skin Controller

The Skin Controller allows you to select a theme (a skin) for your application. The selected theme applies consistent look & feel across all DevExpress controls as well as standard forms.

Make sure that support for DevExpress skins is enabled for the application project. Click the Project group in the main menu of your RAD Studio® IDE and select Modify Skin Options to invoke the Project Skin Options Editor.

VCL Chart Control: Line View Tutorial. Step 1 - Project Skin Options Editor

Check Enable skin support if it is unchecked and click OK to close the Project Skin Options Editor dialog.

Add a Skin Controller to the Form

Drag a TdxSkinController component from the Tool Palette onto the form.

VCL Chart Control: Line View Tutorial. Step 1 - Add a Skin Controller

Apply a Skin

Make sure that the Skin Controller is selected. Set the NativeStyle property to False in the Object Inspector because the native (operating system-dependent) look & feel style has priority over skins and built-in basic styles.

VCL Chart Control: Line View Tutorial. Step 1 - Disable Native Style

Select a skin in the SkinName combo box in the Object Inspector.

VCL Chart Control: Line View Tutorial. Step 1 - Select any Available Skin

For example, you can select the vector skin named Basic.

VCL Chart Control: Line View Tutorial. Step 1 - Select the Basic Skin

Vector skins are recommended for high-resolution environments because vector skin elements are SVG images that DevExpress controls can render at any target monitor DPI without quality losses.

Select a Color Scheme

Each vector skin ships with a set of dark and light color schemes (color palettes). You can use the SkinPaletteName property to switch between color schemes available for the currently selected vector skin.

VCL Chart Control: Line View Tutorial. Step 1 - Select any Available Color Scheme

For example, you can select the color scheme named Blue Dark.

VCL Chart Control: Line View Tutorial. Step 1 - Select the Blue Dark Color Scheme

VCL Chart Control: Line View Tutorial. Step 1 - Black Chart Background

Create an XY Diagram

The Chart control can contain one or more panes called diagrams where you can display and manage series. To display line series, you need to create an XY diagram first.

Right-click the Chart control and select the Add XY-Diagram context menu item to create an empty diagram.

VCL Chart Control: Line View Tutorial. Step 1 - The Design-Time Context Menu

An empty XY diagram has the axis of arguments (X-Axis) and the axis of values (Y-Axis) that form a two-dimensional Cartesian coordinate system.

VCL Chart Control: Line View Tutorial. Step 1 - An Empty XY Diagram

Create Line Series

To create a line series, right-click the Chart control and select Add Line Series.

VCL Chart Control: Line View Tutorial. Step 1 - Add a Line Series

The newly created empty series is displayed in the Chart control’s legend pane to the right of the diagram area.

VCL Chart Control: Line View Tutorial. Step 1 - An Empty Line Series

Create two more line series in the same manner.

Result

The Chart control contains three empty series and displays their default names in the legend pane to the right of the diagram area.

VCL Chart Control: Line View Tutorial. Step 1 - Three Empty Line Series

Next Step

The next step describes how to bind created series to data.

See Also