SeriesPoint.Values Property
Gets or sets the point’s data value(s).
Namespace: DevExpress.XtraCharts
Assembly: DevExpress.XtraCharts.v24.2.dll
NuGet Package: DevExpress.Charts
#Declaration
#Property Value
Type | Description |
---|---|
Double[] | An array of floating-point values that represent the data value |
#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 legend item to a legend.
Create a CustomLegendItem object and add it to the CustomItems collection. Use the following properties to configure the custom item:
- CustomLegendItem.MarkerImage
- Returns the custom legend item’s marker image.
- CustomLegendItem.Text
- Gets or sets the text the custom legend item displays.
To show custom and automatically generated legend items, set the LegendBase.ItemVisibilityMode to AutoGeneratedAndCustom
.
using DevExpress.Drawing;
using DevExpress.XtraCharts;
using System;
using System.IO;
using System.Windows.Forms;
namespace CustomLegendItemSample {
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e) {
#region #CustomLegendItems
// Create a new custom item.
CustomLegendItem item = new CustomLegendItem();
chart.Legend.CustomItems.Add(item);
// Specify its text and marker.
item.Text = "Custom Legend Item";
FileStream outfile = new FileStream("Image\\DXLogo_16x16.png", FileMode.Open);
DXImage image = DXImage.FromStream(outfile);
item.MarkerImage.DXImage = image;
// Set a value indicating that both autogenerated and custom items are displayed.
chart.Legend.ItemVisibilityMode = LegendItemVisibilityMode.AutoGeneratedAndCustom;
#endregion #CustomLegendItems
}
}
}
#Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Values property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.