Chart.ApplyPaletteColors 方法
定义
设置自动分配的系列和数据点颜色,以允许在运行时以编程方式进行访问。Sets the automatically assigned series and data point colors, to allow programmatic access at run time.
public:
void ApplyPaletteColors();
public void ApplyPaletteColors ();
member this.ApplyPaletteColors : unit -> unit
Public Sub ApplyPaletteColors ()
注解
如果在 Chart 运行时自动分配了颜色,则没有办法知道呈现图表之前的颜色,此时 Color 将返回自动分配的值的 "属性" Empty 。When the Chart colors are automatically assigned at run time, there is no way to know what the colors will be prior to the time when the chart rendered; the Color property of an automatically assigned value will return Empty at this time.
如果调用 ApplyPaletteColors 方法,将设置序列和数据点的颜色,这允许以编程方式进行访问。If you call the ApplyPaletteColors method, the colors for the series and the data points will be set, which allows for programmatic access.