Dundas Chart for Windows Forms
SelectionColor Property
See Also  Example Send comments on this topic.
DundasWinChart Assembly > Dundas.Charting.WinControl Namespace > Cursor Class : SelectionColor Property


Gets or sets a semi-transparent color that highlights a range of data.
Chart area range selection color.

Syntax

Visual Basic (Declaration)  
Public Property SelectionColor As Color
Visual Basic (Usage) Copy Code
Dim instance As Cursor
Dim value As Color
 
instance.SelectionColor = value
 
value = instance.SelectionColor
C#  
public Color SelectionColor {get; set;}

Return Value

A Color value representing the color of the highlighted range. Defaults to LightGray, with an alpha value of 120.

Example

C# Copy Code
using Dundas.Charting.WinControl;
...
chart1.ChartAreas(
"Default").CursorX.SelectionColor = Color.Red;
chart1.ChartAreas(
"Default").CursorY.SelectionColor = Color.Blue;
Visual Basic Copy Code
Imports Dundas.Charting.WinControl
...
chart1.ChartAreas("Default").CursorX.SelectionColor = Color.Red
chart1.ChartAreas("Default").CursorY.SelectionColor = Color.Blue

Remarks

This property determines the color of the range selection, and can be set to any valid ARGB value.  If an alpha value is not provided (which determines the level of transparency) then a default alpha value of 120 is used.

The selected color can be set for both the X and Y axis cursors (implemented via the ChartArea object's CursorX and CursorY properties, respectively).  If a range is only selected along the X axis then the CursorX.SelectionColor value is used, and if a range is only selected along the Y axis then the CursorY.SelectionColor value is used.  If a range is selected along both axes then the CursorY.SelectionColor value is used for the selected color.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2009 All Rights Reserved.