21.2 (EAP/Beta)
21.1
20.2
20.1
19.2
19.1
18.2
18.1
17.2
You are viewing help content for pre-release software. This document and the features it describes are subject to change. Switch to the current version.

SeriesPoint.Values Property

Gets or sets the point’s data value(s).

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v21.2.dll

Declaration

public double[] Values { get; set; }

Property Value

Type Description
Double[]

An array of floating-point values that represent the data value(s) of the series data point.

Remarks

Each data point is defined by the values of two coordinates - X and Y - when speaking about most series types.

The X coordinate value of a point represents the point’s argument and is specified by the SeriesPoint.Argument property.

As for a point’s Y coordinate, it can be defined by one or more Y values. Most series types use one Y value, except for some other types (e.g. financial series such as the candle stick and stock series) where one data point can be defined by multiple Y values (for instance, four values are required to plot a stock point: high, low, open and close). Such a Y value(s) represents the value(s) of the data point. These values are stored within an array which can be accessed and customized via the Values property.

The individual value of a data point can be manipulated via the Values property using indexer notation (see the SeriesPoint.Item property). The length of the data values array can be obtained via the SeriesPoint.Length property.

Example

This example demonstrates how to add a custom item to the legend.

The following code adds a custom legend item with an image and text.

private void Form1_Load(object sender, EventArgs e) {
double total = CalculateTotal(chartControl.Series[0]);

CustomLegendItem customLegendItem = new CustomLegendItem();
customLegendItem.MarkerImage.Image = new Bitmap("..\\..\\Images\\sum-icon.png");
customLegendItem.MarkerImageSizeMode = ChartImageSizeMode.Zoom;
customLegendItem.Text = string.Format("Total: \${0}M", total);