ChartControl.AppearanceName Property

Gets or sets the name of the appearance which is currently being used to draw the chart elements.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v20.1.UI.dll

Declaration

public string AppearanceName { get; set; }
Public Property AppearanceName As String

Property Value

Type Description
String

A String value that is the appearance name.

Remarks

To get the full list of currently available appearances within the ChartControl, refer to the ChartControl.GetAppearanceNames method description.

NOTE

When the AppearanceName property is set to a non-default value (for instance to "Nature Colors"), the look and feel settings provided by the ChartControl.LookAndFeel property do not affect the chart control's appearance.

Examples

This example demonstrates how to customize a chart's appearance at runtime, via the ChartControl.AppearanceName, ChartControl.PaletteName and ChartControl.PaletteBaseColorNumber properties.

Note that you can define a separate palette for painting all indicators available in your chart, via the ChartControl.IndicatorsPaletteName property.

using System;
using System.Windows.Forms;
using DevExpress.XtraCharts;
// ...
private void Form1_Load(object sender, EventArgs e) {
    // Create an empty chart.
    ChartControl barChart = new ChartControl();

    // Create a series and add points to it.
    Series series1 = new Series("Bar Series", ViewType.Bar);
    series1.Points.Add(new SeriesPoint("A", new double[] { 10 }));
    series1.Points.Add(new SeriesPoint("B", new double[] { 12 }));
    series1.Points.Add(new SeriesPoint("C", new double[] { 14 }));
    series1.Points.Add(new SeriesPoint("D", new double[] { 17 }));

    // Create an indicator (e.g. Regression Line),
    // and add it to the series' collection.
    RegressionLine myLine = new RegressionLine(ValueLevel.Value);
    ((SideBySideBarSeriesView)series1.View).Indicators.Add(myLine);

    // Add the series to the chart.
    barChart.Series.Add(series1);

    // Define the chart's appearance and palette.
    barChart.AppearanceName = "Dark";
    barChart.PaletteName = "Opulent";
    barChart.PaletteBaseColorNumber = 5;

    // Define a separate palette for the chart's indicators.
    barChart.IndicatorsPaletteName = "Default";

    // Add the chart to the form.
    barChart.Dock = DockStyle.Fill;
    this.Controls.Add(barChart);
}
See Also