Glossary Item Box
In the Chart control, colors can be used in different ways to enhance the chart's appearance, distinguish different series, point out or draw attention to data information such as averages, and more.
The Chart control includes several pre-defined color palettes that can be used to automatically set the colors for data values in a series. The pre-defined palettes are as follows:
These enumerated values are accessed through the Series class with code like the following.
' Visual Basic Me.ChartControl1.Series(0).ColorPalette = Chart.ColorPalette.Iceburg
// C# this.ChartControl1.Series[0].ColorPalette = DataDynamics.ActiveReports.Chart. ColorPalette.Iceburg;
Gradients can be used in object backdrops to enhance the visual appearance of various chart items. Gradients can be used in the following chart sections:
You can set gradients for a backdrop at run time by creating a BackdropItem, setting its Style property to Gradient, setting the GradientType, and setting the two colors to use for the gradient as shown in the following example.
' Visual Basic Dim bItem As New DataDynamics.ActiveReports.Chart.BackdropItem bItem.Style = Chart.Graphics.BackdropStyle.Gradient bItem.Gradient = Chart.Graphics.GradientType.Vertical bItem.Color = Color.Purple bItem.Color2 = Color.White Me.ChartControl1.Backdrop = bItem
// C# DataDynamics.ActiveReports.Chart.BackdropItem bItem = new DataDynamics.ActiveReports. Chart.BackdropItem(); bItem.Style = Chart.Graphics.BackdropStyle.Gradient; bItem.Gradient = GradientType.Vertical; bItem.Color = Color.Purple; bItem.Color2 = Color.White; this.ChartControl1.Backdrop = bItem;
Copyright © 2004-2005 Data Dynamics, Ltd. All rights reserved.