Series.Palette 属性

定义

获取或设置 Series 对象的调色板。Gets or sets the color palette of a Series object.

public:
 property System::Web::UI::DataVisualization::Charting::ChartColorPalette Palette { System::Web::UI::DataVisualization::Charting::ChartColorPalette get(); void set(System::Web::UI::DataVisualization::Charting::ChartColorPalette value); };
[System.ComponentModel.Bindable(true)]
public System.Web.UI.DataVisualization.Charting.ChartColorPalette Palette { get; set; }
member this.Palette : System.Web.UI.DataVisualization.Charting.ChartColorPalette with get, set
Public Property Palette As ChartColorPalette

属性值

一个 ChartColorPalette 枚举值,决定了数据系列的调色板。An ChartColorPalette enumeration value that determines the palette for the data series.

属性

注解

如果数据点本身没有分配颜色, 并且数据点所属的数据Series对象也没有分配的颜色, 则该调色板用于向数据元素自动分配颜色。A palette is used to automatically assign colors to data elements if the data points themselves do not have colors assigned to them and if the data Series object that the data points belong to also does not have an assigned color.

如果未显式指定序列或数据点颜色, 则使用的颜色取决于图表类型以及图表控件调色板或系列调色板 (如果已指定)。If no series or data point colors are explicitly specified, the colors used depend on the chart type and the Chart control palette or Series palette, if one is specified. 有关更多详细信息, 请参阅下表:See the table below for further details:

图表类型Chart Type 已使用序列调色板?Series Palette Used? 数据点显示的颜色Colors Displayed by Data Points
任何形状图 (例如饼图和圆环图)Any shape chart (for example, Pie and Doughnut charts) NoNo 从控件调色板使用的Chart第一个可用颜色。First available colors used from Chart control palette. 每个数据点一种颜色。One color per data point.
除形状图外的所有图表All charts except shape charts NoNo 控件调色板中的Chart第一个可用颜色。First available colors from Chart control palette. 每个数据系列一种颜色。One color per data series.
任何形状图 (例如饼图和圆环图)Any shape chart (for example, Pie and Doughnut charts) Yes 调色板中使用的Series第一个可用颜色。First available colors used from Series palette. 每个数据点一种颜色。One color per data point.
除形状图外的所有图表All charts except shape charts Yes 调色板中使用的Series第一个可用颜色。First available colors used from Series palette. 每个数据系列一种颜色。One color per data series.

Palette属性的优先级Palette高于根Chart对象的属性, 这与数据的显示有关。This Palette property has precedence over the Palette property of the root Chart object, with respect to the display of data.

注意:如果ChartPalette PaletteCustomColors对象的属性设置为 "无", 并且没有为相关的数据系列/数据点分配颜色, 则使用默认调色板 "BrightPastel" 或。 SeriesNOTE: If the Palette property for both the Chart and Series objects is set to None, and no color is assigned to the relevant data series/data points, the default palette "BrightPastel" or PaletteCustomColors is used.

适用于