Skip to main content
A newer version of this page is available. .
All docs
V21.2

LineEmptyPointOptions Class

Contains empty point options for line series views and their descendants.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v21.2.dll

NuGet Package: DevExpress.Charts

Declaration

public class LineEmptyPointOptions :
    EmptyPointOptions

The following members return LineEmptyPointOptions objects:

Remarks

The LineEmptyPointOptions class contains the LineStyle property that specifies line drawing options. These options are used to draw line segments that contain empty points.

Refer to the following help topic for more information: Empty Points.

Example

How to: Display Line Chart Empty Points

This example shows how to customize display options for empty points of a line series view.

This chart displays series with empty points.

Cast the EmptyPointOptions property to the LineEmptyPointOptions type to access a line series’ empty point settings.

Specify the ProcessPoints property to define how the chart handles empty points. In this example, the chart calculates mock values for empty points.

using DevExpress.XtraCharts;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;

namespace EmptyPointRepsentation {
    public partial class Form1 : Form {
        ChartControl chart { get { return chartControl1; } }
        public Form1() {
            InitializeComponent();

            chart.DataSource = WeatherDataProvider.Data;
            Series series = new Series("Wind", ViewType.Line);
            series.SetDataMembers("Date", "Wind");
            chart.Series.Add(series);

            LineSeriesView view = (LineSeriesView)series.View;
            view.MarkerVisibility = DevExpress.Utils.DefaultBoolean.True;
            LineEmptyPointOptions lineEmptyPointOptions = view.EmptyPointOptions;
            lineEmptyPointOptions.ProcessPoints = ProcessEmptyPointsMode.Interpolate;
            lineEmptyPointOptions.Color = Color.DarkGray;
            lineEmptyPointOptions.LineStyle.DashStyle = DashStyle.Dash;
            lineEmptyPointOptions.LineStyle.Thickness = 2;

        }
    }

    public static class WeatherDataProvider {
        static List<WeatherPoint> data;

        public static List<WeatherPoint> Data {
            get {
                if (data == null)
                    InitCollection();
                return data;
            }
        }
        static void InitCollection() {
            data = new List<WeatherPoint>();
            int lastYear = DateTime.Now.Year - 1;
            data.Add(new WeatherPoint() { Date = new DateTime(lastYear, 7, 10) });
            data.Add(new WeatherPoint() { Date = new DateTime(lastYear, 7, 11), Wind = 5 });
            data.Add(new WeatherPoint() { Date = new DateTime(lastYear, 7, 12), Wind = 5 });
            data.Add(new WeatherPoint() { Date = new DateTime(lastYear, 7, 13), Wind = 6 });
            data.Add(new WeatherPoint() { Date = new DateTime(lastYear, 7, 14), Wind = 3 });
            data.Add(new WeatherPoint() { Date = new DateTime(lastYear, 7, 15) });
            data.Add(new WeatherPoint() { Date = new DateTime(lastYear, 7, 16), Wind = 6 });
            data.Add(new WeatherPoint() { Date = new DateTime(lastYear, 7, 17), Wind = 5 });
            data.Add(new WeatherPoint() { Date = new DateTime(lastYear, 7, 18), Wind = 5 });
            data.Add(new WeatherPoint() { Date = new DateTime(lastYear, 7, 19), Wind = 4 });
            data.Add(new WeatherPoint() { Date = new DateTime(lastYear, 7, 20), Wind = 3 });
            data.Add(new WeatherPoint() { Date = new DateTime(lastYear, 7, 21), Wind = 7 });
            data.Add(new WeatherPoint() { Date = new DateTime(lastYear, 7, 22), Wind = 2 });
            data.Add(new WeatherPoint() { Date = new DateTime(lastYear, 7, 23) });
            data.Add(new WeatherPoint() { Date = new DateTime(lastYear, 7, 24) });
            data.Add(new WeatherPoint() { Date = new DateTime(lastYear, 7, 25), Wind = 4 });
            data.Add(new WeatherPoint() { Date = new DateTime(lastYear, 7, 26), Wind = 5 });
            data.Add(new WeatherPoint() { Date = new DateTime(lastYear, 7, 27), Wind = 4 });
            data.Add(new WeatherPoint() { Date = new DateTime(lastYear, 7, 28), Wind = 4 });
        }

        public class WeatherPoint {
            public DateTime Date { get; set; }
            public double? Wind { get; set; }
        }
    }
}

Inheritance

See Also