System - Windows.Forms - DataVisualization.Charting Namespace
System - Windows.Forms - DataVisualization.Charting Namespace
System.Windows.Forms.DataVisualization.Charting
Annotation
Alignment
AllowAnchorMoving
AllowMoving
AllowPathEditing
AllowResizing
AllowSelecting
AllowTextEditing
AnchorAlignment
AnchorDataPoint
AnchorDataPointName
AnchorOffsetX
AnchorOffsetY
AnchorX
AnchorY
Annotation
AnnotationGroup
AnnotationType
AxisX
AxisXName
AxisY
AxisYName
BackColor
BackGradientStyle
BackHatchStyle
BackSecondaryColor
BeginPlacement
Bottom
BringToFront
ClipToChartArea
Dispose
EndPlacement
Font
ForeColor
Height
IsSelected
IsSizeAlwaysRelative
LineColor
LineDashStyle
LineWidth
Name
ResizeToContent
Right
SendToBack
SetAnchor
ShadowColor
ShadowOffset
SmartLabelStyle
TextStyle
ToolTip
Visible
Width
X
Y
YAxisName
AnnotationCollection
FindByName
AnnotationGroup
Alignment
AllowAnchorMoving
AllowMoving
AllowPathEditing
AllowResizing
AllowSelecting
AllowTextEditing
AnnotationGroup
Annotations
AnnotationType
BackColor
BackGradientStyle
BackHatchStyle
BackSecondaryColor
ClipToChartArea
Dispose
Font
ForeColor
IsSelected
IsSizeAlwaysRelative
LineColor
LineDashStyle
LineWidth
ShadowColor
ShadowOffset
TextStyle
Visible
AnnotationPathPoint
AnnotationPathPoint
Name
PointType
X
Y
AnnotationPathPointCollection
AnnotationPathPointCollection
AnnotationPathPointCollection
Dispose
Invalidate
AnnotationPositionChangingEventArgs
Annotation
AnnotationPositionChangingEventArgs
NewAnchorLocation
NewAnchorLocationX
NewAnchorLocationY
NewLocationX
NewLocationY
NewPosition
NewSizeHeight
NewSizeWidth
AnnotationSmartLabelStyle
AnnotationSmartLabelStyle
CalloutBackColor
CalloutLineAnchorCapStyle
CalloutLineColor
CalloutLineDashStyle
CalloutLineWidth
CalloutStyle
AnovaResult
AnovaResult
DegreeOfFreedomBetweenGroups
DegreeOfFreedomTotal
DegreeOfFreedomWithinGroups
FCriticalValue
FRatio
MeanSquareVarianceBetweenGroups
MeanSquareVarianceWithinGroups
SumOfSquaresBetweenGroups
SumOfSquaresTotal
SumOfSquaresWithinGroups
AntiAliasingStyles
AreaAlignmentOrientations
AreaAlignmentStyles
ArrowAnnotation
AnchorAlignment
AnnotationType
ArrowAnnotation
ArrowSize
ArrowStyle
ArrowStyle
Axis
ArrowStyle
Axis
AxisName
Crossing
CustomLabels
Dispose
Enabled
GetPosition
InterlacedColor
Interval
IntervalAutoMode
IntervalOffset
IntervalOffsetType
IntervalType
IsInterlaced
IsLabelAutoFit
IsLogarithmic
IsMarginVisible
IsMarksNextToAxis
IsReversed
IsStartedFromZero
LabelAutoFitMaxFontSize
LabelAutoFitMinFontSize
LabelAutoFitStyle
LabelStyle
LineColor
LineDashStyle
LineWidth
LogarithmBase
MajorGrid
MajorTickMark
Maximum
MaximumAutoSize
Minimum
MinorGrid
MinorTickMark
Name
PixelPositionToValue
PositionToValue
RoundAxisValues
ScaleBreakStyle
ScaleView
ScrollBar
StripLines
TextOrientation
Title
TitleAlignment
TitleFont
TitleForeColor
ToolTip
ValueToPixelPosition
ValueToPosition
AxisArrowStyle
AxisEnabled
AxisName
AxisScaleBreakStyle
AxisScaleBreakStyle
BreakLineStyle
CollapsibleSpaceThreshold
Enabled
LineColor
LineDashStyle
LineWidth
MaxNumberOfBreaks
Spacing
StartFromZero
AxisScaleView
AxisScaleView
IsZoomed
MinSize
MinSizeType
Position
Scroll
Size
SizeType
SmallScrollMinSize
SmallScrollMinSizeType
SmallScrollSize
SmallScrollSizeType
ViewMaximum
ViewMinimum
Zoom
Zoomable
ZoomReset
AxisScrollBar
Axis
AxisScrollBar
BackColor
ButtonColor
ButtonStyle
ChartArea
Dispose
Enabled
IsPositionedInside
IsVisible
LineColor
Size
AxisType
Border3DAnnotation
AnnotationType
Border3DAnnotation
BorderSkin
BorderSkin
BackColor
BackGradientStyle
BackHatchStyle
BackImage
BackImageAlignment
BackImageTransparentColor
BackImageWrapMode
BackSecondaryColor
BorderColor
BorderDashStyle
BorderSkin
BorderWidth
PageColor
SkinStyle
BorderSkinStyle
BreakLineStyle
CalloutAnnotation
AnchorAlignment
AnchorOffsetX
AnchorOffsetY
AnnotationType
BackColor
BackGradientStyle
BackHatchStyle
BackSecondaryColor
CalloutAnchorCap
CalloutAnnotation
CalloutStyle
LineColor
LineDashStyle
LineWidth
CalloutStyle
Chart
AlignDataPointsByAxisLabel
AnnotationPlaced
AnnotationPositionChanged
AnnotationPositionChanging
Annotations
AnnotationSelectionChanged
AnnotationTextChanged
AntiAliasing
ApplyPaletteColors
AxisScrollBarClicked
AxisViewChanged
AxisViewChanging
BackColor
BackGradientStyle
BackgroundImage
BackHatchStyle
BackImage
BackImageAlignment
BackImageTransparentColor
BackImageWrapMode
BackSecondaryColor
BeginInit
BorderColor
BorderDashStyle
BorderlineColor
BorderlineDashStyle
BorderlineWidth
BorderSkin
BorderWidth
BuildNumber
Chart
ChartAreas
CreateAccessibilityInstance
CursorPositionChanged
CursorPositionChanging
Customize
CustomizeLegend
DataBind
DataBindCrossTable
DataBindTable
DataManipulator
DataSource
DefaultSize
Dispose
EndInit
Font
ForeColor
FormatNumber
GetChartElementOutline
GetService
GetToolTipText
HitTest
Images
Invalidate
IsSoftShadows
Legends
LoadTemplate
OnCursorChanged
OnCustomize
OnCustomizeLegend
OnDoubleClick
OnFormatNumber
OnLocationChanged
OnMouseDown
OnMouseMove
OnMouseUp
OnPaint
OnPaintBackground
OnPostPaint
OnPrePaint
OnResize
OnRightToLeftChanged
OnSystemColorsChanged
Palette
PaletteCustomColors
PostPaint
PrePaint
Printing
Refresh
RenderingDpiX
RenderingDpiY
ResetAutoValues
SaveImage
SelectionRangeChanged
SelectionRangeChanging
Serializer
Series
Size
SuppressExceptions
TextAntiAliasingQuality
Titles
UpdateAnnotations
UpdateCursor
ChartArea
AlignmentOrientation
AlignmentStyle
AlignWithChartArea
Area3DStyle
Axes
AxisX
AxisX2
AxisY
AxisY2
BackColor
BackGradientStyle
BackHatchStyle
BackImage
BackImageAlignment
BackImageTransparentColor
BackImageWrapMode
BackSecondaryColor
BorderColor
BorderDashStyle
BorderWidth
ChartArea
CursorX
CursorY
Dispose
GetSeriesDepth
GetSeriesZPosition
InnerPlotPosition
IsSameFontSizeForAllAxes
Name
Position
RecalculateAxesScale
ShadowColor
ShadowOffset
TransformPoints
Visible
ChartArea3DStyle
ChartArea3DStyle
Enable3D
Inclination
IsClustered
IsRightAngleAxes
LightStyle
Perspective
PointDepth
PointGapDepth
Rotation
WallWidth
ChartAreaCollection
Add
ChartColorPalette
ChartDashStyle
ChartElement
ChartElement
Dispose
Equals
GetHashCode
Tag
ToString
ChartElementCollection<T>
ClearItems
Dispose
InsertItem
Invalidate
RemoveItem
ResumeUpdates
SetItem
SuspendUpdates
ChartElementOutline
Dispose
Markers
OutlinePath
ChartElementType
ChartGraphics
Dispose
GetAbsolutePoint
GetAbsoluteRectangle
GetAbsoluteSize
GetPositionFromAxis
GetRelativePoint
GetRelativeRectangle
GetRelativeSize
Graphics
ChartHatchStyle
ChartImageAlignmentStyle
ChartImageFormat
ChartImageWrapMode
ChartNamedElement
ChartNamedElement
Name
ChartNamedElementCollection<T>
FindByName
IndexOf
InsertItem
IsUniqueName
Item[String]
NamePrefix
NextUniqueName
RemoveItem
SetItem
ChartPaintEventArgs
Chart
ChartElement
ChartGraphics
Position
ChartSerializer
Content
Format
GetContentString
IsResetWhenLoading
IsTemplateMode
IsUnknownAttributeIgnored
Load
NonSerializableContent
Reset
Save
SerializableContent
ChartValueType
CompareMethod
Cursor
AutoScroll
AxisType
Cursor
Dispose
Interval
IntervalOffset
IntervalOffsetType
IntervalType
IsUserEnabled
IsUserSelectionEnabled
LineColor
LineDashStyle
LineWidth
Position
SelectionColor
SelectionEnd
SelectionStart
SetCursorPixelPosition
SetCursorPosition
SetSelectionPixelPosition
SetSelectionPosition
CursorEventArgs
Axis
ChartArea
CursorEventArgs
NewPosition
NewSelectionEnd
NewSelectionStart
CustomizeLegendEventArgs
CustomizeLegendEventArgs
LegendItems
LegendName
CustomLabel
Axis
Clone
CustomLabel
ForeColor
FromPosition
GridTicks
Image
ImageTransparentColor
LabelMark
MarkColor
Name
RowIndex
Text
ToolTip
ToPosition
CustomLabelsCollection
Add
CustomProperties
DataFormula
CopySeriesValues
DataFormula
FinancialFormula
IsEmptyPointIgnored
IsStartFromFirst
Statistics
DataManipulator
DataManipulator
ExportSeriesValues
Filter
FilterMatchedPoints
FilterSetEmptyPoints
FilterTopN
Group
GroupByAxisLabel
InsertEmptyPoints
Sort
DataPoint
Clone
DataPoint
GetValueByName
IsEmpty
Name
SetValueXY
SetValueY
XValue
YValues
DataPointCollection
Add
AddXY
AddY
ClearItems
DataBind
DataBindXY
DataBindY
FindAllByValue
FindByValue
FindMaxByValue
FindMinByValue
InsertXY
InsertY
DataPointComparer
Compare
DataPointComparer
DataPointCustomProperties
AxisLabel
BackGradientStyle
BackHatchStyle
BackImage
BackImageAlignment
BackImageTransparentColor
BackImageWrapMode
BackSecondaryColor
BorderColor
BorderDashStyle
BorderWidth
Color
CustomProperties
CustomPropertiesExtended
DataPointCustomProperties
DeleteCustomProperty
Font
GetCustomProperty
IsCustomPropertySet
IsValueShownAsLabel
IsVisibleInLegend
Item[Int32]
Label
LabelAngle
LabelBackColor
LabelBorderColor
LabelBorderDashStyle
LabelBorderWidth
LabelForeColor
LabelFormat
LabelToolTip
LegendText
LegendToolTip
MarkerBorderColor
MarkerBorderWidth
MarkerColor
MarkerImage
MarkerImageTransparentColor
MarkerSize
MarkerStyle
ResetIsValueShownAsLabel
ResetIsVisibleInLegend
SetCustomProperty
SetDefault
ToolTip
DateRangeType
DateTimeIntervalType
Docking
ElementPosition
Auto
Bottom
ElementPosition
FromRectangleF
Height
Right
Size
ToRectangleF
Width
X
Y
EllipseAnnotation
AnnotationType
EllipseAnnotation
FinancialFormula
FormatNumberEventArgs
ElementType
Format
LocalizedValue
SenderTag
Value
ValueType
FTestResult
FCriticalValueOneTail
FirstSeriesMean
FirstSeriesVariance
FTestResult
FValue
ProbabilityFOneTail
SecondSeriesMean
SecondSeriesVariance
GradientStyle
Grid
Enabled
Grid
Interval
IntervalOffset
IntervalOffsetType
IntervalType
LineColor
LineDashStyle
LineWidth
GridTickTypes
HitTestResult
Axis
ChartArea
ChartElementType
HitTestResult
Object
PointIndex
Series
SubObject
HorizontalLineAnnotation
AnnotationType
HorizontalLineAnnotation
IDataPointFilter
FilterDataPoint
ImageAnnotation
Alignment
AnnotationType
BackColor
BackGradientStyle
BackHatchStyle
BackSecondaryColor
Font
ForeColor
Image
ImageAnnotation
ImageTransparentColor
ImageWrapMode
LineColor
LineDashStyle
LineWidth
TextStyle
IntervalAutoMode
IntervalType
LabelAlignmentStyles
LabelAutoFitStyles
LabelCalloutStyle
LabelMarkStyle
LabelOutsidePlotAreaStyle
LabelStyle
Angle
Dispose
Enabled
Font
ForeColor
Format
Interval
IntervalOffset
IntervalOffsetType
IntervalType
IsEndLabelVisible
IsStaggered
LabelStyle
TruncatedLabels
Legend
Alignment
AutoFitMinFontSize
BackColor
BackGradientStyle
BackHatchStyle
BackImage
BackImageAlignment
BackImageTransparentColor
BackImageWrapMode
BackSecondaryColor
BorderColor
BorderDashStyle
BorderWidth
CellColumns
CustomItems
Dispose
DockedToChartArea
Docking
Enabled
Font
ForeColor
HeaderSeparator
HeaderSeparatorColor
InsideChartArea
InterlacedRows
InterlacedRowsColor
IsDockedInsideChartArea
IsEquallySpacedItems
IsTextAutoFit
ItemColumnSeparator
ItemColumnSeparatorColor
ItemColumnSpacing
Legend
LegendItemOrder
LegendStyle
MaximumAutoSize
Name
Position
ShadowColor
ShadowOffset
TableStyle
TextWrapThreshold
Title
TitleAlignment
TitleBackColor
TitleFont
TitleForeColor
TitleSeparator
TitleSeparatorColor
LegendCell
Alignment
BackColor
CellSpan
CellType
Dispose
Font
ForeColor
Image
ImageSize
ImageTransparentColor
Legend
LegendCell
LegendItem
Margins
Name
SeriesSymbolSize
Text
ToolTip
LegendCellCollection
Add
Insert
LegendCellColumn
Alignment
BackColor
ColumnType
Dispose
Font
ForeColor
HeaderAlignment
HeaderBackColor
HeaderFont
HeaderForeColor
HeaderText
Legend
LegendCellColumn
Margins
MaximumWidth
MinimumWidth
Name
SeriesSymbolSize
ShouldSerializeMargins
Text
ToolTip
LegendCellColumnCollection
Dispose
LegendCellColumnType
LegendCellType
LegendCollection
Add
LegendImageStyle
LegendItem
BackGradientStyle
BackHatchStyle
BackImageTransparentColor
BackSecondaryColor
BorderColor
BorderDashStyle
BorderWidth
Cells
Color
Dispose
Enabled
Image
ImageStyle
Legend
LegendItem
MarkerBorderColor
MarkerBorderWidth
MarkerColor
MarkerImage
MarkerImageTransparentColor
MarkerSize
MarkerStyle
Name
SeparatorColor
SeparatorType
SeriesName
SeriesPointIndex
ShadowColor
ShadowOffset
ToolTip
LegendItemOrder
LegendItemsCollection
Add
Insert
Reverse
LegendSeparatorStyle
LegendStyle
LegendTableStyle
LightStyle
LineAnchorCapStyle
LineAnnotation
Alignment
AnchorAlignment
AnnotationType
BackColor
BackGradientStyle
BackHatchStyle
BackSecondaryColor
EndCap
Font
ForeColor
IsInfinitive
IsSizeAlwaysRelative
LineAnnotation
StartCap
TextStyle
Margins
Bottom
Equals
GetHashCode
IsEmpty
Left
Margins
Right
Top
ToRectangleF
ToString
MarkerStyle
NamedImage
Dispose
Image
Name
NamedImage
NamedImagesCollection
Point3D
Point3D
PointF
X
Y
Z
PointSortOrder
PolygonAnnotation
AnnotationType
BackColor
BackGradientStyle
BackHatchStyle
BackSecondaryColor
EndCap
PolygonAnnotation
StartCap
PolylineAnnotation
Alignment
AnnotationType
BackColor
BackGradientStyle
BackHatchStyle
BackSecondaryColor
Dispose
EndCap
EndPlacement
Font
ForeColor
GraphicsPath
GraphicsPathPoints
IsFreeDrawPlacement
PolylineAnnotation
StartCap
TextStyle
PrintingManager
Dispose
PageSetup
Print
PrintDocument
PrintingManager
PrintPaint
PrintPreview
RectangleAnnotation
AnnotationType
BackColor
BackGradientStyle
BackHatchStyle
BackSecondaryColor
LineColor
LineDashStyle
LineWidth
RectangleAnnotation
ScrollBarButtonStyles
ScrollBarButtonType
ScrollBarEventArgs
Axis
ButtonType
ChartArea
IsHandled
MousePositionX
MousePositionY
ScrollBarEventArgs
ScrollType
SerializationContents
SerializationFormat
Series
AxisLabel
ChartArea
ChartType
ChartTypeName
Dispose
EmptyPointStyle
Enabled
IsXValueIndexed
Legend
MarkerStep
Name
Palette
Points
Series
ShadowColor
ShadowOffset
SmartLabelStyle
Sort
XAxisType
XValueMember
XValueType
YAxisType
YValueMembers
YValuesPerPoint
YValueType
SeriesChartType
SeriesCollection
Add
SmartLabelStyle
AllowOutsidePlotArea
CalloutBackColor
CalloutLineAnchorCapStyle
CalloutLineColor
CalloutLineDashStyle
CalloutLineWidth
CalloutStyle
Enabled
IsMarkerOverlappingAllowed
IsOverlappedHidden
MaxMovingDistance
MinMovingDistance
MovingDirection
SmartLabelStyle
StartFromZero
StatisticFormula
Anova
BetaFunction
Correlation
Covariance
FDistribution
FTest
GammaFunction
InverseFDistribution
InverseNormalDistribution
InverseTDistribution
Mean
Median
NormalDistribution
TDistribution
TTestEqualVariances
TTestPaired
TTestUnequalVariances
Variance
ZTest
StripLine
BackColor
BackGradientStyle
BackHatchStyle
BackImage
BackImageAlignment
BackImageTransparentColor
BackImageWrapMode
BackSecondaryColor
BorderColor
BorderDashStyle
BorderWidth
Dispose
Font
ForeColor
Interval
IntervalOffset
IntervalOffsetType
IntervalType
Name
StripLine
StripWidth
StripWidthType
Text
TextAlignment
TextLineAlignment
TextOrientation
ToolTip
StripLinesCollection
TextAnnotation
AnnotationType
BackColor
BackGradientStyle
BackHatchStyle
BackSecondaryColor
BeginTextEditing
EndPlacement
Font
IsMultiline
LineColor
LineDashStyle
LineWidth
StopTextEditing
Text
TextAnnotation
TextAntiAliasingQuality
TextOrientation
TextStyle
TickMark
Size
TickMark
TickMarkStyle
TickMarkStyle
Title
Alignment
BackColor
BackGradientStyle
BackHatchStyle
BackImage
BackImageAlignment
BackImageTransparentColor
BackImageWrapMode
BackSecondaryColor
BorderColor
BorderDashStyle
BorderWidth
Dispose
DockedToChartArea
Docking
DockingOffset
Font
ForeColor
IsDockedInsideChartArea
Name
Position
ShadowColor
ShadowOffset
Text
TextOrientation
TextStyle
Title
ToolTip
Visible
TitleCollection
Add
ToolTipEventArgs
HitTestResult
Text
ToolTipEventArgs
X
Y
TTestResult
DegreeOfFreedom
FirstSeriesMean
FirstSeriesVariance
ProbabilityTOneTail
ProbabilityTTwoTail
SecondSeriesMean
SecondSeriesVariance
TCriticalValueOneTail
TCriticalValueTwoTail
TTestResult
TValue
VerticalLineAnnotation
AnnotationType
VerticalLineAnnotation
ViewEventArgs
Axis
ChartArea
NewPosition
NewSize
NewSizeType
ViewEventArgs
ZTestResult
FirstSeriesMean
FirstSeriesVariance
ProbabilityZOneTail
ProbabilityZTwoTail
SecondSeriesMean
SecondSeriesVariance
ZCriticalValueOneTail
ZCriticalValueTwoTail
ZTestResult
ZValue
System.Windows.Forms.DataVisualization.Charting
Namespace
The System.Windows.Forms.DataVisualization.Charting namespace contains methods and properties for the Chart
Windows forms control.
Classes
Annotation
Defines properties and methods common to all annotations.
This is an abstract class.
AnnotationCollection
Stores chart annotation objects.
AnnotationGroup
Represents a group of annotations.
AnnotationPathPoint
Represents a path point of a PolylineAnnotation or
PolygonAnnotation, which is stored in their PathPoints
property.
AnnotationPathPointCollection
Represents a collection of PolylineAnnotation or
PolygonAnnotation path points, which can be accessed using
the GraphicPathPoints property.
AnnotationPositionChangingEventArgs
Provides data for the events in the Chart control that change
the position of the annotation.
AnnotationSmartLabelStyle
Stores the smart label properties of an annotation.
AnovaResult
Represents the results of an ANOVA statistical test.
ArrowAnnotation
Represents an arrow annotation.
Axis
Provides methods and properties that manage axes in the
Chart control.
AxisScaleBreakStyle
Represents a scale break on the Y-axis of the chart.
AxisScaleView
Represents a scaled view of the chart.
AxisScrollBar
Represents the scrollbar of a chart axis.
Border3DAnnotation
Represents an annotation with a 3D border.
BorderSkin
Represents the drawing properties of the 3D border skin.
CalloutAnnotation
Represents a callout annotation.
Chart
Serves as the root class of the Chart control.
ChartArea
Represents a chart area on the chart image.
ChartArea3DStyle
Manages the display attributes for three-dimensional (3D)
chart areas.
ChartAreaCollection
Represents a collection of ChartArea objects.
ChartElement
Base class for all the chart elements. The ChartElement class
represents the most basic element of the chart element
hierarchy.
ChartElementCollection<T>
Represents the base class for all chart element collections.
ChartElementOutline
Represents an array of marker points and the outline path
used for visual object selection in the chart.
ChartGraphics
Provides numerous conversion functions and exposes a GDI+
Graphics object.
ChartNamedElement
Represents the base class for most chart elements. Chart
elements such as series, chart areas, and legends must have
unique names, and reuse the unique name generation and
validation logic provided by the
ChartNamedElementCollection<T> class.
ChartNamedElementCollection<T>
Represents the base class for all collections of named chart
elements. Performs name management and enforces the
uniqueness of the names.
ChartPaintEventArgs
Provides data for the paint events of the Chart control.
ChartSerializer
Enables serialization of the Chart control.
Cursor
Represents a horizontal or vertical line that defines a position
along an axis.
CursorEventArgs
Provides properties that are used with the following events in
the root Chart object: CursorPositionChanged,
CursorPositionChanging, SelectionRangeChanged and
SelectionRangeChanging.
CustomizeLegendEventArgs
Provides data for the CustomizeLegend event of the Chart
control.
CustomLabel
Represents a custom label for an axis.
CustomLabelsCollection
Represents a collection of CustomLabel objects.
CustomProperties
Represents the custom properties for the data visualization
charting.
DataFormula
Provides properties and methods to prepare series data for
technical analysis, apply formulas on the series data and
prepare output data to be displayed as a chart. The actual
calculations are performed in the StatisticFormula class.
DataManipulator
Provides method that performs data manipulation operations
at run time. This class is exposed by the DataManipulator
property of the root Chart object.
DataPoint
Represents a data point that is stored in the
DataPointCollection class.
DataPointCollection
Represents a collection of DataPoint objects.
DataPointComparer
Compares data points.
DataPointCustomProperties
Defines custom properties that are common to data points,
series and empty points.
ElementPosition
Represents the base class for many visual elements of the
chart such as the legend, title, and chart areas. Defines the
position of the chart element in relative coordinates, which
range from (0,0) to (100,100).
EllipseAnnotation
Represents an ellipse annotation.
FormatNumberEventArgs
Represents the event arguments of the localized number-
formatting event.
FTestResult
Stores results of the FTest statistical methods.
Grid
Provides methods and properties that manage the major and
minor grids of Axis objects.
HitTestResult
Represents the results of a hit test.
HorizontalLineAnnotation
Represents a horizontal line annotation.
ImageAnnotation
Represents an image annotation.
LabelStyle
Provides properties that define the visual appearance of the
axis labels.
Legend
Represents the legend for the chart image.
LegendCell
Represents a legend cell in a legend item.
LegendCellCollection
Stores legend cells in a LegendCellCollection object.
LegendCellColumn
Represents a cell column in a legend, which is used to extend
the functionality of the default legend.
LegendCellColumnCollection
Stores LegendCellColumn objects, which are applied to default
legend items.
LegendCollection
Represents a collection of Legend objects.
LegendItem
Represents a legend item, which is stored in the
LegendItemsCollection class.
LegendItemsCollection
Represents a collection of LegendItem objects.
LineAnnotation
Represents a line annotation.
Margins
Represents the margins for various chart elements.
NamedImage
Represents named images, which are stored in the
NamedImagesCollection.
NamedImagesCollection
Represents a collection of NamedImage objects.
Point3D
Represents the coordinates of a three-dimensional (3D) data
point. This class is used when performing custom drawing with
3D charts.
PolygonAnnotation
Represents a polygon annotation.
PolylineAnnotation
Represents a polyline annotation.
PrintingManager
Represents the print manager for the chart.
RectangleAnnotation
Represents a rectangle annotation.
ScrollBarEventArgs
Used as a parameter object in the AxisScrollBarClicked of the
root Chart object.
Series
Represents the data points and series attributes to store.
SeriesCollection
Represents a collection of Series objects.
SmartLabelStyle
Provides methods and properties used to perform intelligent,
rule-based data point label positioning to resolve overlapping
data point label issues.
StatisticFormula
Calculates statistical formulas.
StripLine
Represents the strip lines on a chart.
StripLinesCollection
Represents a collection of StripLine objects.
TextAnnotation
Represents a text annotation.
TickMark
Represents the major and minor tick marks along an axis.
Title
Represents a title for the entire chart image.
TitleCollection
Represents a collection of Title objects.
ToolTipEventArgs
Used as a parameter object in the GetToolTipText event of the
root Chart object.
TTestResult
Stores the results of a T Test statistical formula.
VerticalLineAnnotation
Represents a vertical line annotation.
ViewEventArgs
Provides event data that is used as a parameter object in the
AxisViewChanged and AxisViewChanging events of the root
Chart object.
ZTestResult
Stores the results of a Z Test statistical formula.
Interfaces
IDataPointFilter
Exposes the FilterDataPoint(DataPoint, Series, Int32) method,
which allows Series data to be custom filtered.
Enums
AntiAliasingStyles
Specifies the anti-aliasing options for the chart.
AreaAlignmentOrientations
Specifies the alignment orientation of a chart area.
AreaAlignmentStyles
Specifies the alignment styles of chart areas.
ArrowStyle
Specifies styles for an arrow annotation.
AxisArrowStyle
An enumeration of axis arrow styles.
AxisEnabled
Specifies the state of an axis.
AxisName
Specifies the name of an axis.
AxisType
Specifies the axis type for the X and Y-axes of a Series.
BorderSkinStyle
Specifies a style for the border skin of a chart.
BreakLineStyle
Specifies line styles for axis scale breaks.
CalloutStyle
Represents the available callout styles. Applicable only to
callout annotations.
ChartColorPalette
Specifies a palette when setting a Palette property.
ChartDashStyle
Specifies a line style.
ChartElementType
Specifies a chart element type.
ChartHatchStyle
Specifies a hatching style for a chart element.
ChartImageAlignmentStyle
Specifies the image alignment for a chart background image.
ChartImageFormat
Specifies the image type of the chart.
ChartImageWrapMode
Specifies the drawing mode for a background image.
ChartValueType
Specifies value types for various chart properties.
CompareMethod
Specifies the type of comparison to be used when filtering
data. This enumeration is used by the Filter method
definitions in the DataManipulator class that take the
CompareMethod argument.
DateRangeType
Specifies a date/time interval that determines the ranges that
will be filtered when you invoke one of the Filter method
definitionsfound in the DataManipulator class.
DateTimeIntervalType
Specifies an interval type.
Docking
Specifies where a chart element, such as a legend or title, will
be docked on the chart.
FinancialFormula
Specifies a financial formula.
GradientStyle
Specifies a gradient style to be used for a chart element.
GridTickTypes
Specifies the options for displaying a grid line or a tick mark
for a custom label.
IntervalAutoMode
Specifies the automatic axis interval mode.
IntervalType
Specifies an interval type.
LabelAlignmentStyles
Specifies a label alignment when SmartLabelStyle is used.
LabelAutoFitStyles
Specifies style changes that can automatically be made to a
label when the LabelAutoFitStyle property is used.
LabelCalloutStyle
Specifies the type of leader line that should be drawn from the
point to the label.
LabelMarkStyle
Specifies a mark for custom labels.
LabelOutsidePlotAreaStyle
Specifies the degree to which a label can be drawn outside a
plotting area.
LegendCellColumnType
Specifies a legend cell column type.
LegendCellType
Specifies a legend cell type.
LegendImageStyle
Specifies the style to apply to the symbol for a legend item.
LegendItemOrder
Specifies the order in which items are added to the legend.
LegendSeparatorStyle
Specifies the styles for legend separator lines.
LegendStyle
Specifies the legend style.
LegendTableStyle
Specifies the legend table style.
LightStyle
Specifies a lighting style for a three-dimensional (3D) chart
area.
LineAnchorCapStyle
Specifies the shape - that is, the anchor cap - to draw on the
point end of the label callout line.
MarkerStyle
Specifies a style for markers.
PointSortOrder
Indicates whether the sort order for data points is ascending
or descending.
ScrollBarButtonStyles
Specifies the type of button that will be displayed on the
scrollbar.
ScrollBarButtonType
Specifies the button clicked by a user in the
AxisScrollBarClicked event.
ScrollType
Specifies the scrolling that will occur when the one of the
Scroll methods in the AxisScaleView class is called.
SerializationContents
Specifies the type of chart content to be serialized.
SerializationFormat
Represents the formatting type to use when the chart is
serialized.
SeriesChartType
Specifies a chart type for a Series.
StartFromZero
Indicates whether an axis segment should start from zero
when a scale break is used.
TextAntiAliasingQuality
Specifies the level of anti-aliasing quality to be used with the
TextAntiAliasingQuality property.
TextOrientation
Specifies text orientation in a chart element.
TextStyle
Specifies text drawing styles.
TickMarkStyle
Specifies a tick mark style when setting the TickMarkStyle
property of a TickMark object.
Annotation Annotation Class
Defines properties and methods common to all annotations. This is an abstract class.
D eclaration
public abstract class Annotation :
System.Windows.Forms.DataVisualization.Charting.ChartNamedElement
type Annotation = class
inherit ChartNamedElement
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
Remarks
Annotations are commonly used to comment or elaborate on chart elements such as data points. Annotations can also
be used to draw custom shapes.
By default, annotations are positioned using relative coordinates, with (0,0) representing the top-left corner, and
(100,100) representing the bottom-right corner of the chart image. It is also possible to switch from this relative
coordinate system to a system that uses axis values. With an axis coordinate system, X and Y, which represent the
position of the top-left corner of an annotation, are set using X axis and Y axis values, instead of values that range from
0-100.
There are two ways to use axis values when you specify the position and size of an annotation:
Set the AxisX, AxisY or both of these annotation properties to the AxisX and AxisY property values of a ChartArea
object.
Use the AnchorDataPoint property to anchor the annotation to a data point. In this case, its positioning is automatically
calculated.
All annotations are derived from the Annotation class, which can be used to set attributes common to all Annotation
objects, such as color, position, anchoring and so forth.
Constructors
Annotation()
Annotation()
Initializes a new instance of the Annotation class. This is the default constructor and should not be used.
Properties
Alignment
Alignment
Gets or sets a flag that specifies whether the end user is allowed to move the annotation anchor using a mouse.
AllowMoving
AllowMoving
Gets or sets a flag that specifies whether the end user is allowed to move an annotation using a mouse.
AllowPathEditing
AllowPathEditing
Gets or sets a flag that specifies whether the end user is allowed to move the points of a polygon annotation using
a mouse.
AllowResizing
AllowResizing
Gets or sets a flag that specifies whether the end user is allowed to resize an annotation using a mouse.
AllowSelecting
AllowSelecting
Gets or sets a flag that specifies whether the end user is allowed to select an annotation using a mouse.
AllowTextEditing
AllowTextEditing
Gets or sets a flag that specifies whether the text in an annotation may be edited when the end user double clicks
the text.
AnchorAlignment
AnchorAlignment
AnchorDataPoint
AnchorDataPoint
AnchorDataPointName
AnchorDataPointName
Gets or sets the offset from the anchor point for the X position of an annotation.
AnchorOffsetY
AnchorOffsetY
Gets or sets the offset from the anchor point for the Y position of an annotation.
AnchorX
AnchorX
AnchorY
AnchorY
AnnotationGroup
AnnotationGroup
AnnotationType
AnnotationType
AxisX
AxisX
AxisXName
AxisXName
AxisY
AxisY
Gets or sets the Y axis to which an annotation is attached.
AxisYName
AxisYName
Gets or sets the name of the Y axis which an annotation is attached to.
BackColor
BackColor
BackGradientStyle
BackGradientStyle
BackHatchStyle
BackHatchStyle
BackSecondaryColor
BackSecondaryColor
Bottom
Bottom
ClipToChartArea
ClipToChartArea
Gets or sets the name of the chart area to which an annotation is clipped.
Font
Font
ForeColor
ForeColor
Height
Height
IsSelected
IsSelected
IsSizeAlwaysRelative
IsSizeAlwaysRelative
Gets or sets a flag that specifies whether the size of an annotation is always defined in relative chart coordinates.
LineColor
LineColor
LineDashStyle
LineDashStyle
LineWidth
LineWidth
Name
Name
Right
Right
ShadowOffset
ShadowOffset
SmartLabelStyle
SmartLabelStyle
TextStyle
TextStyle
ToolTip
ToolTip
Visible
Visible
Width
Width
X
X
Y
Y
Methods
BeginPlacement()
BeginPlacement()
BringToFront()
BringToFront()
Dispose(Boolean)
Dispose(Boolean)
EndPlacement()
EndPlacement()
ResizeToContent()
ResizeToContent()
SendToBack()
SendToBack()
SetAnchor(DataPoint)
SetAnchor(DataPoint)
SetAnchor(DataPoint, DataPoint)
SetAnchor(DataPoint, DataPoint)
Returns
ContentAlignment ContentAlignment
A ContentAlignment enumeration value that represents the content alignment.
Remarks
This property is used to align text for TextAnnotation, RectangleAnnotation, EllipseAnnotation and CalloutAnnotation
objects, and to align a non-scaled image inside an ImageAnnotation object.
Annotation.AllowAnchorMoving Annotation.Allow
AnchorMoving
I n this Article
Gets or sets a flag that specifies whether the end user is allowed to move the annotation anchor using a mouse.
Returns
Boolean Boolean
true if the annotation anchor may be moved; otherwise, false .
Annotation.AllowMoving Annotation.AllowMoving
I n this Article
Gets or sets a flag that specifies whether the end user is allowed to move an annotation using a mouse.
public virtual bool AllowMoving { get; set; }
member this.AllowMoving : bool with get, set
Returns
Boolean Boolean
true if the annotation may be moved; otherwise, false .
Annotation.AllowPathEditing Annotation.AllowPath
Editing
I n this Article
Gets or sets a flag that specifies whether the end user is allowed to move the points of a polygon annotation using a
mouse.
public virtual bool AllowPathEditing { get; set; }
member this.AllowPathEditing : bool with get, set
Returns
Boolean Boolean
true if the polygon annotation's points may be moved; otherwise, false .
Remarks
This property needs to be set to true to free draw a polyline annotation.
Annotation.AllowResizing Annotation.AllowResizing
I n this Article
Gets or sets a flag that specifies whether the end user is allowed to resize an annotation using a mouse.
public virtual bool AllowResizing { get; set; }
member this.AllowResizing : bool with get, set
Returns
Boolean Boolean
true if the annotation may be resized; otherwise, false .
Annotation.AllowSelecting Annotation.AllowSelecting
I n this Article
Gets or sets a flag that specifies whether the end user is allowed to select an annotation using a mouse.
public virtual bool AllowSelecting { get; set; }
member this.AllowSelecting : bool with get, set
Returns
Boolean Boolean
true if the annotation may be selected; otherwise false .
Annotation.AllowTextEditing Annotation.AllowTextEditing
I n this Article
Gets or sets a flag that specifies whether the text in an annotation may be edited when the end user double clicks the
text.
Returns
Boolean Boolean
true if the annotation text may be edited; otherwise, false .
Annotation.AnchorAlignment Annotation.Anchor
Alignment
I n this Article
Gets or sets the alignment of an annotation to the anchor point.
Returns
ContentAlignment ContentAlignment
A ContentAlignment enumeration value that represents the alignment of the annotation to the anchor point.
Remarks
The annotation must be anchored by either using the AnchorDataPoint property, or by setting the AnchorX and
AnchorY properties. Its X and Y properties must be set to NaN.
Annotation.AnchorDataPoint Annotation.AnchorData
Point
I n this Article
Gets or sets the data point to which an annotation is anchored.
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.AnchorPo
intValueConverter))]
public virtual System.Windows.Forms.DataVisualization.Charting.DataPoint AnchorDataPoint { get; set;
}
member this.AnchorDataPoint : System.Windows.Forms.DataVisualization.Charting.DataPoint with get,
set
Returns
DataPoint DataPoint
A DataPoint object to which an annotation is anchored.
Attributes TypeConverterAttribute
Remarks
The annotation is anchored to the X and Y values of the specified data point, and automatically uses the same axes
coordinates as the data point.
To automatically position the annotation relative to the anchor point, make sure its X and Y properties are set to NaN.
The AnchorAlignment property can be used to change the automatic position alignment of the annotation to the
anchor point. The AnchorOffsetX and AnchorOffsetY properties may be used to add extra spacing.
When you use this property, make sure the AnchorX and AnchorY properties are set to Double.NaN, as they have
precedence.
Set this value to null to disable annotation anchoring to a data point.
Annotation.AnchorDataPointName Annotation.Anchor
DataPointName
I n this Article
Gets or sets the name of a data point to which an annotation is anchored.
[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
public virtual string AnchorDataPointName { get; set; }
member this.AnchorDataPointName : string with get, set
Returns
String String
A string value that represents the name of the data point that an annotation is anchored to.
Attributes BindableAttribute BrowsableAttribute
Annotation.AnchorOffsetX Annotation.AnchorOffsetX
I n this Article
Gets or sets the offset from the anchor point for the X position of an annotation.
public virtual double AnchorOffsetX { get; set; }
member this.AnchorOffsetX : double with get, set
Returns
Double Double
A double value that represents the offset of the X position from the anchor point.
Remarks
The annotation must be anchored using either the AnchorDataPoint or the AnchorX property, and its X property must
be set to NaN.
Annotation.AnchorOffsetY Annotation.AnchorOffsetY
I n this Article
Gets or sets the offset from the anchor point for the Y position of an annotation.
public virtual double AnchorOffsetY { get; set; }
member this.AnchorOffsetY : double with get, set
Returns
Double Double
A double value that represents the offset of the Y position from the anchor point.
Remarks
The annotation must be anchored using either the AnchorDataPoint or AnchorY property, and its Y property must be
set to NaN.
Annotation.AnchorX Annotation.AnchorX
I n this Article
Gets or sets the X coordinate to which the annotation is anchored.
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.DoubleNa
nValueConverter))]
public virtual double AnchorX { get; set; }
member this.AnchorX : double with get, set
Returns
Double Double
A double value that represents the X coordinate an annotation is anchored to.
Attributes TypeConverterAttribute
Remarks
The annotation is anchored to the X coordinate and is specified in relative chart or axes coordinates, depending on the
AxisX property value.
To automatically position an annotation relative to an anchor point, make sure its X property is set to NaN. The
AnchorAlignment property can be used to change the automatic position alignment of the annotation to the anchor
point. The AnchorOffsetX and AnchorOffsetY properties may be used to add extra spacing.
This property has a higher priority than the AnchorDataPoint property.
Set this value to NaN to disable annotation anchoring to the value.
Annotation.AnchorY Annotation.AnchorY
I n this Article
Gets or sets the Y coordinate to which the annotation is anchored.
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.DoubleNa
nValueConverter))]
public virtual double AnchorY { get; set; }
member this.AnchorY : double with get, set
Returns
Double Double
A double value that represents the Y coordinate an annotation is anchored to.
Attributes TypeConverterAttribute
Remarks
The annotation is anchored to the Y coordinate and is specified in relative chart or axes coordinates, depending on the
AxisX property value.
To automatically position an annotation relative to an anchor point make sure its Y property is set to NaN. The
AnchorAlignment property can be used to change the automatic position alignment of the annotation to the anchor
point. The AnchorOffsetX and AnchorOffsetY properties may be used to add extra spacing.
This property has a higher priority than the AnchorDataPoint property.
Set this value to NaN to disable annotation anchoring to the value.
Annotation
I n this Article
Initializes a new instance of the Annotation class. This is the default constructor and should not be used.
protected Annotation ();
Remarks
Annotation is an abstract class and cannot be created directly. To create a new annotation object, use constructors of
classes such as LineAnnotation, RectangleAnnotation, and the like.
Annotation.AnnotationGroup Annotation.Annotation
Group
I n this Article
Gets the group, if any, to which the annotation belongs.
[System.ComponentModel.Browsable(false)]
public System.Windows.Forms.DataVisualization.Charting.AnnotationGroup AnnotationGroup { get; }
member this.AnnotationGroup : System.Windows.Forms.DataVisualization.Charting.AnnotationGroup
Returns
AnnotationGroup AnnotationGroup
An AnnotationGroup object that represents the group which the annotation belongs to.
Attributes BrowsableAttribute
Annotation.AnnotationType Annotation.AnnotationType
I n this Article
Gets or sets an annotation's type name.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
public abstract string AnnotationType { get; }
member this.AnnotationType : string
Returns
String String
The annotation type.
Attributes BindableAttribute BrowsableAttribute
Remarks
This property is used to get the name of each annotation type, for example, Line, Rectangle, Ellipse, and so forth.
Annotation.AxisX Annotation.AxisX
I n this Article
Gets or sets the X axis to which an annotation is attached.
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.Annotati
onAxisValueConverter))]
public virtual System.Windows.Forms.DataVisualization.Charting.Axis AxisX { get; set; }
member this.AxisX : System.Windows.Forms.DataVisualization.Charting.Axis with get, set
Returns
Axis Axis
An Axis object to which the annotation is attached.
Attributes TypeConverterAttribute
Remarks
When an annotation is attached to an axis, its X position is always specified in axes coordinates. To also define the size
of an annotation in axes coordinates, make sure the IsSizeAlwaysRelative property is set to false .
Set this value to null to disable attachment to the axis.
Annotation.AxisXName Annotation.AxisXName
I n this Article
Gets or sets the name of the X axis to which an annotation is attached.
[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
public virtual string AxisXName { get; set; }
member this.AxisXName : string with get, set
Returns
String String
A string value that represents the name of the X axis which an annotation is attached to.
Attributes BindableAttribute BrowsableAttribute
Annotation.AxisY Annotation.AxisY
I n this Article
Gets or sets the Y axis to which an annotation is attached.
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.Annotati
onAxisValueConverter))]
public virtual System.Windows.Forms.DataVisualization.Charting.Axis AxisY { get; set; }
member this.AxisY : System.Windows.Forms.DataVisualization.Charting.Axis with get, set
Returns
Axis Axis
An Axis object to which this annotation is attached.
Attributes TypeConverterAttribute
Remarks
When an annotation is attached to an axis, its Y position is always specified in axes coordinates. To also define the size
of an annotation in axes coordinates, make sure the IsSizeAlwaysRelative property is set to false .
Set to null to disable annotation attachment to an axis.
Annotation.AxisYName Annotation.AxisYName
I n this Article
Gets or sets the name of the Y axis which an annotation is attached to.
[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
public virtual string AxisYName { get; set; }
member this.AxisYName : string with get, set
Returns
String String
A string value that represents the name of the Y axis that an annotation is attached to.
Attributes BindableAttribute BrowsableAttribute
Annotation.BackColor Annotation.BackColor
I n this Article
Gets or sets the color of an annotation background.
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public virtual System.Drawing.Color BackColor { get; set; }
member this.BackColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw an annotation background.
Attributes TypeConverterAttribute
Remarks
This property does not apply to line-type annotations, image annotations and text annotations.
Annotation.BackGradientStyle Annotation.BackGradient
Style
I n this Article
Gets or sets the gradient style of an annotation background.
Returns
GradientStyle GradientStyle
A GradientStyle value used to draw an annotation background.
Remarks
Two colors are used to draw the gradients, BackColor and BackSecondaryColor.
This property does not apply to line-type annotations, image annotations and text annotations.
Annotation.BackHatchStyle Annotation.BackHatchStyle
I n this Article
Gets or sets the hatching style of an annotation background.
public virtual System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle BackHatchStyle { get;
set; }
member this.BackHatchStyle : System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle with
get, set
Returns
ChartHatchStyle ChartHatchStyle
A ChartHatchStyle value used to draw the background.
Remarks
Two colors are used to draw the hatching, BackColor and BackSecondaryColor.
This property does not apply to line-type annotations, image annotations and text annotations.
Annotation.BackSecondaryColor Annotation.Back
SecondaryColor
I n this Article
Gets or sets the secondary color of an annotation background.
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public virtual System.Drawing.Color BackSecondaryColor { get; set; }
member this.BackSecondaryColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw an annotation background with hatching or gradient fill.
Attributes TypeConverterAttribute
Remarks
The secondary color is used with the BackColor when BackHatchStyle or BackGradientStyle is used.
This property does not apply to line-type annotations, image annotations and text annotations.
Annotation.BeginPlacement Annotation.BeginPlacement
I n this Article
Begins the end user placement of an annotation using the mouse.
public virtual void BeginPlacement ();
abstract member BeginPlacement : unit -> unit
override this.BeginPlacement : unit -> unit
Remarks
When this method is called, the end user is allowed to place an annotation using the mouse.
Placement finishes when the end user specifies all required points, or when the EndPlacement method is called.
Annotation.Bottom Annotation.Bottom
I n this Article
Gets or sets the bottom boundary of an annotation position.
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.DoubleNa
nValueConverter))]
public virtual double Bottom { get; set; }
member this.Bottom : double with get, set
Returns
Double Double
A double value that represents the position of the bottom boundary of an annotation.
Attributes BrowsableAttribute TypeConverterAttribute
Remarks
To use axes coordinates, anchor an annotation to a data point using the AnchorDataPoint property, or set the
annotation axes using the AxisX or AxisY properties and set the IsSizeAlwaysRelative property to false .
Annotation.BringToFront Annotation.BringToFront
I n this Article
Brings an annotation to the front of all annotations.
public virtual void BringToFront ();
abstract member BringToFront : unit -> unit
override this.BringToFront : unit -> unit
Annotation.ClipToChartArea Annotation.ClipToChartArea
I n this Article
Gets or sets the name of the chart area to which an annotation is clipped.
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.LegendAr
eaNameConverter))]
public virtual string ClipToChartArea { get; set; }
member this.ClipToChartArea : string with get, set
Returns
String String
A string that represents the name of an existing chart area to which an annotation is clipped.
Attributes TypeConverterAttribute
Remarks
If the chart area name is specified, an annotation will only be drawn inside the plotting area of the chart area specified.
All parts of the annotation outside of the plotting area will be clipped.
To disable chart area clipping, set the property to Empty.
Annotation.Dispose Annotation.Dispose
I n this Article
Releases unmanaged resources and, optionally, managed resources.
protected override void Dispose (bool disposing);
override this.Dispose : bool -> unit
Parameters
disposing Boolean Boolean
true to release both unmanaged and managed resources; false to release only unmanaged resources.
Annotation.EndPlacement Annotation.EndPlacement
I n this Article
Ends the end user placement of an annotation.
public virtual void EndPlacement ();
abstract member EndPlacement : unit -> unit
override this.EndPlacement : unit -> unit
Remarks
This method ends an annotation placement operation previously started by a BeginPlacement method call.
Calling this method is not required, because placement will automatically end when an end user enters all required
points. However, it is useful when an annotation placement operation needs to be aborted for some reason.
Annotation.Font Annotation.Font
I n this Article
Gets or sets the font to use for the text of an annotation.
public virtual System.Drawing.Font Font { get; set; }
member this.Font : System.Drawing.Font with get, set
Returns
Font Font
A Font object used to draw the annotation text.
Annotation.ForeColor Annotation.ForeColor
I n this Article
Gets or sets the text color of an annotation.
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public virtual System.Drawing.Color ForeColor { get; set; }
member this.ForeColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used for the text color of an annotation.
Attributes TypeConverterAttribute
Annotation.Height Annotation.Height
I n this Article
Gets or sets the height of an annotation.
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.DoubleNa
nValueConverter))]
public virtual double Height { get; set; }
member this.Height : double with get, set
Returns
Double Double
A double value that represents the height of an annotation.
Attributes TypeConverterAttribute
Remarks
The height of an annotation can be a negative value, in which case the annotation orientation is switched.
Annotation width can be in relative chart coordinates or in axes coordinates. Chart relative coordinates are used by
default.
To use axes coordinates, anchor an annotation to a data point using the AnchorDataPoint property, or set the
annotation axes using the AxisX or AxisY properties and set the IsSizeAlwaysRelative property to false .
Set the width to NaN to achieve automatic size calculation for annotations with text. The size will automatically be
calculated based on the annotation text and font size.
Annotation.IsSelected Annotation.IsSelected
I n this Article
Gets or sets a flag that determines if an annotation is selected.
[System.ComponentModel.Browsable(false)]
public virtual bool IsSelected { get; set; }
member this.IsSelected : bool with get, set
Returns
Boolean Boolean
true if the annotation is selected; otherwise, false .
Attributes BrowsableAttribute
Annotation.IsSizeAlwaysRelative Annotation.IsSizeAlways
Relative
I n this Article
Gets or sets a flag that specifies whether the size of an annotation is always defined in relative chart coordinates.
Returns
Boolean Boolean
true if the Width and Height of an annotation are always expressed in relative chart coordinates; otherwise, false .
Remarks
The height and width of an annotation may be set in relative chart or in axes coordinates. Relative chart coordinates are
the default.
To express the size of an annotation in axes coordinates, set the IsSizeAlwaysRelative property to false . Then anchor
the annotation to a data point or set the AxisX and AxisY properties.
Annotation.LineColor Annotation.LineColor
I n this Article
Gets or sets the line color of an annotation.
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public virtual System.Drawing.Color LineColor { get; set; }
member this.LineColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw an annotation's line.
Attributes TypeConverterAttribute
Annotation.LineDashStyle Annotation.LineDashStyle
I n this Article
Gets or sets the line style of an annotation.
public virtual System.Windows.Forms.DataVisualization.Charting.ChartDashStyle LineDashStyle { get;
set; }
member this.LineDashStyle : System.Windows.Forms.DataVisualization.Charting.ChartDashStyle with get,
set
Returns
ChartDashStyle ChartDashStyle
A ChartDashStyle value used to draw the line style of an annotation.
Annotation.LineWidth Annotation.LineWidth
I n this Article
Gets or sets the line width of an annotation.
public virtual int LineWidth { get; set; }
member this.LineWidth : int with get, set
Returns
Int32 Int32
An integer value that defines the line width, in pixels, of an annotation.
Annotation.Name Annotation.Name
I n this Article
Gets or sets the unique name of an annotation.
[System.ComponentModel.Bindable(true)]
public override string Name { get; set; }
member this.Name : string with get, set
Returns
String String
A string that represents the unique name of an annotation.
Attributes BindableAttribute
Annotation.ResizeToContent Annotation.ResizeTo
Content
I n this Article
Resizes an annotation according to its content size.
Remarks
Sets the annotation width and height to fit the specified text.
This method applies to TextAnnotation, RectangleAnnotation, EllipseAnnotation and CalloutAnnotation objects only.
Note
This method requires that the annotation be added to the AnnotationCollection to function correctly.
Annotation.Right Annotation.Right
I n this Article
Gets or sets the right boundary position of an annotation.
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.DoubleNa
nValueConverter))]
public virtual double Right { get; set; }
member this.Right : double with get, set
Returns
Double Double
A double value that represents the position of the right boundary of an annotation.
Attributes BrowsableAttribute TypeConverterAttribute
Remarks
To use axes coordinates, anchor an annotation to a data point using the AnchorDataPoint property, or set the
annotation axes using the AxisX and AxisY properties and set the IsSizeAlwaysRelative property to false .
Annotation.SendToBack Annotation.SendToBack
I n this Article
Sends an annotation to the back of all the annotations.
public virtual void SendToBack ();
abstract member SendToBack : unit -> unit
override this.SendToBack : unit -> unit
Remarks
Sends an annotation to the back of the all annotations.
Annotation.SetAnchor Annotation.SetAnchor
I n this Article
Overloads
SetAnchor(DataPoint) SetAnchor(DataPoint)
Anchors an annotation to the specified data point.
SetAnchor(DataPoint) SetAnchor(DataPoint)
Anchors an annotation to the specified data point.
public void SetAnchor (System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint);
member this.SetAnchor : System.Windows.Forms.DataVisualization.Charting.DataPoint -> unit
Parameters
dataPoint DataPoint DataPoint
The DataPoint to which the annotation will be anchored.
Remarks
Anchors an annotation to the specified data point.
Parameters
dataPoint1 DataPoint DataPoint
The first anchor DataPoint.
dataPoint2 DataPoint DataPoint
The second anchor DataPoint.
Remarks
Anchors an annotation's top-left and bottom-right corners to the specified data points.
Annotation.ShadowColor Annotation.ShadowColor
I n this Article
Gets or sets the color of an annotation's shadow.
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public virtual System.Drawing.Color ShadowColor { get; set; }
member this.ShadowColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the annotation shadow.
Attributes TypeConverterAttribute
Annotation.ShadowOffset Annotation.ShadowOffset
I n this Article
Gets or sets the size of an annotation's shadow.
public virtual int ShadowOffset { get; set; }
member this.ShadowOffset : int with get, set
Returns
Int32 Int32
An integer value that represents the size of the shadow.
Annotation.SmartLabelStyle Annotation.SmartLabelStyle
I n this Article
Gets or sets the smart label style of an annotation.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(true)]
public System.Windows.Forms.DataVisualization.Charting.AnnotationSmartLabelStyle SmartLabelStyle {
get; set; }
member this.SmartLabelStyle :
System.Windows.Forms.DataVisualization.Charting.AnnotationSmartLabelStyle with get, set
Returns
AnnotationSmartLabelStyle AnnotationSmartLabelStyle
An AnnotationSmartLabelStyle object that represents an annotation's smart labels style properties.
Attributes BindableAttribute BrowsableAttribute
Remarks
Smart labels are used to prevent an annotation from overlapping the data point labels and other annotations.
Note
Returns
TextStyle TextStyle
A TextStyle value used to draw the text of an annotation.
Annotation.ToolTip Annotation.ToolTip
I n this Article
Gets or sets the tooltip text for an annotation.
public virtual string ToolTip { get; set; }
member this.ToolTip : string with get, set
Returns
String String
A string value that represents the tooltip text for an annotation.
Remarks
Special keywords can be used in the text when an annotation is anchored to a data point using the AnchorDataPoint
property.
Annotation.Visible Annotation.Visible
I n this Article
Gets or sets a flag that specifies whether an annotation is visible.
public virtual bool Visible { get; set; }
member this.Visible : bool with get, set
Returns
Boolean Boolean
true if the annotation is visible; otherwise, false .
Annotation.Width Annotation.Width
I n this Article
Gets or sets the width, in pixels, of an annotation.
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.DoubleNa
nValueConverter))]
public virtual double Width { get; set; }
member this.Width : double with get, set
Returns
Double Double
A double value that represents the width of an annotation.
Attributes TypeConverterAttribute
Remarks
For more information, see the Height property description.
Annotation.X Annotation.X
I n this Article
Gets or sets the X coordinate of an annotation.
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.DoubleNa
nValueConverter))]
public virtual double X { get; set; }
member this.X : double with get, set
Returns
Double Double
A double value that represents the X coordinate of an annotation's position.
Attributes TypeConverterAttribute
Remarks
The X coordinate of an annotation is specified in relative chart coordinates or in axes coordinates. Relative chart
coordinates are used by default.
To use axes coordinates, anchor an annotation to a data point using the AnchorDataPoint property, or set the
annotation axes using the AxisX and AxisY properties.
Set the X position to NaN to automatically calculate position when the annotation has been anchored using the
AnchorDataPoint property or the AnchorX and AnchorY properties.
Annotation.Y Annotation.Y
I n this Article
Gets or sets the Y coordinate of the annotation.
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.DoubleNa
nValueConverter))]
public virtual double Y { get; set; }
member this.Y : double with get, set
Returns
Double Double
A double value that represents the Y coordinate of an annotation's position.
Attributes TypeConverterAttribute
Remarks
The Y coordinate of an annotation is specified in relative chart coordinates or in axes coordinates. Relative chart
coordinates are used by default.
To use axes coordinates, anchor an annotation to a data point using the AnchorDataPoint property, or set the
annotation axes using the AxisX or AxisY properties.
Set the Y position to NaN to automatically calculate the position when the annotation has been anchored using the
AnchorDataPoint property or the AnchorX and AnchorY properties.
Annotation.YAxisName Annotation.YAxisName
I n this Article
Gets or sets the name of the Y axis to which an annotation is attached.
[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
public virtual string YAxisName { get; set; }
member this.YAxisName : string with get, set
Returns
String String
A string value that represents the name of the Y axis which an annotation is attached to.
Attributes BindableAttribute BrowsableAttribute
AnnotationCollection AnnotationCollection Class
Stores chart annotation objects.
D eclaration
public class AnnotationCollection :
System.Windows.Forms.DataVisualization.Charting.ChartNamedElementCollection<System.Windows.Forms
.DataVisualization.Charting.Annotation>
type AnnotationCollection = class
inherit ChartNamedElementCollection<Annotation>
I nheritance H ierarchy
Object Object
Collection<T> Collection<T>
ChartElementCollection<T> ChartElementCollection<T>
ChartNamedElementCollection<T> ChartNamedElementCollection<T>
Remarks
All chart annotations are stored in this collection.
This class includes methods to add, insert, iterate through and remove annotations from the collection.
Methods
FindByName(String)
FindByName(String)
Parameters
name String String
The name of the annotation to find.
Returns
Annotation Annotation
An Annotation object, or null if the object does not exist.
AnnotationGroup AnnotationGroup Class
Represents a group of annotations.
D eclaration
public class AnnotationGroup : System.Windows.Forms.DataVisualization.Charting.Annotation
type AnnotationGroup = class
inherit Annotation
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
Annotation Annotation
Remarks
The AnnotationGroup class represents a collection of annotations. This class can be used to manipulate annotations
relative to each other.
Constructors
AnnotationGroup()
AnnotationGroup()
Properties
Alignment
Alignment
AllowAnchorMoving
AllowAnchorMoving
Gets or sets a flag that specifies whether an annotation anchor may be moved with a mouse by the end user.
AllowMoving
AllowMoving
Gets or sets a flag that specifies whether an annotation may be moved with a mouse by the end user.
AllowPathEditing
AllowPathEditing
Gets or sets a flag that specifies whether the points of a polygon annotation may be moved with a mouse by the
end user.
AllowResizing
AllowResizing
Gets or sets a flag that specifies whether an annotation may be resized with a mouse by the end user.
AllowSelecting
AllowSelecting
Gets or sets a flag that specifies whether an annotation may be selected with a mouse by the end user.
AllowTextEditing
AllowTextEditing
Gets or sets a flag that specifies whether an annotation's text may be edited when the end user double clicks the
text.
Annotations
Annotations
AnnotationType
AnnotationType
BackColor
BackColor
BackGradientStyle
BackGradientStyle
BackHatchStyle
BackHatchStyle
ClipToChartArea
ClipToChartArea
Gets or sets the name of the chart area to which the annotation is clipped.
Font
Font
ForeColor
ForeColor
IsSelected
IsSelected
IsSizeAlwaysRelative
IsSizeAlwaysRelative
Gets or sets a flag that specifies whether the size of an annotation is always defined in relative chart coordinates.
LineColor
LineColor
LineDashStyle
LineDashStyle
LineWidth
LineWidth
ShadowOffset
ShadowOffset
TextStyle
TextStyle
Visible
Visible
Methods
Dispose(Boolean)
Dispose(Boolean)
Returns
ContentAlignment ContentAlignment
A ContentAlignment value that represents the content alignment of an annotation.
Attributes BrowsableAttribute
Remarks
This property is used to align text for TextAnnotation, RectangleAnnotation, EllipseAnnotation and CalloutAnnotation
objects, and to align a nonscaled image inside an ImageAnnotation object.
AnnotationGroup.AllowAnchorMoving AnnotationGroup.
AllowAnchorMoving
I n this Article
Gets or sets a flag that specifies whether an annotation anchor may be moved with a mouse by the end user.
Returns
Boolean Boolean
true if the annotation anchor may be moved; otherwise, false .
AnnotationGroup.AllowMoving AnnotationGroup.Allow
Moving
I n this Article
Gets or sets a flag that specifies whether an annotation may be moved with a mouse by the end user.
Returns
Boolean Boolean
true if the annotation may be moved; otherwise, false .
AnnotationGroup.AllowPathEditing AnnotationGroup.
AllowPathEditing
I n this Article
Gets or sets a flag that specifies whether the points of a polygon annotation may be moved with a mouse by the end
user.
public override bool AllowPathEditing { get; set; }
member this.AllowPathEditing : bool with get, set
Returns
Boolean Boolean
true if the points of the polygon annotation may be moved; otherwise, false .
AnnotationGroup.AllowResizing AnnotationGroup.Allow
Resizing
I n this Article
Gets or sets a flag that specifies whether an annotation may be resized with a mouse by the end user.
Returns
Boolean Boolean
true if the annotation may be resized; otherwise, false .
AnnotationGroup.AllowSelecting AnnotationGroup.Allow
Selecting
I n this Article
Gets or sets a flag that specifies whether an annotation may be selected with a mouse by the end user.
Returns
Boolean Boolean
true if the annotation may be selected; otherwise, false .
AnnotationGroup.AllowTextEditing AnnotationGroup.
AllowTextEditing
I n this Article
Gets or sets a flag that specifies whether an annotation's text may be edited when the end user double clicks the text.
Returns
Boolean Boolean
true if the annotation text may be edited; otherwise, false .
AnnotationGroup
I n this Article
Initializes a new instance of the AnnotationGroup class.
public AnnotationGroup ();
AnnotationGroup.Annotations AnnotationGroup.
Annotations
I n this Article
Gets the collection of annotations in the group.
Returns
AnnotationCollection AnnotationCollection
An AnnotationCollection object.
Remarks
Note that the coordinates of all annotations in the group are relative to the group annotation.
AnnotationGroup.AnnotationType AnnotationGroup.
AnnotationType
I n this Article
Gets the annotation type.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
public override string AnnotationType { get; }
member this.AnnotationType : string
Returns
String String
The annotation type.
Attributes BindableAttribute BrowsableAttribute
Remarks
This property is used to get the name of each annotation type, for example. Line, Rectangle, Ellipse, and so forth.
AnnotationGroup.BackColor AnnotationGroup.BackColor
I n this Article
Gets or sets the background color of an annotation.
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color BackColor { get; set; }
member this.BackColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used for the background of an annotation.
Attributes BrowsableAttribute TypeConverterAttribute
AnnotationGroup.BackGradientStyle AnnotationGroup.
BackGradientStyle
I n this Article
Gets or sets the background gradient style of an annotation.
[System.ComponentModel.Browsable(false)]
public override System.Windows.Forms.DataVisualization.Charting.GradientStyle BackGradientStyle {
get; set; }
member this.BackGradientStyle : System.Windows.Forms.DataVisualization.Charting.GradientStyle with
get, set
Returns
GradientStyle GradientStyle
A GradientStyle value used to draw the background of an annotation.
Attributes BrowsableAttribute
Remarks
Two colors are used to draw the gradient, BackColor and BackSecondaryColor.
AnnotationGroup.BackHatchStyle AnnotationGroup.Back
HatchStyle
I n this Article
Gets or sets the hatch style of an annotation background.
[System.ComponentModel.Browsable(false)]
public override System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle BackHatchStyle {
get; set; }
member this.BackHatchStyle : System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle with
get, set
Returns
ChartHatchStyle ChartHatchStyle
A ChartHatchStyle value used to draw the background of an annotation.
Attributes BrowsableAttribute
Remarks
Two colors are used to draw the hatching, BackColor and BackSecondaryColor.
AnnotationGroup.BackSecondaryColor Annotation
Group.BackSecondaryColor
I n this Article
Gets or sets the secondary color for the background of an annotation.
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color BackSecondaryColor { get; set; }
member this.BackSecondaryColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the background with hatching or gradient fill.
Attributes BrowsableAttribute TypeConverterAttribute
Remarks
A secondary color is used with BackColor when BackHatchStyle or BackGradientStyle are used.
AnnotationGroup.ClipToChartArea AnnotationGroup.Clip
ToChartArea
I n this Article
Gets or sets the name of the chart area to which the annotation is clipped.
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.LegendAr
eaNameConverter))]
public override string ClipToChartArea { get; set; }
member this.ClipToChartArea : string with get, set
Returns
String String
A string that represents the name of an existing chart area.
Attributes BrowsableAttribute TypeConverterAttribute
Remarks
If a chart area name is specified, the annotation will only be drawn inside the plotting area of that chart area. All parts
of the annotation outside of the plotting area will be clipped.
To disable chart area clipping, set this property to NaN or an empty string.
AnnotationGroup.Dispose AnnotationGroup.Dispose
I n this Article
Releases unmanaged and, optionally, managed resources.
protected override void Dispose (bool disposing);
override this.Dispose : bool -> unit
Parameters
disposing Boolean Boolean
true to release both unmanaged and managed resources; false to release only unmanaged resources.
AnnotationGroup.Font AnnotationGroup.Font
I n this Article
Gets or sets the font to use for the text of an annotation.
[System.ComponentModel.Browsable(false)]
public override System.Drawing.Font Font { get; set; }
member this.Font : System.Drawing.Font with get, set
Returns
Font Font
A Font object used for the text of an annotation.
Attributes BrowsableAttribute
AnnotationGroup.ForeColor AnnotationGroup.ForeColor
I n this Article
Gets or sets the text color for an annotation.
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color ForeColor { get; set; }
member this.ForeColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used for the text color of an annotation.
Attributes BrowsableAttribute TypeConverterAttribute
AnnotationGroup.IsSelected AnnotationGroup.IsSelected
I n this Article
Gets or sets a flag that determines if an annotation is selected.
[System.ComponentModel.Browsable(false)]
public override bool IsSelected { get; set; }
member this.IsSelected : bool with get, set
Returns
Boolean Boolean
true if the annotation is selected; otherwise, false .
Attributes BrowsableAttribute
AnnotationGroup.IsSizeAlwaysRelative AnnotationGroup.
IsSizeAlwaysRelative
I n this Article
Gets or sets a flag that specifies whether the size of an annotation is always defined in relative chart coordinates.
Returns
Boolean Boolean
true if the Width and Height of an annotation are always in chart relative coordinates; otherwise, false .
Remarks
The height and width of an annotation may be set in relative chart or in axes coordinates. By default, relative chart
coordinates are used.
To use axes coordinates, set the IsSizeAlwaysRelative property to false . Then either anchor the annotation to a data
point or set the AxisX or AxisY properties.
AnnotationGroup.LineColor AnnotationGroup.LineColor
I n this Article
Gets or sets the line color of the annotation.
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color LineColor { get; set; }
member this.LineColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw an annotation line.
Attributes BrowsableAttribute TypeConverterAttribute
AnnotationGroup.LineDashStyle AnnotationGroup.Line
DashStyle
I n this Article
Gets or sets the line style of the annotation.
[System.ComponentModel.Browsable(false)]
public override System.Windows.Forms.DataVisualization.Charting.ChartDashStyle LineDashStyle { get;
set; }
member this.LineDashStyle : System.Windows.Forms.DataVisualization.Charting.ChartDashStyle with get,
set
Returns
ChartDashStyle ChartDashStyle
A ChartDashStyle value used to draw an annotation line.
Attributes BrowsableAttribute
AnnotationGroup.LineWidth AnnotationGroup.LineWidth
I n this Article
Gets or sets the line width, in pixels, of the annotation.
[System.ComponentModel.Browsable(false)]
public override int LineWidth { get; set; }
member this.LineWidth : int with get, set
Returns
Int32 Int32
An integer value defining the width, in pixels, of an annotation line.
Attributes BrowsableAttribute
AnnotationGroup.ShadowColor AnnotationGroup.
ShadowColor
I n this Article
Gets or sets the color of the annotation's shadow.
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color ShadowColor { get; set; }
member this.ShadowColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the shadow of an annotation.
Attributes BrowsableAttribute TypeConverterAttribute
AnnotationGroup.ShadowOffset AnnotationGroup.
ShadowOffset
I n this Article
Gets or sets the size of the annotation's shadow.
[System.ComponentModel.Browsable(false)]
public override int ShadowOffset { get; set; }
member this.ShadowOffset : int with get, set
Returns
Int32 Int32
An integer value that represents the offset between an annotation and its shadow.
Attributes BrowsableAttribute
AnnotationGroup.TextStyle AnnotationGroup.TextStyle
I n this Article
Gets or sets the text style of an annotation.
[System.ComponentModel.Browsable(false)]
public override System.Windows.Forms.DataVisualization.Charting.TextStyle TextStyle { get; set; }
member this.TextStyle : System.Windows.Forms.DataVisualization.Charting.TextStyle with get, set
Returns
TextStyle TextStyle
A TextStyle enumeration value used to draw the text of an annotation.
Attributes BrowsableAttribute
AnnotationGroup.Visible AnnotationGroup.Visible
I n this Article
Gets or sets a flag that indicates whether the annotation is visible.
public override bool Visible { get; set; }
member this.Visible : bool with get, set
Returns
Boolean Boolean
true if the annotation is visible; otherwise, false .
AnnotationPathPoint AnnotationPathPoint Class
Represents a path point of a PolylineAnnotation or PolygonAnnotation, which is stored in their PathPoints property.
D eclaration
public class AnnotationPathPoint : System.Windows.Forms.DataVisualization.Charting.ChartElement
type AnnotationPathPoint = class
inherit ChartElement
I nheritance H ierarchy
Object Object
ChartElement ChartElement
Remarks
At run time, use the PolylineAnnotation.GraphicsPath or PolygonAnnotation.GraphicsPath property to set the path of a
polyline or polygon.
Constructors
AnnotationPathPoint()
AnnotationPathPoint()
AnnotationPathPoint(Single, Single)
AnnotationPathPoint(Single, Single)
Initializes a new instance of the AnnotationPathPoint class with the specified x and y values.
Initializes a new instance of the AnnotationPathPoint class with the specified x , y and point type values.
Properties
Name
Name
PointType
PointType
Y
Y
Overloads
AnnotationPathPoint()
Initializes a new instance of the AnnotationPathPoint class.
AnnotationPathPoint()
Initializes a new instance of the AnnotationPathPoint class.
public AnnotationPathPoint ();
Parameters
x Single Single
Point X-value.
y Single Single
Point Y -value.
Parameters
x Single Single
Point X-value.
y Single Single
Point Y -value.
type Byte Byte
Point type.
AnnotationPathPoint.Name AnnotationPathPoint.Name
I n this Article
Gets the name for the path point of an annotation.
[System.ComponentModel.Browsable(false)]
public string Name { get; }
member this.Name : string
Returns
String String
A string value that represents the name of the path point.
Attributes BrowsableAttribute
AnnotationPathPoint.PointType AnnotationPathPoint.
PointType
I n this Article
Gets or sets the type for the path point of an annotation.
[System.ComponentModel.Browsable(false)]
public byte PointType { get; set; }
member this.PointType : byte with get, set
Returns
Byte Byte
A byte value.
Attributes BrowsableAttribute
Remarks
See the PathPointType enumeration for more details.
AnnotationPathPoint.X AnnotationPathPoint.X
I n this Article
Gets or sets the X coordinate for the path point of an annotation.
[System.ComponentModel.Browsable(true)]
public float X { get; set; }
member this.X : single with get, set
Returns
Single Single
A float that represents the X value.
Attributes BrowsableAttribute
AnnotationPathPoint.Y AnnotationPathPoint.Y
I n this Article
Gets or sets the Y coordinate for the path point of an annotation.
[System.ComponentModel.Browsable(true)]
public float Y { get; set; }
member this.Y : single with get, set
Returns
Single Single
A float that represents the Y value.
Attributes BrowsableAttribute
AnnotationPathPointCollection AnnotationPathPoint
Collection Class
Represents a collection of PolylineAnnotation or PolygonAnnotation path points, which can be accessed using the
GraphicPathPoints property.
D eclaration
public class AnnotationPathPointCollection :
System.Windows.Forms.DataVisualization.Charting.ChartElementCollection<System.Windows.Forms.Data
Visualization.Charting.AnnotationPathPoint>
type AnnotationPathPointCollection = class
inherit ChartElementCollection<AnnotationPathPoint>
I nheritance H ierarchy
Object Object
Collection<T> Collection<T>
ChartElementCollection<T> ChartElementCollection<T>
Remarks
This collection is used at design time only, and employs serialization to expose the shape of a polyline or polygon
annotation, using their respective GraphicPathPoints collection properties.
At run time, use the GraphicsPath property to set the path of a PolylineAnnotation or PolygonAnnotation.
Constructors
AnnotationPathPointCollection(PolylineAnnotation)
AnnotationPathPointCollection(PolylineAnnotation)
Initializes a new instance of the AnnotationPathPointCollection class with the specified polyline annotation.
Methods
Dispose(Boolean)
Dispose(Boolean)
Invalidate()
Invalidate()
public AnnotationPathPointCollection
(System.Windows.Forms.DataVisualization.Charting.PolylineAnnotation annotation);
new System.Windows.Forms.DataVisualization.Charting.AnnotationPathPointCollection :
System.Windows.Forms.DataVisualization.Charting.PolylineAnnotation ->
System.Windows.Forms.DataVisualization.Charting.AnnotationPathPointCollection
Parameters
annotation PolylineAnnotation PolylineAnnotation
A polyline annotation.
AnnotationPathPointCollection.Dispose AnnotationPath
PointCollection.Dispose
I n this Article
Releases unmanaged and, optionally, managed resources
Parameters
disposing Boolean Boolean
true to release both unmanaged and managed resources; false to release only unmanaged resources.
AnnotationPathPointCollection.Invalidate Annotation
PathPointCollection.Invalidate
I n this Article
Forces the invalidation of the chart element.
D eclaration
public class AnnotationPositionChangingEventArgs : EventArgs
type AnnotationPositionChangingEventArgs = class
inherit EventArgs
I nheritance H ierarchy
Object Object
EventArgs EventArgs
Remarks
The AnnotationPositionChangingEventArgs class is used for the two annotation-positioning events,
AnnotationPositionChanging and AnnotationPositionChanged, in the Chart control.
The Annotation property gets the annotation object that is being positioned. This class also contains properties that
retrieve the new location, width, height and anchor location of the annotation that is repositioned.
Constructors
AnnotationPositionChangingEventArgs()
AnnotationPositionChangingEventArgs()
Properties
Annotation
Annotation
NewAnchorLocation
NewAnchorLocation
NewAnchorLocationX
NewAnchorLocationX
NewAnchorLocationY
NewAnchorLocationY
NewLocationX
NewLocationX
NewLocationY
NewLocationY
NewPosition
NewPosition
NewSizeHeight
NewSizeHeight
NewSizeWidth
NewSizeWidth
Returns
Annotation Annotation
The Annotation object.
Remarks
The Annotation property allows the developer to set Annotation properties during the AnnotationPositionChanging
and AnnotationPositionChanged events of the Chart control.
AnnotationPositionChangingEventArgs
I n this Article
Initializes a new instance of the AnnotationPositionChangingEventArgs class.
public AnnotationPositionChangingEventArgs ();
AnnotationPositionChangingEventArgs.NewAnchor
Location AnnotationPositionChangingEventArgs.New
AnchorLocation
I n this Article
Gets or sets the new anchor location of the annotation.
[System.ComponentModel.Browsable(false)]
public System.Drawing.PointF NewAnchorLocation { get; set; }
member this.NewAnchorLocation : System.Drawing.PointF with get, set
Returns
PointF PointF
A PointF object that represents the new anchor position.
Attributes BrowsableAttribute
AnnotationPositionChangingEventArgs.NewAnchor
LocationX AnnotationPositionChangingEventArgs.New
AnchorLocationX
I n this Article
Gets or sets the new annotation anchor point X location.
public double NewAnchorLocationX { get; set; }
member this.NewAnchorLocationX : double with get, set
Returns
Double Double
A double value that represents the new annotation anchor point X location.
Remarks
When the AnnotationPositionChanging and AnnotationPositionChanging events are raised, the NewAnchorLocationX
property determines the new X coordinate of the annotation. This information is useful when the annotation is newly
anchored to a data point.
AnnotationPositionChangingEventArgs.NewAnchor
LocationY AnnotationPositionChangingEventArgs.New
AnchorLocationY
I n this Article
Gets or sets the new annotation anchor point Y location.
public double NewAnchorLocationY { get; set; }
member this.NewAnchorLocationY : double with get, set
Returns
Double Double
A double value representing the new annotation anchor point Y location.
Remarks
When the AnnotationPositionChanging and AnnotationPositionChanged events are raised, the NewAnchorLocationY
property determines the new Y coordinate of the annotation. This information is useful when the annotation is newly
anchored to a data point.
AnnotationPositionChangingEventArgs.NewLocationX
AnnotationPositionChangingEventArgs.NewLocationX
I n this Article
Gets or sets the new X coordinate location of the annotation.
Returns
Double Double
A double value that represents the new X coordinate location of the annotation.
Remarks
When the AnnotationPositionChanging and AnnotationPositionChanged events are raised, the NewLocationX
property defines the X-coordinate location of the annotation.
AnnotationPositionChangingEventArgs.NewLocationY
AnnotationPositionChangingEventArgs.NewLocationY
I n this Article
Gets or sets the new Y coordinate of the annotation location.
Returns
Double Double
A double value that represents the new Y coordinate of the annotation location.
Remarks
When the AnnotationPositionChanging and AnnotationPositionChanged events are raised, the NewLocationY
property defines the Y -coordinate location of the annotation.
AnnotationPositionChangingEventArgs.NewPosition
AnnotationPositionChangingEventArgs.NewPosition
I n this Article
Gets or sets the new location and size of the annotation.
[System.ComponentModel.Browsable(false)]
public System.Drawing.RectangleF NewPosition { get; set; }
member this.NewPosition : System.Drawing.RectangleF with get, set
Returns
RectangleF RectangleF
A RectangleF object.
Attributes BrowsableAttribute
AnnotationPositionChangingEventArgs.NewSizeHeight
AnnotationPositionChangingEventArgs.NewSizeHeight
I n this Article
Gets or sets the new height of the annotation.
Returns
Double Double
A double value that represents the new height of the annotation.
Remarks
When the AnnotationPositionChanging and AnnotationPositionChanged events are raised, use the NewSizeHeight
property to determine the new height of the annotation. This information can be used when you resize the annotation.
AnnotationPositionChangingEventArgs.NewSizeWidth
AnnotationPositionChangingEventArgs.NewSizeWidth
I n this Article
Gets or sets the new width of the annotation.
Returns
Double Double
A double value that represents the new width of the annotation.
Remarks
When the AnnotationPositionChanging and AnnotationPositionChanged events are raised, use the NewSizeWidth
property to determine the new width of the annotation. This information can be used when you resize the annotation.
AnnotationSmartLabelStyle AnnotationSmartLabelStyle
Class
Stores the smart label properties of an annotation.
D eclaration
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.NoNa
meExpandableObjectConverter))]
public class AnnotationSmartLabelStyle :
System.Windows.Forms.DataVisualization.Charting.SmartLabelStyle
type AnnotationSmartLabelStyle = class
inherit SmartLabelStyle
I nheritance H ierarchy
Object Object
SmartLabelStyle SmartLabelStyle
Remarks
This class is derived from the SmartLabelStyle class used for Series objects.
Constructors
AnnotationSmartLabelStyle()
AnnotationSmartLabelStyle()
AnnotationSmartLabelStyle(Object)
AnnotationSmartLabelStyle(Object)
Initializes a new instance of the AnnotationSmartLabelStyle class with the specified chart element.
Properties
CalloutBackColor
CalloutBackColor
Gets or sets the back color of the label callout. This property is only applicable when the CalloutStyle property is
set to a value of Box.
CalloutLineAnchorCapStyle
CalloutLineAnchorCapStyle
Gets or sets the anchor cap style for the label callout line.
CalloutLineColor
CalloutLineColor
CalloutLineDashStyle
CalloutLineDashStyle
CalloutLineWidth
CalloutLineWidth
CalloutStyle
CalloutStyle
Overloads
AnnotationSmartLabelStyle()
Initializes a new instance of the AnnotationSmartLabelStyle
class.
AnnotationSmartLabelStyle(Object) AnnotationSmartLabel
Style(Object) Initializes a new instance of the AnnotationSmartLabelStyle
class with the specified chart element.
AnnotationSmartLabelStyle()
Initializes a new instance of the AnnotationSmartLabelStyle class.
public AnnotationSmartLabelStyle ();
AnnotationSmartLabelStyle(Object)
AnnotationSmartLabelStyle(Object)
Initializes a new instance of the AnnotationSmartLabelStyle class with the specified chart element.
public AnnotationSmartLabelStyle (object chartElement);
new System.Windows.Forms.DataVisualization.Charting.AnnotationSmartLabelStyle : obj ->
System.Windows.Forms.DataVisualization.Charting.AnnotationSmartLabelStyle
Parameters
chartElement Object Object
Chart element that this style belongs to.
AnnotationSmartLabelStyle.CalloutBackColor Annotation
SmartLabelStyle.CalloutBackColor
I n this Article
Gets or sets the back color of the label callout. This property is only applicable when the CalloutStyle property is set to
a value of Box.
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color CalloutBackColor { get; set; }
member this.CalloutBackColor : System.Drawing.Color with get, set
Returns
Color Color
A Color object.
Attributes BrowsableAttribute TypeConverterAttribute
Remarks
This property is for internal use and is hidden at design time and run time.
AnnotationSmartLabelStyle.CalloutLineAnchorCapStyle
AnnotationSmartLabelStyle.CalloutLineAnchorCapStyle
I n this Article
Gets or sets the anchor cap style for the label callout line.
[System.ComponentModel.Browsable(false)]
public override System.Windows.Forms.DataVisualization.Charting.LineAnchorCapStyle
CalloutLineAnchorCapStyle { get; set; }
member this.CalloutLineAnchorCapStyle :
System.Windows.Forms.DataVisualization.Charting.LineAnchorCapStyle with get, set
Returns
LineAnchorCapStyle LineAnchorCapStyle
A CalloutLineAnchorCapStyle object.
Attributes BrowsableAttribute
Remarks
This method is for internal use and is hidden at design and run time.
AnnotationSmartLabelStyle.CalloutLineColor Annotation
SmartLabelStyle.CalloutLineColor
I n this Article
Gets or sets the color of the label callout line.
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color CalloutLineColor { get; set; }
member this.CalloutLineColor : System.Drawing.Color with get, set
Returns
Color Color
A Color object.
Attributes BrowsableAttribute TypeConverterAttribute
Remarks
This property is for internal use and is hidden at design time and run time.
AnnotationSmartLabelStyle.CalloutLineDashStyle
AnnotationSmartLabelStyle.CalloutLineDashStyle
I n this Article
Gets or sets the style of the label callout line.
[System.ComponentModel.Browsable(false)]
public override System.Windows.Forms.DataVisualization.Charting.ChartDashStyle CalloutLineDashStyle
{ get; set; }
member this.CalloutLineDashStyle : System.Windows.Forms.DataVisualization.Charting.ChartDashStyle
with get, set
Returns
ChartDashStyle ChartDashStyle
A ChartDashStyle object.
Attributes BrowsableAttribute
Remarks
This property is for internal use and is hidden at design time and run time.
AnnotationSmartLabelStyle.CalloutLineWidth Annotation
SmartLabelStyle.CalloutLineWidth
I n this Article
Gets or sets the width of the label callout line.
[System.ComponentModel.Browsable(false)]
public override int CalloutLineWidth { get; set; }
member this.CalloutLineWidth : int with get, set
Returns
Int32 Int32
The width of the callout line.
Attributes BrowsableAttribute
Remarks
This property is for internal use and is hidden at design time and run time.
AnnotationSmartLabelStyle.CalloutStyle Annotation
SmartLabelStyle.CalloutStyle
I n this Article
Gets or sets the callout style of the repositioned smart labels.
[System.ComponentModel.Browsable(false)]
public override System.Windows.Forms.DataVisualization.Charting.LabelCalloutStyle CalloutStyle {
get; set; }
member this.CalloutStyle : System.Windows.Forms.DataVisualization.Charting.LabelCalloutStyle with
get, set
Returns
LabelCalloutStyle LabelCalloutStyle
A LabelCalloutStyle object.
Attributes BrowsableAttribute
Remarks
This property is for internal use and is hidden at design time and run time.
AnovaResult AnovaResult Class
Represents the results of an ANOVA statistical test.
D eclaration
public class AnovaResult
type AnovaResult = class
I nheritance H ierarchy
Object Object
Constructors
AnovaResult()
AnovaResult()
Properties
DegreeOfFreedomBetweenGroups
DegreeOfFreedomBetweenGroups
DegreeOfFreedomTotal
DegreeOfFreedomTotal
DegreeOfFreedomWithinGroups
DegreeOfFreedomWithinGroups
FCriticalValue
FCriticalValue
FRatio
FRatio
MeanSquareVarianceWithinGroups
MeanSquareVarianceWithinGroups
SumOfSquaresBetweenGroups
SumOfSquaresBetweenGroups
SumOfSquaresTotal
SumOfSquaresTotal
SumOfSquaresWithinGroups
SumOfSquaresWithinGroups
Returns
Double Double
A double value.
AnovaResult.DegreeOfFreedomTotal AnovaResult.
DegreeOfFreedomTotal
I n this Article
Gets the total degree of freedom.
Returns
Double Double
A double value.
AnovaResult.DegreeOfFreedomWithinGroups Anova
Result.DegreeOfFreedomWithinGroups
I n this Article
Gets the degree of freedom within groups.
Returns
Double Double
A double value.
AnovaResult.FCriticalValue AnovaResult.FCriticalValue
I n this Article
Gets the F critical value.
public double FCriticalValue { get; }
member this.FCriticalValue : double
Returns
Double Double
A double value.
AnovaResult.FRatio AnovaResult.FRatio
I n this Article
Gets the F ratio.
public double FRatio { get; }
member this.FRatio : double
Returns
Double Double
A double value.
AnovaResult.MeanSquareVarianceBetweenGroups Anova
Result.MeanSquareVarianceBetweenGroups
I n this Article
Gets the mean square variance between groups.
Returns
Double Double
A double value.
AnovaResult.MeanSquareVarianceWithinGroups Anova
Result.MeanSquareVarianceWithinGroups
I n this Article
Gets the mean square variance within groups.
Returns
Double Double
A double value.
AnovaResult.SumOfSquaresBetweenGroups AnovaResult.
SumOfSquaresBetweenGroups
I n this Article
Gets the sum of the squares between groups.
Returns
Double Double
A double value.
AnovaResult.SumOfSquaresTotal AnovaResult.SumOf
SquaresTotal
I n this Article
Gets the total sum of the squares.
Returns
Double Double
A double value.
AnovaResult.SumOfSquaresWithinGroups AnovaResult.
SumOfSquaresWithinGroups
I n this Article
Gets the sum of the squares within groups.
Returns
Double Double
A double value.
AntiAliasingStyles AntiAliasingStyles Enum
Specifies the anti-aliasing options for the chart.
D eclaration
[System.Flags]
public enum AntiAliasingStyles
type AntiAliasingStyles =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Fields
All All Use anti-aliasing for text and graphics.
Graphics Graphics Use anti-aliasing when drawing graphics primitives such as circles or rectangles.
D eclaration
[System.Flags]
public enum AreaAlignmentOrientations
type AreaAlignmentOrientations =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The AreaAlignmentOrientations enumeration represents the physical orientation, such as vertical or horizontal, of a
chart area.
In contrast, the AreaAlignmentStyles enumeration represents the chart elements, such as the cursor or inner plot
position, which can be used to align a chart area.
Fields
All All Chart areas are aligned horizontally and vertically.
D eclaration
[System.Flags]
public enum AreaAlignmentStyles
type AreaAlignmentStyles =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Fields
All All Chart areas are aligned using all values.
PlotPosition PlotPosition Chart areas are aligned by their inner plot position.
Position Position Chart areas are aligned by the chart area position.
ArrowAnnotation ArrowAnnotation Class
Represents an arrow annotation.
D eclaration
public class ArrowAnnotation : System.Windows.Forms.DataVisualization.Charting.Annotation
type ArrowAnnotation = class
inherit Annotation
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
Annotation Annotation
Remarks
Arrow annotations can be used to connect to points on the chart or to highlight a single chart area.
Different arrow styles and sizes can be applied to the annotation.
Constructors
ArrowAnnotation()
ArrowAnnotation()
Properties
AnchorAlignment
AnchorAlignment
Gets or sets the position alignment of the annotation to the anchor point.
AnnotationType
AnnotationType
Gets the name of the annotation type. For internal use, should not be used.
ArrowSize
ArrowSize
ArrowStyle
ArrowStyle
Gets or sets the arrow style.
ArrowAnnotation.AnchorAlignment ArrowAnnotation.
AnchorAlignment
I n this Article
Gets or sets the position alignment of the annotation to the anchor point.
[System.ComponentModel.Browsable(false)]
public override System.Drawing.ContentAlignment AnchorAlignment { get; set; }
member this.AnchorAlignment : System.Drawing.ContentAlignment with get, set
Returns
ContentAlignment ContentAlignment
A ContentAlignment enumeration value that represents the alignment of the annotation to the anchor point.
Attributes BrowsableAttribute
Remarks
The annotation must be anchored using either AnchorDataPoint, or the AnchorX and AnchorY properties.
Its X and Y properties must be set to NaN.
ArrowAnnotation.AnnotationType ArrowAnnotation.
AnnotationType
I n this Article
Gets the name of the annotation type. For internal use, should not be used.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
public override string AnnotationType { get; }
member this.AnnotationType : string
Returns
String String
A string value that represents the name of the annotation type.
Attributes BindableAttribute BrowsableAttribute
Remarks
Gets the name of each annotation type such as Line, Rectangle, Ellipse, and so forth.
This property is for internal use and is hidden at design time and run time.
ArrowAnnotation
I n this Article
Initializes a new instance of the ArrowAnnotation class.
public ArrowAnnotation ();
ArrowAnnotation.ArrowSize ArrowAnnotation.ArrowSize
I n this Article
Gets or sets an arrow size, in pixels.
[System.ComponentModel.Bindable(true)]
public virtual int ArrowSize { get; set; }
member this.ArrowSize : int with get, set
Returns
Int32 Int32
An integer value that represents arrow size - that is, its thickness - in pixels.
Attributes BindableAttribute
ArrowAnnotation.ArrowStyle ArrowAnnotation.Arrow
Style
I n this Article
Gets or sets the arrow style.
[System.ComponentModel.Bindable(true)]
public virtual System.Windows.Forms.DataVisualization.Charting.ArrowStyle ArrowStyle { get; set; }
member this.ArrowStyle : System.Windows.Forms.DataVisualization.Charting.ArrowStyle with get, set
Returns
ArrowStyle ArrowStyle
The ArrowStyle of an annotation.
Attributes BindableAttribute
ArrowStyle ArrowStyle Enum
Specifies styles for an arrow annotation.
D eclaration
public enum ArrowStyle
type ArrowStyle =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Fields
DoubleArrow DoubleArrow An arrow that points in two directions.
D eclaration
public class Axis : System.Windows.Forms.DataVisualization.Charting.ChartNamedElement
type Axis = class
inherit ChartNamedElement
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
Remarks
This class encapsulates all the functionality for axes in the Chart control, and is exposed by the AxisX, AxisY, AxisX2 and
AxisY2 properties of ChartArea objects.
For all charts - except bar, stacked bar, pie and doughnut - the primary and secondary axes are as follows:
AX IS T YPE D ES CR IPTIO N
Bar and stacked-bar charts have their axes rotated 90 degrees clockwise, so the primary X axis for these two chart
types is the left-vertical axis.
Note There can be only one set of axes - two vertical and two horizontal - for each ChartArea object.
The Axis class also contains several methods that can be used to convert axis values to absolute pixel coordinates,
which are useful for 2D custom drawing, or to relative coordinates, which are useful for 3D custom drawing. Absolute
and relative coordinates can also be converted to axis values.
The following are the most important axis elements exposed by the Axis class:
AX IS ELEMENT D ES CR IPTIO N
Axis(ChartArea, AxisName)
Axis(ChartArea, AxisName)
Initializes a new instance of the Axis class with the specified chartArea and axisTypeName values.
Properties
ArrowStyle
ArrowStyle
Gets or sets the arrow style of a 2D axis; this style is not applied to 3D chart areas.
AxisName
AxisName
Crossing
Crossing
Gets or sets the location at which an axis is crossed by its associated axis.
CustomLabels
CustomLabels
Enabled
Enabled
InterlacedColor
InterlacedColor
Interval
Interval
IntervalAutoMode
IntervalAutoMode
Gets or sets a flag that determines if a fixed number of intervals is used on the axis, or if the number of intervals
depends on the axis size.
IntervalOffset
IntervalOffset
IntervalOffsetType
IntervalOffsetType
IntervalType
IntervalType
IsInterlaced
IsInterlaced
Gets or sets a flag that determines if interlaced strip lines are displayed for an axis.
IsLabelAutoFit
IsLabelAutoFit
Gets or sets a flag that determines whether axis labels are automatically fitted.
IsLogarithmic
IsLogarithmic
Gets or sets a flag which indicates whether the axis is logarithmic. Zeros or negative data values are not allowed
on logarithmic charts.
IsMarginVisible
IsMarginVisible
Gets or sets a flag that determines whether to add a margin to the axis.
IsMarksNextToAxis
IsMarksNextToAxis
Gets or sets a flag that determines whether tick marks and axis labels move with an axis if the crossing point of an
axis changes.
IsReversed
IsReversed
IsStartedFromZero
IsStartedFromZero
Gets or sets a flag which indicates whether the minimum value of the axis will be automatically set to zero if all
data point values are positive. If there are negative data point values, the minimum value of the data points will be
used.
LabelAutoFitMaxFontSize
LabelAutoFitMaxFontSize
Gets or sets the maximum font size that can be used by the label auto-fitting algorithm.
LabelAutoFitMinFontSize
LabelAutoFitMinFontSize
Gets or sets the minimum font size that can be used by the label auto-fitting algorithm.
LabelAutoFitStyle
LabelAutoFitStyle
Gets or sets the allowable label changes that can be made to enable the label to be fit along an axis.
LabelStyle
LabelStyle
LineColor
LineColor
LineDashStyle
LineDashStyle
Gets or sets the line style of an axis.
LineWidth
LineWidth
LogarithmBase
LogarithmBase
Gets or sets a value for the logarithm base for the logarithmic axis.
MajorGrid
MajorGrid
Gets or sets a Grid object used to set the major grid line properties for an axis.
MajorTickMark
MajorTickMark
Gets or sets a TickMark object used to set the major tick mark properties of an axis.
Maximum
Maximum
MaximumAutoSize
MaximumAutoSize
Gets or sets the maximum size of the axis, measured as a percentage of the chart area. This value is used by the
automatic layout algorithm.
Minimum
Minimum
MinorGrid
MinorGrid
Gets or sets a Grid object used to specify the minor grid lines attributes of an axis.
MinorTickMark
MinorTickMark
Gets or sets a TickMark object used to set the minor tick mark properties of an axis.
Name
Name
ScaleBreakStyle
ScaleBreakStyle
ScaleView
ScaleView
ScrollBar
ScrollBar
StripLines
StripLines
TextOrientation
TextOrientation
Title
Title
TitleAlignment
TitleAlignment
TitleForeColor
TitleForeColor
ToolTip
ToolTip
Methods
Dispose(Boolean)
Dispose(Boolean)
GetPosition(Double)
GetPosition(Double)
Converts an axis value to a relative position (0-100%). If an axis is logarithmic, the value is converted to a linear
scale.
PixelPositionToValue(Double)
PixelPositionToValue(Double)
Converts an absolute pixel position along an axis to an axis value. This method only works in paint events.
PositionToValue(Double)
PositionToValue(Double)
Converts a relative coordinate along an axis to an axis value. This method only works in paint events.
RoundAxisValues()
RoundAxisValues()
ValueToPixelPosition(Double)
ValueToPixelPosition(Double)
Converts an axis value to an absolute coordinate along an axis. Measured in pixels. This method only works in
paint events.
ValueToPosition(Double)
ValueToPosition(Double)
Converts an axis value to its relative position (0-100%). If an axis has a logarithmic scale, the value is converted to
a linear scale. This method only works in paint events.
Axis.ArrowStyle Axis.ArrowStyle
I n this Article
Gets or sets the arrow style of a 2D axis; this style is not applied to 3D chart areas.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.AxisArrowStyle ArrowStyle { get; set; }
member this.ArrowStyle : System.Windows.Forms.DataVisualization.Charting.AxisArrowStyle with get,
set
Returns
AxisArrowStyle AxisArrowStyle
An AxisArrowStyle enumeration value.
Attributes BindableAttribute
Axis Axis
I n this Article
Overloads
Axis()
Initializes a new instance of the Axis class.
Axis()
Initializes a new instance of the Axis class.
public Axis ();
Parameters
chartArea ChartArea ChartArea
The chart area.
axisTypeName AxisName AxisName
The axis name.
Axis.AxisName Axis.AxisName
I n this Article
Gets the name of the axis, which can be either X, Y, X2 or Y2.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
public virtual System.Windows.Forms.DataVisualization.Charting.AxisName AxisName { get; }
member this.AxisName : System.Windows.Forms.DataVisualization.Charting.AxisName
Returns
AxisName AxisName
An AxisName enumeration value.
Attributes BindableAttribute BrowsableAttribute
Axis.Crossing Axis.Crossing
I n this Article
Gets or sets the location at which an axis is crossed by its associated axis.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.AxisCros
singValueConverter))]
public virtual double Crossing { get; set; }
member this.Crossing : double with get, set
Returns
Double Double
A double value that represents where an axis is crossed by its associated axis. The default value is NaN.
Attributes BindableAttribute TypeConverterAttribute
Remarks
Setting this property for a primary axis will determine where the other primary axis crosses it, and similarly setting it
for a secondary axis will determine where the other secondary axis crosses it. For example, setting the Crossing
property of the primary X-axis determines where the primary Y -axis will cross it.
Four modes can be used for the Crossing property of an axis:
"Auto", which means that the crossing value will be set to the minimum or maximum value for the relevant axis. If the
axis is primary, the value will be its minimum value, if the axis is secondary it will its maximum value. To set to "Auto" at
run time, use a NaN value.
"Minimum", which means the crossing value of the axis will be its minimum value. To set to "Minimum" at run-time use
a MinValue value.
"Maximum", which means the crossing value of the axis will be its maximum value. To set to "Maximum" at run-time
use a MaxValue value.
A specified double value that is between the minimum and maximum values for the relevant axis. If the crossing value
is less then minimum value, or the crossing value is greater than maximum value, an exception will be thrown.
When a non-default crossing value is used, the labels and tick marks of the axis may or may not follow the crossing
axis, depending on the IsMarksNextToAxis property setting. By default they will move with the crossing axis.
Axis.CustomLabels Axis.CustomLabels
I n this Article
Gets a CustomLabelsCollection object used to store CustomLabel objects.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.CustomLabelsCollection CustomLabels { get; }
member this.CustomLabels : System.Windows.Forms.DataVisualization.Charting.CustomLabelsCollection
Returns
CustomLabelsCollection CustomLabelsCollection
A CustomLabelsCollection object.
Attributes BindableAttribute
Remarks
Use this property to add or remove custom labels for an axis. Using CustomLabel objects enables the developer to
arbitrarily set the text for axis labels.
Only custom labels can be used in the second row of labels. Also, if a custom label is used in the first label row, then all
labels in this first row must be custom labels.
Labels can also be set from the data points, or generated automatically from the axis scale.
Axis.Dispose Axis.Dispose
I n this Article
Releases unmanaged and, optionally, managed resources.
protected override void Dispose (bool disposing);
override this.Dispose : bool -> unit
Parameters
disposing Boolean Boolean
true to release both unmanaged and managed resources; false to release only unmanaged resources.
Axis.Enabled Axis.Enabled
I n this Article
Gets or sets a value that indicates whether an axis is enabled.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.AxisEnabled Enabled { get; set; }
member this.Enabled : System.Windows.Forms.DataVisualization.Charting.AxisEnabled with get, set
Returns
AxisEnabled AxisEnabled
An AxisEnabled enumeration value. The default value is Auto.
Attributes BindableAttribute
Remarks
If an axis is not enabled, the axis, along with its attributes (tick marks, strip lines, labels, and so forth), will not be
displayed.
If an axis is enabled, the axis, along with all its attributes (tick marks, strip lines, labels, and so forth), will be displayed
regardless of whether or not it is being used to plot a Series.
If a value of Auto is used, an axis may or may not be displayed, depending on whether it is being used to plot a Series.
The axes that are used to plot data are determined by the XAxisType and YAxisType property settings.
Note
If an axis is not enabled but an adjacent axis is using grid lines, one of those grid lines will be displayed in place of the
axis that is not enabled. The same situation will occur if the Enabled property of an axis is set to Auto, but the axis is not
being used to plot data; the grid line of an adjacent axis will be drawn instead.
Axis.GetPosition Axis.GetPosition
I n this Article
Converts an axis value to a relative position (0-100%). If an axis is logarithmic, the value is converted to a linear scale.
public double GetPosition (double axisValue);
member this.GetPosition : double -> double
Parameters
axisValue Double Double
The axis value.
Returns
Double Double
A double value that represents the relative position (0-100%).
Axis.InterlacedColor Axis.InterlacedColor
I n this Article
Gets or sets the color of interlaced strip lines.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color InterlacedColor { get; set; }
member this.InterlacedColor : System.Drawing.Color with get, set
Returns
Color Color
A Color object that represents the color of interlaced strip lines.
Attributes BindableAttribute TypeConverterAttribute
Remarks
Use this property to specify the color of interlaced strip lines that are displayed when you invoke the InterlacedColor
property.
To specify the border color of the interlaced strip lines, you must display the strips using the StripLines collection
property instead of the InterlacedColor property.
Axis.Interval Axis.Interval
I n this Article
Gets or sets the interval of an axis.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.AxisInte
rvalValueConverter))]
public double Interval { get; set; }
member this.Interval : double with get, set
Returns
Double Double
A double value that represents the interval of an axis. The default value is "Auto", which is represented by a value of
zero (0).
Attributes BindableAttribute TypeConverterAttribute
Remarks
This property determines how often the labels and major tick marks and grid lines associated with the axis are drawn if
the Interval property value of a label, tick mark, or grid line is set to NaN, which signifies that it is not set.
The Interval property of a major tick mark, grid line or label of the axis has priority over the Interval property setting
of the Axis object.
A value of zero represents an "Auto" value. This Interval property cannot be set to NaN. If you assign this property a
value of NaN, a value of zero will be used instead.
Note The minor grid lines and tick marks of an axis never use this property for their interval.
The interval type of the axis is determined by the IntervalType property.
Axis.IntervalAutoMode Axis.IntervalAutoMode
I n this Article
Gets or sets a flag that determines if a fixed number of intervals is used on the axis, or if the number of intervals
depends on the axis size.
Returns
IntervalAutoMode IntervalAutoMode
An IntervalAutoMode enumeration value. The default value is FixedCount.
Remarks
When the Interval property is set to "Auto", the IntervalAutoMode property determines how many intervals should be
calculated. If your chart is resized or redrawn often, you can set the IntervalAutoMode property to VariableCount, in
which case the chart will dynamically calculate axis intervals. This is especially useful in situations where the chart
intervals are displayed differently, depending on their data.
Axis.IntervalOffset Axis.IntervalOffset
I n this Article
Gets or sets the interval offset of an axis.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.AxisInte
rvalValueConverter))]
public double IntervalOffset { get; set; }
member this.IntervalOffset : double with get, set
Returns
Double Double
A double value that represents the interval offset of an axis. The default value is "Auto", which is represented by a
value of zero (0).
Attributes BindableAttribute TypeConverterAttribute
Remarks
The IntervalOffset property determines the interval offset of an axis. This value is used as the interval offset of an axis'
labels and the major tick marks and grid lines associated with the axis if the IntervalOffset property value of the
labels, tick marks, or grid lines is not set, which is represented by a value of NaN.
The IntervalOffset property of the tick marks, labels and grid lines of an axis has priority over the IntervalOffset
property setting of the Axis object.
A value of zero represents an "Auto" value. Also, Interval cannot be set to not set (that is, a NaN ). If you assign NaN, a
value of "Auto" - that is, a value of zero - will be used instead.
Note The minor grid lines and tick marks of an axis never use this property for their interval offset.
The interval offset type of the axis is determined by the IntervalOffsetType property.
Axis.IntervalOffsetType Axis.IntervalOffsetType
I n this Article
Gets or sets the interval offset type of an axis.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType IntervalOffsetType {
get; set; }
member this.IntervalOffsetType :
System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType with get, set
Returns
DateTimeIntervalType DateTimeIntervalType
The interval offset type of an axis. The default value is Auto.
Attributes BindableAttribute
Remarks
This property determines the interval offset type of an axis, and is used for the interval offset type of an axis' labels, and
major tick marks or grid lines if the axis element's own IntervalOffsetType property value is set to NotSet.
Setting this property to NotSet will result in a value of Auto being used (only the axis elements such as major grid
lines, etc. can be set to NotSet).
Note
The minor grid lines and tick marks of an axis never use this property for their interval offset type.
The interval of the axis is determined by the IntervalOffset property.
Axis.IntervalType Axis.IntervalType
I n this Article
Gets or sets the interval type of an axis.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType IntervalType { get; set;
}
member this.IntervalType : System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType with
get, set
Returns
DateTimeIntervalType DateTimeIntervalType
A DateTimeIntervalType that represents the interval type of an axis. The default value is Auto.
Attributes BindableAttribute
Remarks
This property determines the interval type of an axis, and is used for the interval type of an axis' labels, major tick
marks, or major grid lines if the axis element's own IntervalType property value is set to NotSet.
Setting this property to NotSet will result in a value of Auto being used. Only the axis elements, such as grid lines, can
be set to NotSet.
Note The minor grid lines and tick marks of an axis never use this property for their interval type.
The interval of the axis is determined by the Interval property.
Im p o rt a nt
If the axis interval type is represented by a time such as hours, minutes, and so forth, then in order for zooming to
function correctly, the IntervalType must be set to a time value as well. For example, if ChartArea1.AxisX.IntervalType is
set to hours, then ChartArea1.CursorX.IntervalType could be set to minutes.
Axis.IsInterlaced Axis.IsInterlaced
I n this Article
Gets or sets a flag that determines if interlaced strip lines are displayed for an axis.
[System.ComponentModel.Bindable(true)]
public bool IsInterlaced { get; set; }
member this.IsInterlaced : bool with get, set
Returns
Boolean Boolean
true if interlaced strip lines are displayed for an axis; otherwise, False .
Attributes BindableAttribute
Axis.IsLabelAutoFit Axis.IsLabelAutoFit
I n this Article
Gets or sets a flag that determines whether axis labels are automatically fitted.
[System.ComponentModel.Bindable(true)]
public bool IsLabelAutoFit { get; set; }
member this.IsLabelAutoFit : bool with get, set
Returns
Boolean Boolean
true if axis labels are automatically fitted; otherwise, False .
Attributes BindableAttribute
Axis.IsLogarithmic Axis.IsLogarithmic
I n this Article
Gets or sets a flag which indicates whether the axis is logarithmic. Zeros or negative data values are not allowed on
logarithmic charts.
[System.ComponentModel.Bindable(true)]
public bool IsLogarithmic { get; set; }
member this.IsLogarithmic : bool with get, set
Returns
Boolean Boolean
true if the axis is logarithmic; otherwise, False .
Attributes BindableAttribute
Axis.IsMarginVisible Axis.IsMarginVisible
I n this Article
Gets or sets a flag that determines whether to add a margin to the axis.
[System.ComponentModel.Bindable(true)]
public bool IsMarginVisible { get; set; }
member this.IsMarginVisible : bool with get, set
Returns
Boolean Boolean
true if a space is added between the first or last data point and the border of chart area.
Attributes BindableAttribute
Axis.IsMarksNextToAxis Axis.IsMarksNextToAxis
I n this Article
Gets or sets a flag that determines whether tick marks and axis labels move with an axis if the crossing point of an axis
changes.
[System.ComponentModel.Bindable(true)]
public virtual bool IsMarksNextToAxis { get; set; }
member this.IsMarksNextToAxis : bool with get, set
Returns
Boolean Boolean
true if tick marks and axis labels move with an axis when the crossing point of an axis changes; otherwise, False .
Attributes BindableAttribute
Axis.IsReversed Axis.IsReversed
I n this Article
Gets or sets a flag which indicates whether the axis is reversed.
[System.ComponentModel.Bindable(true)]
public bool IsReversed { get; set; }
member this.IsReversed : bool with get, set
Returns
Boolean Boolean
true if the axis is reversed; otherwise, False .
Attributes BindableAttribute
Remarks
If set to reversed, the values on the axis are in reversed sort order and the direction of values on the axis is flipped.
Axis.IsStartedFromZero Axis.IsStartedFromZero
I n this Article
Gets or sets a flag which indicates whether the minimum value of the axis will be automatically set to zero if all data
point values are positive. If there are negative data point values, the minimum value of the data points will be used.
[System.ComponentModel.Bindable(true)]
public bool IsStartedFromZero { get; set; }
member this.IsStartedFromZero : bool with get, set
Returns
Boolean Boolean
true if the minimum value of the axis is automatically set to zero when all data point values are positive; otherwise,
false .
Attributes BindableAttribute
Axis.LabelAutoFitMaxFontSize Axis.LabelAutoFitMaxFont
Size
I n this Article
Gets or sets the maximum font size that can be used by the label auto-fitting algorithm.
[System.ComponentModel.Bindable(true)]
public int LabelAutoFitMaxFontSize { get; set; }
member this.LabelAutoFitMaxFontSize : int with get, set
Returns
Int32 Int32
An integer value.
Attributes BindableAttribute
Remarks
The font size cannot be less than 5.
Axis.LabelAutoFitMinFontSize Axis.LabelAutoFitMinFont
Size
I n this Article
Gets or sets the minimum font size that can be used by the label auto-fitting algorithm.
[System.ComponentModel.Bindable(true)]
public int LabelAutoFitMinFontSize { get; set; }
member this.LabelAutoFitMinFontSize : int with get, set
Returns
Int32 Int32
An integer value.
Attributes BindableAttribute
Axis.LabelAutoFitStyle Axis.LabelAutoFitStyle
I n this Article
Gets or sets the allowable label changes that can be made to enable the label to be fit along an axis.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles LabelAutoFitStyle { get;
set; }
member this.LabelAutoFitStyle : System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles
with get, set
Returns
LabelAutoFitStyles LabelAutoFitStyles
A LabelAutoFitStyles enumeration value.
Attributes BindableAttribute
Remarks
The IsLabelAutoFit property must be set to true .
Axis.LabelStyle Axis.LabelStyle
I n this Article
Gets or sets the LabelStyle properties of an axis.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.NoNameEx
pandableObjectConverter))]
public System.Windows.Forms.DataVisualization.Charting.LabelStyle LabelStyle { get; set; }
member this.LabelStyle : System.Windows.Forms.DataVisualization.Charting.LabelStyle with get, set
Returns
LabelStyle LabelStyle
A LabelStyle object, which defines the axis label style.
Attributes BindableAttribute TypeConverterAttribute
Remarks
Use this property to specify the style, formatting, and so forth, of axis labels.
If the IsLabelAutoFit property is true , the font size, font angle and the use of offset labels are determined
automatically. If you set any one of the LabelStyle.Font.Size, Angle or IsStaggered properties, the IsLabelAutoFit
property will be set to false .
Note that if a format that consists of a date without a time is used for labels, and the DateTime data point values that
are used specify times, the times will affect the positions of the data points, even though they are not displayed due to
the label formatting.
Axis.LineColor Axis.LineColor
I n this Article
Gets or sets the line color of an axis.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color LineColor { get; set; }
member this.LineColor : System.Drawing.Color with get, set
Returns
Color Color
A Color object that represents the line color used to draw the axis. The default is Black.
Attributes BindableAttribute TypeConverterAttribute
Remarks
Use the LineColor property to specify the line color of an axis.
Note If an axis is not enabled but an adjacent axis is using grid lines, one of those grid lines will be displayed in place
of the axis that is not enabled. The same situation will occur if the Enabled property of an axis is set to Auto. In this
case, the axis is not being used to plot data, and the grid line of an adjacent axis will be drawn instead.
Axis.LineDashStyle Axis.LineDashStyle
I n this Article
Gets or sets the line style of an axis.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartDashStyle LineDashStyle { get; set; }
member this.LineDashStyle : System.Windows.Forms.DataVisualization.Charting.ChartDashStyle with get,
set
Returns
ChartDashStyle ChartDashStyle
A ChartDashStyle enumeration value.
Attributes BindableAttribute
Remarks
The LineDashStyle property determines the line style used for an axis. The line can be solid, dotted, and so forth.
Note If an axis is not enabled but an adjacent axis is using grid lines, one of those grid lines will be displayed in place
of the axis that is not enabled. The same situation will occur if the Enabled property of an axis is set to Auto. In this
case, the axis is not being used to plot data, and the grid line of an adjacent axis will be drawn instead.
Axis.LineWidth Axis.LineWidth
I n this Article
Gets or sets the line width of an axis, in pixels.
[System.ComponentModel.Bindable(true)]
public int LineWidth { get; set; }
member this.LineWidth : int with get, set
Returns
Int32 Int32
An integer value that represents the width of an axis line. The default value is one (1) pixel.
Attributes BindableAttribute
Remarks
The LineWidth property gets or sets the width of an axis line, in pixels. If the width is set to zero (0), the line will not be
displayed.
Note If an axis is not enabled but an adjacent axis is using grid lines, one of those grid lines will be displayed in place
of the axis that is not enabled. The same situation will occur if the Enabled property of an axis is set to Auto. In this
case, the axis is not being used to plot data, and the grid line of an adjacent axis will be drawn instead.
Axis.LogarithmBase Axis.LogarithmBase
I n this Article
Gets or sets a value for the logarithm base for the logarithmic axis.
[System.ComponentModel.Bindable(true)]
public double LogarithmBase { get; set; }
member this.LogarithmBase : double with get, set
Returns
Double Double
A double value. The default value is base 10.
Attributes BindableAttribute
Remarks
This property only has an effect when the IsLogarithmic property is set to true .
Note that this property is only applicable to value axes, which are used to plot data. Setting this property for a
categorical axis will result in an exception being thrown.
Axis.MajorGrid Axis.MajorGrid
I n this Article
Gets or sets a Grid object used to set the major grid line properties for an axis.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.NoNameEx
pandableObjectConverter))]
public System.Windows.Forms.DataVisualization.Charting.Grid MajorGrid { get; set; }
member this.MajorGrid : System.Windows.Forms.DataVisualization.Charting.Grid with get, set
Returns
Grid Grid
A Grid object used to get or set the major grid properties of an axis.
Attributes BindableAttribute TypeConverterAttribute
Remarks
Major grid lines are always drawn in conjunction with a data point. That is, they will occur at the same point along an
axis as a data point, for categorical axis tick marks. For value axes, major grid lines by default are drawn wherever labels
occur.
You can use this property to change major grid line frequency, color, and so forth.
Axis.MajorTickMark Axis.MajorTickMark
I n this Article
Gets or sets a TickMark object used to set the major tick mark properties of an axis.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.NoNameEx
pandableObjectConverter))]
public System.Windows.Forms.DataVisualization.Charting.TickMark MajorTickMark { get; set; }
member this.MajorTickMark : System.Windows.Forms.DataVisualization.Charting.TickMark with get, set
Returns
TickMark TickMark
A TickMark object used to set the properties of a major tick mark of an axis.
Attributes BindableAttribute TypeConverterAttribute
Remarks
Major tick marks are always drawn in conjunction with a data point. Categorical axis tick marks will occur at the same
point along an axis as a data point. For value axes, major tick marks are drawn by default wherever labels occur.
You can use this property to change the major tick mark properties such as frequency, color, or size.
Axis.Maximum Axis.Maximum
I n this Article
Gets or sets the maximum value of an axis.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.AxisMinM
axAutoValueConverter))]
public double Maximum { get; set; }
member this.Maximum : double with get, set
Returns
Double Double
A double value that represents the maximum value of an axis. The default value is NaN.
Attributes BindableAttribute TypeConverterAttribute
Remarks
To automatically round the maximum and minimum axis values call the RoundAxisValues method. The Maximum value
must be greater than the Minimum value.
Axis.MaximumAutoSize Axis.MaximumAutoSize
I n this Article
Gets or sets the maximum size of the axis, measured as a percentage of the chart area. This value is used by the
automatic layout algorithm.
Returns
Single Single
A float value that represents the maximum size of the axis.
Axis.Minimum Axis.Minimum
I n this Article
Gets or sets the minimum value of an axis.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.AxisMinM
axAutoValueConverter))]
public double Minimum { get; set; }
member this.Minimum : double with get, set
Returns
Double Double
A double value that represents the minimum value of an axis. The default value is NaN.
Attributes BindableAttribute TypeConverterAttribute
Remarks
Note that if you set this value explicitly, the X-values of data elements must be taken into account. If all data points have
X-values of zero, the Chart control will assume the first data point occurs at zero. Also, if the Minimum value is
explicitly set, the IsStartedFromZero property will be ignored. The Minimum value must be less than the Maximum
value.
To automatically round the maximum and minimum axis values. call the RoundAxisValues method.
Axis.MinorGrid Axis.MinorGrid
I n this Article
Gets or sets a Grid object used to specify the minor grid lines attributes of an axis.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.NoNameEx
pandableObjectConverter))]
public System.Windows.Forms.DataVisualization.Charting.Grid MinorGrid { get; set; }
member this.MinorGrid : System.Windows.Forms.DataVisualization.Charting.Grid with get, set
Returns
Grid Grid
A Grid object used to get or set the attributes of the minor grid lines of an axis.
Attributes BindableAttribute TypeConverterAttribute
Remarks
Minor grid lines are drawn in between the major grid lines.
Use this property to change the attributes of a minor grid line, such as frequency, color, and so forth.
Axis.MinorTickMark Axis.MinorTickMark
I n this Article
Gets or sets a TickMark object used to set the minor tick mark properties of an axis.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.NoNameEx
pandableObjectConverter))]
public System.Windows.Forms.DataVisualization.Charting.TickMark MinorTickMark { get; set; }
member this.MinorTickMark : System.Windows.Forms.DataVisualization.Charting.TickMark with get, set
Returns
TickMark TickMark
A TickMark object used for the minor tick mark properties of an axis.
Attributes BindableAttribute TypeConverterAttribute
Remarks
Minor tick marks should be drawn between major tick marks, where labels usually occur.
Use this property to change the minor tick mark frequency, color, and so forth.
Axis.Name Axis.Name
I n this Article
Gets or sets the name of the axis.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
public override string Name { get; set; }
member this.Name : string with get, set
Returns
String String
A string value that represents the text name of the axis.
Attributes BindableAttribute BrowsableAttribute
Axis.PixelPositionToValue Axis.PixelPositionToValue
I n this Article
Converts an absolute pixel position along an axis to an axis value. This method only works in paint events.
public double PixelPositionToValue (double position);
member this.PixelPositionToValue : double -> double
Parameters
position Double Double
The pixel position.
Returns
Double Double
A double value that represents the axis value.
Axis.PositionToValue Axis.PositionToValue
I n this Article
Converts a relative coordinate along an axis to an axis value. This method only works in paint events.
public double PositionToValue (double position);
member this.PositionToValue : double -> double
Parameters
position Double Double
The relative position (0-100%).
Returns
Double Double
A double value that represents the axis value.
Axis.RoundAxisValues Axis.RoundAxisValues
I n this Article
Automatically rounds axis values.
public void RoundAxisValues ();
member this.RoundAxisValues : unit -> unit
Remarks
Call the RoundAxisValues method to round the values of an axis. Note that the interval used for the axis will not be
changed when this method is called. This method is only supported for the X and X2 axes. The Y and Y2 axes values
are rounded by default.
Axis.ScaleBreakStyle Axis.ScaleBreakStyle
I n this Article
Gets or sets the axis scale break style.
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.NoNameEx
pandableObjectConverter))]
public virtual System.Windows.Forms.DataVisualization.Charting.AxisScaleBreakStyle ScaleBreakStyle {
get; set; }
member this.ScaleBreakStyle : System.Windows.Forms.DataVisualization.Charting.AxisScaleBreakStyle
with get, set
Returns
AxisScaleBreakStyle AxisScaleBreakStyle
An AxisScaleBreakStyle object, which represents the scale break style of the chart axis.
Attributes TypeConverterAttribute
Axis.ScaleView Axis.ScaleView
I n this Article
Gets or sets the view of an axis.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.NoNameEx
pandableObjectConverter))]
public System.Windows.Forms.DataVisualization.Charting.AxisScaleView ScaleView { get; set; }
member this.ScaleView : System.Windows.Forms.DataVisualization.Charting.AxisScaleView with get, set
Returns
AxisScaleView AxisScaleView
An AxisScaleView object, which represents the scale view of an axis.
Attributes BindableAttribute TypeConverterAttribute
Axis.ScrollBar Axis.ScrollBar
I n this Article
Gets or sets an axis scrollbar.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.NoNameEx
pandableObjectConverter))]
public System.Windows.Forms.DataVisualization.Charting.AxisScrollBar ScrollBar { get; set; }
member this.ScrollBar : System.Windows.Forms.DataVisualization.Charting.AxisScrollBar with get, set
Returns
AxisScrollBar AxisScrollBar
An AxisScrollBar object, which represents the scrollbar of an axis.
Attributes BindableAttribute TypeConverterAttribute
Remarks
Use this property to manipulate the scrollbar of an axis.
For further details, refer to the AxisScrollBar class documentation.
Axis.StripLines Axis.StripLines
I n this Article
Gets a StripLinesCollection collection object.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.StripLinesCollection StripLines { get; }
member this.StripLines : System.Windows.Forms.DataVisualization.Charting.StripLinesCollection
Returns
StripLinesCollection StripLinesCollection
A StripLinesCollection collection object, which stores all StripLine objects for an axis.
Attributes BindableAttribute
Remarks
Strip lines are used to draw rectangular strips across a ChartArea object, and are always drawn across the entire <A
href="">area.
These strip lines are not related to the grid lines.
Axis.TextOrientation Axis.TextOrientation
I n this Article
Gets or sets the orientation of the text in the axis title.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.TextOrientation TextOrientation { get; set; }
member this.TextOrientation : System.Windows.Forms.DataVisualization.Charting.TextOrientation with
get, set
Returns
TextOrientation TextOrientation
A TextOrientation enumeration value.
Attributes BindableAttribute
Axis.Title Axis.Title
I n this Article
Gets or sets the title of the axis.
[System.ComponentModel.Bindable(true)]
public string Title { get; set; }
member this.Title : string with get, set
Returns
String String
A string value that represents the title of the axis.
Attributes BindableAttribute
Remarks
Gets or sets the title of the axis.
You can set the font properties of the title using the TitleFont property.
You can set the color of the title using the TitleForeColor property.
Axis.TitleAlignment Axis.TitleAlignment
I n this Article
Gets or sets the alignment of an axis title.
[System.ComponentModel.Bindable(true)]
public System.Drawing.StringAlignment TitleAlignment { get; set; }
member this.TitleAlignment : System.Drawing.StringAlignment with get, set
Returns
StringAlignment StringAlignment
A StringAlignment enumeration value.
Attributes BindableAttribute
Remarks
Possible alignment values are Center, Far, and Near. A value of Far equates to an alignment to the top or the right,
depending on the orientation of the axis or strip line. In the same manner, a value of Near equates to an alignment to
the bottom or the right.
If you want more control over the positioning of an axis title, you must perform custom drawing using the PostPaint or
PrePaint event.
You can further align and position the titles of StripLine objects by using their TextLineAlignment and TitleAngle
properties.
Axis.TitleFont Axis.TitleFont
I n this Article
Gets or sets the title font properties of an axis.
[System.ComponentModel.Bindable(true)]
public System.Drawing.Font TitleFont { get; set; }
member this.TitleFont : System.Drawing.Font with get, set
Returns
Font Font
A Font object used for the font properties of a title.
Attributes BindableAttribute
Remarks
Gets or sets title font properties such as face or size.
To set font properties at run time, a new Font object must be created. Any attempt to change the properties of the
current Font object at run time will result in a compilation error.
Axis.TitleForeColor Axis.TitleForeColor
I n this Article
Gets or sets the text color of the axis title.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color TitleForeColor { get; set; }
member this.TitleForeColor : System.Drawing.Color with get, set
Returns
Color Color
A Color structure. The default color is Black.
Attributes BindableAttribute TypeConverterAttribute
Remarks
Gets or sets the text color of an Axis object title.
You can use any valid ARGB (alpha, red, green, blue) color.
Axis.ToolTip Axis.ToolTip
I n this Article
Gets or sets the tooltip used for the axis.
[System.ComponentModel.Bindable(true)]
public string ToolTip { get; set; }
member this.ToolTip : string with get, set
Returns
String String
A string value.
Attributes BindableAttribute
Axis.ValueToPixelPosition Axis.ValueToPixelPosition
I n this Article
Converts an axis value to an absolute coordinate along an axis. Measured in pixels. This method only works in paint
events.
Parameters
axisValue Double Double
The axis value.
Returns
Double Double
A double value that represents the pixel position.
Axis.ValueToPosition Axis.ValueToPosition
I n this Article
Converts an axis value to its relative position (0-100%). If an axis has a logarithmic scale, the value is converted to a
linear scale. This method only works in paint events.
Parameters
axisValue Double Double
The axis value.
Returns
Double Double
A double value that represents the relative position (0-100%).
AxisArrowStyle AxisArrowStyle Enum
An enumeration of axis arrow styles.
D eclaration
public enum AxisArrowStyle
type AxisArrowStyle =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The AxisArrowStyle enumeration represents the style for an axis arrow. If the ArrowStyle property is set to None, no
arrow is displayed for an axis.
Fields
Lines Lines A line-shaped arrow is used for the relevant axis.
SharpTriangle SharpTriangle A sharp triangular arrow is used for the relevant axis.
D eclaration
public enum AxisEnabled
type AxisEnabled =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The AxisEnabled enumeration is used with the Enabled property to enable or disable an axis.
If the Enabled property is set to Auto, an axis may or may not be displayed, depending on whether it is being used to
plot a Series. The axes that are used to plot data for a series are determined by the XAxisType and YAxisType property
settings.
Fields
Auto Auto The axis is only enabled if it used to plot a Series.
D eclaration
public enum AxisName
type AxisName =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The AxisName enumeration represents the four different axes that can be used for a chart.
Bar and stacked bar charts have their axes rotated 90 degrees clockwise. For example, the primary X-axis for these two
charts is the left-vertical axis.
For all charts except bar, stacked bar, pie and doughnut charts, the primary and secondary axes are as follows:
AX IS T YPE D ES CR IPTIO N
Bar and stacked bar charts have their axes rotated 90 degrees clockwise. For example, the primary X-axis for these two
charts is the left-vertical axis.
Fields
X X Primary X-axis.
X2 X2 Secondary X-axis.
Y Y Primary Y-axis.
Y2 Y2 Secondary Y-axis.
AxisScaleBreakStyle AxisScaleBreakStyle Class
Represents a scale break on the Y -axis of the chart.
D eclaration
public class AxisScaleBreakStyle
type AxisScaleBreakStyle = class
I nheritance H ierarchy
Object Object
Remarks
Scale breaks are intentional discontinuities on the Y -axis that are most often used to redistribute the data points in a
series on a chart. This feature improves readability when there are large differences between the high and low values
of the data in one series being plotted. Scale breaks are not drawn for differences between data in multiple series.
By default, scale breaks are disabled. You can enable scale breaks on the Y -axis by setting the Enabled property to
true . To change the amount of vertical space of the scale break, you can specify a Spacing value. This is calculated as a
percentage of the Y -axis scale.
You must have sufficient separation between ranges of data points in a single series to draw a scale break. By default, a
scale break can be added only if there is a separation between the data ranges of at least 25% of the chart. If you
enable a scale break but it does not appear, even though there is sufficient distance between the data ranges, you can
set the CollapsibleSpaceThreshold property to a value less than 25.
Charts support up to five scale breaks per chart; however, the chart can become unreadable if you display more than
one scale break. If you have more than two data ranges, consider using a different method for displaying this data. Use
the MaxNumberOfBreaks property to reduce the number of scale breaks that can be displayed on the chart.
When a scale break is used, the Y -axis labels may become offset. To disable the label offset, set the IsStaggered
property to false .
Scale breaks are not supported under any of the following conditions:
Pie, doughnut, funnel, pyramid, radial or any stacked chart types are used.
Custom intervals for labels, tick marks or grid lines are enabled.
The minimum or maximum value for the axis is set.
Custom labels are used.
A logarithmic Y -axis is specified.
Axis views on the Y -axis, which include scrolling and zooming, are used.
3-D charts are used.
Constructors
AxisScaleBreakStyle()
AxisScaleBreakStyle()
Gets or sets the style of the break line that will be used to draw the scale break.
CollapsibleSpaceThreshold
CollapsibleSpaceThreshold
Gets or sets the threshold of space on the chart at which scale breaks are drawn.
Enabled
Enabled
Gets or sets a flag that indicates whether scale breaks are enabled.
LineColor
LineColor
LineDashStyle
LineDashStyle
LineWidth
LineWidth
MaxNumberOfBreaks
MaxNumberOfBreaks
Gets or sets the maximum number of scale breaks to be displayed on the chart.
Spacing
Spacing
Gets or sets the spacing gap between the lines of the scale break. The spacing gap is represented as a percentage
of the Y -axis.
StartFromZero
StartFromZero
Gets or sets a StartFromZero enumeration value that indicates whether to start the scale break from zero.
AxisScaleBreakStyle
I n this Article
Initializes a new instance of the AxisScaleBreakStyle class.
public AxisScaleBreakStyle ();
AxisScaleBreakStyle.BreakLineStyle AxisScaleBreakStyle.
BreakLineStyle
I n this Article
Gets or sets the style of the break line that will be used to draw the scale break.
Returns
BreakLineStyle BreakLineStyle
A BreakLineStyle enumeration value.
AxisScaleBreakStyle.CollapsibleSpaceThreshold AxisScale
BreakStyle.CollapsibleSpaceThreshold
I n this Article
Gets or sets the threshold of space on the chart at which scale breaks are drawn.
Returns
Int32 Int32
An integer value that specifies the threshold of space on the chart at which scale breaks are drawn.
Remarks
This property is measured as a percentage of the Y -axis scale. By default, its value is set to 25. This means that data
points in a series that have a difference of at least 25% of the scale will be collapsed with a scale break.
AxisScaleBreakStyle.Enabled AxisScaleBreakStyle.Enabled
I n this Article
Gets or sets a flag that indicates whether scale breaks are enabled.
public bool Enabled { get; set; }
member this.Enabled : bool with get, set
Returns
Boolean Boolean
A Boolean value that specifies whether scale breaks are enabled.
AxisScaleBreakStyle.LineColor AxisScaleBreakStyle.Line
Color
I n this Article
Gets or sets the color of the scale break line.
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color LineColor { get; set; }
member this.LineColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that represents the color of the scale break line.
Attributes TypeConverterAttribute
AxisScaleBreakStyle.LineDashStyle AxisScaleBreakStyle.
LineDashStyle
I n this Article
Gets or sets the style of the scale break line.
Returns
ChartDashStyle ChartDashStyle
A ChartDashStyle value that represents the style of the scale break line.
AxisScaleBreakStyle.LineWidth AxisScaleBreakStyle.Line
Width
I n this Article
Gets or sets the width of the scale break line.
Returns
Int32 Int32
An integer value that represents the width of the scale break line.
AxisScaleBreakStyle.MaxNumberOfBreaks AxisScaleBreak
Style.MaxNumberOfBreaks
I n this Article
Gets or sets the maximum number of scale breaks to be displayed on the chart.
Returns
Int32 Int32
An integer value that represents the maximum number of scale breaks to be displayed on the chart.
Remarks
The Chart is capable of displaying up to five scale breaks.
AxisScaleBreakStyle.Spacing AxisScaleBreakStyle.Spacing
I n this Article
Gets or sets the spacing gap between the lines of the scale break. The spacing gap is represented as a percentage of the
Y -axis.
Returns
Double Double
A double value that represents the spacing gap between the lines of the scale break.
AxisScaleBreakStyle.StartFromZero AxisScaleBreakStyle.
StartFromZero
I n this Article
Gets or sets a StartFromZero enumeration value that indicates whether to start the scale break from zero.
Returns
StartFromZero StartFromZero
A StartFromZero enumeration value that indicates whether to start the scale break from zero.
Remarks
If the StartFromZero property is set to Auto, the chart will automatically calculate whether to start the Y -axis scale
minimum from the lowest value in the series or from zero.
AxisScaleView AxisScaleView Class
Represents a scaled view of the chart.
D eclaration
public class AxisScaleView
type AxisScaleView = class
I nheritance H ierarchy
Object Object
Constructors
AxisScaleView()
AxisScaleView()
Properties
IsZoomed
IsZoomed
MinSize
MinSize
MinSizeType
MinSizeType
Position
Position
Size
Size
SmallScrollMinSize
SmallScrollMinSize
Gets or sets the minimum small scrolling size. Used only if the small scrolling size is not set.
SmallScrollMinSizeType
SmallScrollMinSizeType
SmallScrollSize
SmallScrollSize
SmallScrollSizeType
SmallScrollSizeType
ViewMaximum
ViewMaximum
ViewMinimum
ViewMinimum
Zoomable
Zoomable
Gets or sets a flag that indicates whether the zooming user interface is enabled.
Methods
Scroll(DateTime)
Scroll(DateTime)
Scrolls to a position along an axis specified by the newPosition parameter, which is expressed as a DateTime
value.
Scroll(Double)
Scroll(Double)
Scroll(ScrollType)
Scroll(ScrollType)
Scrolls along an axis according to the direction and size indicated by the scrollType parameter.
Zoom(Double, Double)
Zoom(Double, Double)
Sets a new axis data view and/or position based on the specified start and end values.
Sets a new axis data view and/or position based on the specified start position, view size and unit of measurement.
Sets a new axis data view and/or position based on the specified start position, view size, unit of measurement and
save state.
ZoomReset()
ZoomReset()
ZoomReset(Int32)
ZoomReset(Int32)
Resets the specified number of zoom operations by restoring the axis data view.
AxisScaleView
I n this Article
Initializes a new instance of the AxisScaleView class.
public AxisScaleView ();
AxisScaleView.IsZoomed AxisScaleView.IsZoomed
I n this Article
Gets a flag that indicates whether the axis is zoomed in.
[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
public bool IsZoomed { get; }
member this.IsZoomed : bool
Returns
Boolean Boolean
true if the axis is zoomed in; otherwise, false .
Attributes BindableAttribute BrowsableAttribute
AxisScaleView.MinSize AxisScaleView.MinSize
I n this Article
Gets or sets the minimum size of the AxisScaleView object.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.DoubleNa
nValueConverter))]
public double MinSize { get; set; }
member this.MinSize : double with get, set
Returns
Double Double
A double that represents the minimum size of the scale view.
Attributes BindableAttribute TypeConverterAttribute
AxisScaleView.MinSizeType AxisScaleView.MinSizeType
I n this Article
Gets or sets the unit of measurement of the MinSize property.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType MinSizeType { get; set;
}
member this.MinSizeType : System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType with
get, set
Returns
DateTimeIntervalType DateTimeIntervalType
A DateTimeIntervalType enumeration value that represents the unit of measurement of the MinSize property.
Attributes BindableAttribute
AxisScaleView.Position AxisScaleView.Position
I n this Article
Gets or sets the position of the scale view.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.DoubleDa
teNanValueConverter))]
public double Position { get; set; }
member this.Position : double with get, set
Returns
Double Double
A double that represents the position of the scale view.
Attributes BindableAttribute TypeConverterAttribute
AxisScaleView.Scroll AxisScaleView.Scroll
I n this Article
Overloads
Scroll(DateTime) Scroll(DateTime)
Scrolls to a position along an axis specified by the
newPosition parameter, which is expressed as a DateTime
value.
Scroll(Double) Scroll(Double)
Scrolls to a position along an axis specified by the
newPosition parameter.
Scroll(ScrollType) Scroll(ScrollType)
Scrolls along an axis according to the direction and size
indicated by the scrollType parameter.
Scroll(DateTime) Scroll(DateTime)
Scrolls to a position along an axis specified by the newPosition parameter, which is expressed as a DateTime value.
Parameters
newPosition DateTime DateTime
The new position to scroll.
Scroll(Double) Scroll(Double)
Scrolls to a position along an axis specified by the newPosition parameter.
Parameters
newPosition Double Double
The new position to scroll.
Scroll(ScrollType) Scroll(ScrollType)
Scrolls along an axis according to the direction and size indicated by the scrollType parameter.
Parameters
scrollType ScrollType ScrollType
The direction and size to scroll.
AxisScaleView.Size AxisScaleView.Size
I n this Article
Gets or sets the size of the scale view.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.DoubleNa
nValueConverter))]
public double Size { get; set; }
member this.Size : double with get, set
Returns
Double Double
A double that represents the size of the scale view.
Attributes BindableAttribute TypeConverterAttribute
AxisScaleView.SizeType AxisScaleView.SizeType
I n this Article
Gets or sets the unit of measurement for the Size property.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType SizeType { get; set; }
member this.SizeType : System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType with
get, set
Returns
DateTimeIntervalType DateTimeIntervalType
A DateTimeIntervalType enumeration value that represents the unit of measurement for the Size property.
Attributes BindableAttribute
AxisScaleView.SmallScrollMinSize AxisScaleView.Small
ScrollMinSize
I n this Article
Gets or sets the minimum small scrolling size. Used only if the small scrolling size is not set.
[System.ComponentModel.Bindable(true)]
public double SmallScrollMinSize { get; set; }
member this.SmallScrollMinSize : double with get, set
Returns
Double Double
A double that represents the small scrolling size.
Attributes BindableAttribute
AxisScaleView.SmallScrollMinSizeType AxisScaleView.
SmallScrollMinSizeType
I n this Article
Gets or sets the unit of measurement for the SmallScrollMinSize property.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType SmallScrollMinSizeType {
get; set; }
member this.SmallScrollMinSizeType :
System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType with get, set
Returns
DateTimeIntervalType DateTimeIntervalType
A DateTimeIntervalType enumeration value that represents the unit of measurement for the SmallScrollMinSize
property.
Attributes BindableAttribute
AxisScaleView.SmallScrollSize AxisScaleView.SmallScroll
Size
I n this Article
Gets or sets the small scrolling size.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.AxisMinM
axAutoValueConverter))]
public double SmallScrollSize { get; set; }
member this.SmallScrollSize : double with get, set
Returns
Double Double
A double value that represents the small scrolling size.
Attributes BindableAttribute TypeConverterAttribute
AxisScaleView.SmallScrollSizeType AxisScaleView.Small
ScrollSizeType
I n this Article
Gets or sets the unit of measurement for the SmallScrollMinSize property.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType SmallScrollSizeType {
get; set; }
member this.SmallScrollSizeType :
System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType with get, set
Returns
DateTimeIntervalType DateTimeIntervalType
A DateTimeIntervalType enumeration value that represents the unit of measurement for the SmallScrollMinSize
property.
Attributes BindableAttribute
AxisScaleView.ViewMaximum AxisScaleView.View
Maximum
I n this Article
Gets the maximum axis value of a data view.
[System.ComponentModel.Browsable(false)]
public double ViewMaximum { get; }
member this.ViewMaximum : double
Returns
Double Double
A double that represents the maximum axis value for the data view.
Attributes BrowsableAttribute
AxisScaleView.ViewMinimum AxisScaleView.View
Minimum
I n this Article
Gets the minimum axis value of a data view.
[System.ComponentModel.Browsable(false)]
public double ViewMinimum { get; }
member this.ViewMinimum : double
Returns
Double Double
A double that represents the minimum axis value for the data view.
Attributes BrowsableAttribute
AxisScaleView.Zoom AxisScaleView.Zoom
I n this Article
Overloads
Zoom(Double, Double) Zoom(Double, Double)
Sets a new axis data view and/or position based on the
specified start and end values.
Parameters
viewStart Double Double
The new start position for the axis scale view.
viewEnd Double Double
The new end position for the axis scale view.
Parameters
viewPosition Double Double
The new start position for the axis scale view.
viewSize Double Double
The new size for the axis scale view.
viewSizeType DateTimeIntervalType DateTimeIntervalType
The new unit of measurement of the size.
Parameters
viewPosition Double Double
The new start position for the axis scale view.
viewSize Double Double
The new size for the axis scale view.
viewSizeType DateTimeIntervalType DateTimeIntervalType
The new unit of measurement of the size.
saveState Boolean Boolean
Indicates whether the current size and/or position must be saved.
AxisScaleView.Zoomable AxisScaleView.Zoomable
I n this Article
Gets or sets a flag that indicates whether the zooming user interface is enabled.
[System.ComponentModel.Bindable(true)]
public bool Zoomable { get; set; }
member this.Zoomable : bool with get, set
Returns
Boolean Boolean
true if the zooming user interface is enabled; otherwise, false .
Attributes BindableAttribute
AxisScaleView.ZoomReset AxisScaleView.ZoomReset
I n this Article
Overloads
ZoomReset() ZoomReset()
Resets one zoom operation by restoring the axis data view.
ZoomReset(Int32) ZoomReset(Int32)
Resets the specified number of zoom operations by restoring
the axis data view.
ZoomReset() ZoomReset()
Resets one zoom operation by restoring the axis data view.
public void ZoomReset ();
member this.ZoomReset : unit -> unit
ZoomReset(Int32) ZoomReset(Int32)
Resets the specified number of zoom operations by restoring the axis data view.
public void ZoomReset (int numberOfViews);
member this.ZoomReset : int -> unit
Parameters
numberOfViews Int32 Int32
Number of zoom operations to reset.
Remarks
Set the numberOfViews parameter to zero (0) to reset all zoom operations.
AxisScrollBar AxisScrollBar Class
Represents the scrollbar of a chart axis.
D eclaration
public class AxisScrollBar : IDisposable
type AxisScrollBar = class
interface IDisposable
I nheritance H ierarchy
Object Object
Remarks
The AxisScrollBar class is exposed as the ScrollBar property of the Axis class.
Scrollbars allow the end user to scroll through data when a subset of data is being displayed. A subset of data is
referred to as a view, and is represented by the AxisScaleView class.
Scrollbars are only shown when zooming occurs. In other words, even if a scrollbar is enabled, it will only be visible
when a view is being displayed.
Im p o rt a nt
To fix the position of scrollbars, the plotting area position of a chart area must not be set to Auto. To explicitly set the
plotting area position, use the InnerPlotPosition property.
To display scrollbars when a chart is first displayed, use the AxisScaleView class properties and methods so that a view
is initially displayed to end users.
The background color, button color and width of scrollbars can be set using this AxisScrollBar class.
Note that there are two main types of scrolling: large scrolling, which occurs when the end user clicks in the
background of a scrollbar - that is, that part of a scrollbar not covered by the thumb; and small scrolling, which occurs
when the end user clicks a left/right or up/down button. To control the large scrolling size, use the Size property of the
ScaleView object. To set the small scrolling size, use the SmallScrollSize property of the AxisScaleView class.
Constructors
AxisScrollBar()
AxisScrollBar()
Properties
Axis
Axis
BackColor
BackColor
ButtonColor
ButtonColor
ButtonStyle
ButtonStyle
ChartArea
ChartArea
Enabled
Enabled
IsPositionedInside
IsPositionedInside
Gets or sets a flag that indicates whether scroll bar is positioned inside or outside the chart area.
IsVisible
IsVisible
LineColor
LineColor
Size
Size
Dispose(Boolean)
Dispose(Boolean)
Releases the unmanaged resources used by the AxisScrollBar class and optionally releases the managed
resources.
AxisScrollBar.Axis AxisScrollBar.Axis
I n this Article
Gets the Axis object that uses the scrollbar.
[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
public System.Windows.Forms.DataVisualization.Charting.Axis Axis { get; }
member this.Axis : System.Windows.Forms.DataVisualization.Charting.Axis
Returns
Axis Axis
An Axis object.
Attributes BindableAttribute BrowsableAttribute
AxisScrollBar
I n this Article
Initializes a new instance of the AxisScrollBar class.
public AxisScrollBar ();
AxisScrollBar.BackColor AxisScrollBar.BackColor
I n this Article
Gets or sets the background color of a scrollbar.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BackColor { get; set; }
member this.BackColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that represents the background color of the scrollbar. The default value is Empty.
Attributes BindableAttribute TypeConverterAttribute
Remarks
This property can be set to any valid ARGB (alpha, red, green, blue) color.
If the value of this property is Empty, the background color of the scrollbar will be determined by the BackColor
property value of the chart area the scrollbar is being used for.
AxisScrollBar.ButtonColor AxisScrollBar.ButtonColor
I n this Article
Gets or sets the color of the scrollbar buttons.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color ButtonColor { get; set; }
member this.ButtonColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that represents the color of the scrollbar buttons.
Attributes BindableAttribute TypeConverterAttribute
Remarks
Use this property to get or set the color of the left/right, up/down, reset and thumb buttons of a scrollbar.
If the value of this property is Empty, the color used for the buttons will be determined by the LineColor property
value.
AxisScrollBar.ButtonStyle AxisScrollBar.ButtonStyle
I n this Article
Gets or sets the style of the scrollbar button.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ScrollBarButtonStyles ButtonStyle { get; set;
}
member this.ButtonStyle : System.Windows.Forms.DataVisualization.Charting.ScrollBarButtonStyles with
get, set
Returns
ScrollBarButtonStyles ScrollBarButtonStyles
A ScrollBarButtonStyles enumeration value.
Attributes BindableAttribute
AxisScrollBar.ChartArea AxisScrollBar.ChartArea
I n this Article
Gets the chart area that contains this scrollbar.
[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
public System.Windows.Forms.DataVisualization.Charting.ChartArea ChartArea { get; }
member this.ChartArea : System.Windows.Forms.DataVisualization.Charting.ChartArea
Returns
ChartArea ChartArea
A ChartArea object.
Attributes BindableAttribute BrowsableAttribute
AxisScrollBar.Dispose AxisScrollBar.Dispose
I n this Article
Overloads
Dispose() Dispose()
Releases all resources used by the current instance of the
AxisScrollBar.
Dispose(Boolean) Dispose(Boolean)
Releases the unmanaged resources used by the AxisScrollBar
class and optionally releases the managed resources.
Dispose() Dispose()
Releases all resources used by the current instance of the AxisScrollBar.
public void Dispose ();
abstract member Dispose : unit -> unit
override this.Dispose : unit -> unit
Dispose(Boolean) Dispose(Boolean)
Releases the unmanaged resources used by the AxisScrollBar class and optionally releases the managed resources.
protected virtual void Dispose (bool disposing);
abstract member Dispose : bool -> unit
override this.Dispose : bool -> unit
Parameters
disposing Boolean Boolean
true to release both unmanaged and managed resources; false to release only unmanaged resources.
AxisScrollBar.Enabled AxisScrollBar.Enabled
I n this Article
Gets or sets a flag that determines whether a scrollbar is enabled.
[System.ComponentModel.Bindable(true)]
public bool Enabled { get; set; }
member this.Enabled : bool with get, set
Returns
Boolean Boolean
true if the scrollbar is enabled for an axis, false if the scrollbar is not enabled. The default value is true .
Attributes BindableAttribute
AxisScrollBar.IsPositionedInside AxisScrollBar.IsPositioned
Inside
I n this Article
Gets or sets a flag that indicates whether scroll bar is positioned inside or outside the chart area.
[System.ComponentModel.Bindable(true)]
public bool IsPositionedInside { get; set; }
member this.IsPositionedInside : bool with get, set
Returns
Boolean Boolean
true if the scroll bar is positioned inside or outside the chart area; otherwise, false .
Attributes BindableAttribute
AxisScrollBar.IsVisible AxisScrollBar.IsVisible
I n this Article
Gets a flag that indicates whether the scrollbar is visible.
[System.ComponentModel.Browsable(false)]
public bool IsVisible { get; }
member this.IsVisible : bool
Returns
Boolean Boolean
true if the scrollbar is visible; otherwise, false .
Attributes BrowsableAttribute
AxisScrollBar.LineColor AxisScrollBar.LineColor
I n this Article
Gets or sets the line color of a scrollbar.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color LineColor { get; set; }
member this.LineColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that represents the line color of the scrollbar. The default value is Empty.
Attributes BindableAttribute TypeConverterAttribute
Remarks
This property represents the color used for the arrows in up/down and left/right buttons, the symbol inside the reset
button, as well as the border of the entire scrollbar.
If the value of this property is Empty, the line color used will be determined by the LineColor property value.
AxisScrollBar.Size AxisScrollBar.Size
I n this Article
Gets or sets the width of a scrollbar, in pixels.
[System.ComponentModel.Bindable(true)]
public double Size { get; set; }
member this.Size : double with get, set
Returns
Double Double
The width of a scrollbar in pixels. The default value is 14 pixels. The value can range from 5 to 20 pixels.
Attributes BindableAttribute
Remarks
Gets or sets the width of a scrollbar, which can be from 5 to 20 pixels.
Set this property to zero to disable a scrollbar.
Im p o rt a nt
To fix the position of scrollbars, the plotting area position of a chart area must not be set to Auto. To explicitly set the
plotting area position, use the InnerPlotPosition property.
AxisType AxisType Enum
Specifies the axis type for the X and Y -axes of a Series.
D eclaration
public enum AxisType
type AxisType =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The AxisType enumeration represents the axis type used for the X and Y -axes of a Series.
A Series is plotted using two axes, with the exception of pie and doughnut charts. This enumeration is used in
conjunction with the XAxisType and YAxisType properties to set the axes used for plotting the associated data points of
the series.
For all charts except for bar, stacked bar, pie and doughnut types, the primary and secondary axes are as follows:
AX IS T YPE D ES CR IPTIO N
Bar and stacked bar charts have their axes rotated 90 degrees clockwise. For example, the primary X-axis for these two
charts is the left-vertical axis.
Fields
Primary Primary Designates an axis as the primary axis.
D eclaration
public class Border3DAnnotation :
System.Windows.Forms.DataVisualization.Charting.RectangleAnnotation
type Border3DAnnotation = class
inherit RectangleAnnotation
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
Annotation Annotation
TextAnnotation TextAnnotation
RectangleAnnotation RectangleAnnotation
Remarks
A Border3DAnnotation can also display inner text.
Constructors
Border3DAnnotation()
Border3DAnnotation()
Properties
AnnotationType
AnnotationType
BorderSkin
BorderSkin
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
public override string AnnotationType { get; }
member this.AnnotationType : string
Returns
String String
The annotation type.
Attributes BindableAttribute BrowsableAttribute
Remarks
This abstract property is used to get the name of each annotation type, such as Line, Rectangle, Ellipse, and so forth.
Border3DAnnotation
I n this Article
Initializes a new instance of the Border3DAnnotation class.
public Border3DAnnotation ();
Border3DAnnotation.BorderSkin Border3DAnnotation.
BorderSkin
I n this Article
Gets or sets the skin attributes of the 3D border.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.LegendCo
nverter))]
public System.Windows.Forms.DataVisualization.Charting.BorderSkin BorderSkin { get; set; }
member this.BorderSkin : System.Windows.Forms.DataVisualization.Charting.BorderSkin with get, set
Returns
BorderSkin BorderSkin
A BorderSkin object, which determines the attributes of the 3D border.
Attributes BindableAttribute TypeConverterAttribute
BorderSkin BorderSkin Class
Represents the drawing properties of the 3D border skin.
D eclaration
public class BorderSkin : System.Windows.Forms.DataVisualization.Charting.ChartElement
type BorderSkin = class
inherit ChartElement
I nheritance H ierarchy
Object Object
ChartElement ChartElement
Constructors
BorderSkin()
BorderSkin()
Properties
BackColor
BackColor
BackGradientStyle
BackGradientStyle
BackHatchStyle
BackHatchStyle
BackImage
BackImage
BackImageAlignment
BackImageAlignment
Gets or sets a color that is replaced with a transparent color when the background image of a border skin frame is
drawn.
BackImageWrapMode
BackImageWrapMode
Gets or sets the drawing mode for the background image of a border skin frame.
BackSecondaryColor
BackSecondaryColor
BorderColor
BorderColor
BorderDashStyle
BorderDashStyle
Gets or sets the style of the border line of a border skin frame.
BorderWidth
BorderWidth
Gets or sets the width of the border line of a border skin frame.
PageColor
PageColor
SkinStyle
SkinStyle
Returns
Color Color
A Color value.
Attributes BindableAttribute TypeConverterAttribute
BorderSkin.BackGradientStyle BorderSkin.BackGradient
Style
I n this Article
Gets or sets the background gradient style of a skin frame.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.GradientStyle BackGradientStyle { get; set; }
member this.BackGradientStyle : System.Windows.Forms.DataVisualization.Charting.GradientStyle with
get, set
Returns
GradientStyle GradientStyle
A GradientStyle enumeration value.
Attributes BindableAttribute
BorderSkin.BackHatchStyle BorderSkin.BackHatchStyle
I n this Article
Gets or sets the background hatch style of a skin frame.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle BackHatchStyle { get; set; }
member this.BackHatchStyle : System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle with
get, set
Returns
ChartHatchStyle ChartHatchStyle
A ChartHatchStyle enumeration value.
Attributes BindableAttribute
BorderSkin.BackImage BorderSkin.BackImage
I n this Article
Gets or sets the background image of a skin frame.
[System.ComponentModel.Bindable(true)]
public string BackImage { get; set; }
member this.BackImage : string with get, set
Returns
String String
A string value.
Attributes BindableAttribute
BorderSkin.BackImageAlignment BorderSkin.BackImage
Alignment
I n this Article
Gets or sets the background image alignment of a skin frame.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartImageAlignmentStyle BackImageAlignment {
get; set; }
member this.BackImageAlignment :
System.Windows.Forms.DataVisualization.Charting.ChartImageAlignmentStyle with get, set
Returns
ChartImageAlignmentStyle ChartImageAlignmentStyle
A ChartImageAlignmentStyle enumeration value.
Attributes BindableAttribute
Remarks
The BackImageAlignment property is used by Unscaled drawing mode.
BorderSkin.BackImageTransparentColor BorderSkin.Back
ImageTransparentColor
I n this Article
Gets or sets a color that is replaced with a transparent color when the background image of a border skin frame is
drawn.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BackImageTransparentColor { get; set; }
member this.BackImageTransparentColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value.
Attributes BindableAttribute TypeConverterAttribute
BorderSkin.BackImageWrapMode BorderSkin.BackImage
WrapMode
I n this Article
Gets or sets the drawing mode for the background image of a border skin frame.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartImageWrapMode BackImageWrapMode { get;
set; }
member this.BackImageWrapMode : System.Windows.Forms.DataVisualization.Charting.ChartImageWrapMode
with get, set
Returns
ChartImageWrapMode ChartImageWrapMode
A ChartImageWrapMode enumeration value.
Attributes BindableAttribute
BorderSkin.BackSecondaryColor BorderSkin.Back
SecondaryColor
I n this Article
Gets or sets the secondary background color of a border skin frame.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BackSecondaryColor { get; set; }
member this.BackSecondaryColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value.
Attributes BindableAttribute TypeConverterAttribute
Remarks
This color is combined with the primary background color, which is set with the BackColor property, when the
BackHatchStyle and BackGradientStyle properties are used.
BorderSkin.BorderColor BorderSkin.BorderColor
I n this Article
Gets or sets the border color of a skin frame.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BorderColor { get; set; }
member this.BorderColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value.
Attributes BindableAttribute TypeConverterAttribute
BorderSkin.BorderDashStyle BorderSkin.BorderDashStyle
I n this Article
Gets or sets the style of the border line of a border skin frame.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartDashStyle BorderDashStyle { get; set; }
member this.BorderDashStyle : System.Windows.Forms.DataVisualization.Charting.ChartDashStyle with
get, set
Returns
ChartDashStyle ChartDashStyle
A ChartDashStyle enumeration value.
Attributes BindableAttribute
BorderSkin
I n this Article
Initializes a new instance of the BorderSkin class.
public BorderSkin ();
BorderSkin.BorderWidth BorderSkin.BorderWidth
I n this Article
Gets or sets the width of the border line of a border skin frame.
[System.ComponentModel.Bindable(true)]
public int BorderWidth { get; set; }
member this.BorderWidth : int with get, set
Returns
Int32 Int32
An integer value.
Attributes BindableAttribute
BorderSkin.PageColor BorderSkin.PageColor
I n this Article
Gets or sets the page color of a border skin.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color PageColor { get; set; }
member this.PageColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value.
Attributes BindableAttribute TypeConverterAttribute
BorderSkin.SkinStyle BorderSkin.SkinStyle
I n this Article
Gets or sets the style of a border skin.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.BorderSkinStyle SkinStyle { get; set; }
member this.SkinStyle : System.Windows.Forms.DataVisualization.Charting.BorderSkinStyle with get,
set
Returns
BorderSkinStyle BorderSkinStyle
A BorderSkinStyle enumeration value.
Attributes BindableAttribute
BorderSkinStyle BorderSkinStyle Enum
Specifies a style for the border skin of a chart.
D eclaration
public enum BorderSkinStyle
type BorderSkinStyle =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The BorderSkin class represents the style of the border skin used for a chart image. If you set the SkinStyle property to
None, no skin will be used. This is the default value for the SkinStyle property.
Note
The difference between the sets of border skin styles that use frames and follow either the naming convention
"FrameThin" or "FrameTitle" (for example, FrameThin1 or FrameTitle1) is the shape and thickness of their frames.
In addition, if you use one of the "FrameThin" style border skins, the title of the chart will not be displayed. However, if
you use one of the "FrameTitle" style border skins, the title of the chart will appear in the top-horizontal part of the
frame.
Fields
Emboss Emboss Use an embossed border skin.
FrameThin2 FrameThin2 Use a thin border skin with rounded top corners.
FrameThin4 FrameThin4 Use a thin border skin with square outside corners and rounded inside corners.
FrameThin5 FrameThin5 Use a thin border skin with rounded corners and screws.
FrameThin6 FrameThin6 Use a thin border skin with square inside corners and rounded outside corners.
FrameTitle1 FrameTitle1 Use a border skin with rounded corners.
FrameTitle4 FrameTitle4 Use a border skin with rounded inside corners and square outside corners.
FrameTitle5 FrameTitle5 Use a border skin with rounded corners and screws.
FrameTitle6 FrameTitle6 Use a border skin with rounded outside corners and square inside corners.
FrameTitle7 FrameTitle7 Use a border skin with rounded corners. No border on the right side.
FrameTitle8 FrameTitle8 Use a border skin with rounded corners on top and bottom sides only.
D eclaration
public enum BreakLineStyle
type BreakLineStyle =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Fields
None None Scale break is not displayed.
D eclaration
public class CalloutAnnotation : System.Windows.Forms.DataVisualization.Charting.TextAnnotation
type CalloutAnnotation = class
inherit TextAnnotation
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
Annotation Annotation
TextAnnotation TextAnnotation
Remarks
A callout annotation is the only annotation that draws a connection between the annotation position and the anchor
point. This class can also display text and automatically calculate its required size.
Different callout styles are supported.
Constructors
CalloutAnnotation()
CalloutAnnotation()
Properties
AnchorAlignment
AnchorAlignment
AnchorOffsetX
AnchorOffsetX
Gets or sets the offset that the X-position of the annotation has from the anchor point.
AnchorOffsetY
AnchorOffsetY
Gets or sets the offset that the Y -position of the annotation has from the anchor point.
AnnotationType
AnnotationType
Gets or sets the annotation type name. For internal use, should not be used.
BackColor
BackColor
BackGradientStyle
BackGradientStyle
BackHatchStyle
BackHatchStyle
BackSecondaryColor
BackSecondaryColor
CalloutAnchorCap
CalloutAnchorCap
CalloutStyle
CalloutStyle
LineColor
LineColor
LineDashStyle
LineDashStyle
Returns
ContentAlignment ContentAlignment
A ContentAlignment value that represents the alignment of the annotation to the anchor point.
CalloutAnnotation.AnchorOffsetX CalloutAnnotation.
AnchorOffsetX
I n this Article
Gets or sets the offset that the X-position of the annotation has from the anchor point.
Returns
Double Double
A double value that represents the offset of the annotation's X-position from the anchor point.
Remarks
The CalloutAnnotation must be anchored using either the AnchorDataPoint or the AnchorX property, and its X
property must be set to Double.NaN.
CalloutAnnotation.AnchorOffsetY CalloutAnnotation.
AnchorOffsetY
I n this Article
Gets or sets the offset that the Y -position of the annotation has from the anchor point.
Returns
Double Double
A double value that represents the offset of the annotation's Y -position from the anchor point.
Remarks
The CalloutAnnotation must be anchored using either the AnchorDataPoint or the AnchorY property, and its Y
property must be set to Double.NaN.
CalloutAnnotation.AnnotationType CalloutAnnotation.
AnnotationType
I n this Article
Gets or sets the annotation type name. For internal use, should not be used.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
public override string AnnotationType { get; }
member this.AnnotationType : string
Returns
String String
The annotation type.
Attributes BindableAttribute BrowsableAttribute
Remarks
For internal use, should not be used.
CalloutAnnotation.BackColor CalloutAnnotation.Back
Color
I n this Article
Gets or sets the background color of the annotation.
[System.ComponentModel.Browsable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color BackColor { get; set; }
member this.BackColor : System.Drawing.Color with get, set
Returns
Color Color
A Color enumeration value used for the background of an annotation.
Attributes BrowsableAttribute TypeConverterAttribute
CalloutAnnotation.BackGradientStyle CalloutAnnotation.
BackGradientStyle
I n this Article
Gets or sets the annotation background gradient style.
[System.ComponentModel.Browsable(true)]
public override System.Windows.Forms.DataVisualization.Charting.GradientStyle BackGradientStyle {
get; set; }
member this.BackGradientStyle : System.Windows.Forms.DataVisualization.Charting.GradientStyle with
get, set
Returns
GradientStyle GradientStyle
A GradientStyle enumeration value used to draw the annotation background.
Attributes BrowsableAttribute
Remarks
Two colors are used to draw the gradient, and are set with the BackColor and BackSecondaryColor properties.
CalloutAnnotation.BackHatchStyle CalloutAnnotation.
BackHatchStyle
I n this Article
Gets or sets the background hatch style of the annotation.
[System.ComponentModel.Browsable(true)]
public override System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle BackHatchStyle {
get; set; }
member this.BackHatchStyle : System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle with
get, set
Returns
ChartHatchStyle ChartHatchStyle
A ChartHatchStyle value used to draw the annotation background.
Attributes BrowsableAttribute
Remarks
Two colors are used to draw the hatching, and are set with the BackColor and BackSecondaryColor properties.
CalloutAnnotation.BackSecondaryColor Callout
Annotation.BackSecondaryColor
I n this Article
Gets or sets the secondary color for the annotation background.
[System.ComponentModel.Browsable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color BackSecondaryColor { get; set; }
member this.BackSecondaryColor : System.Drawing.Color with get, set
Returns
Color Color
A Color enumeration value used in conjunction with a primary color to draw the annotation background with hatching
or gradient fill.
Attributes BrowsableAttribute TypeConverterAttribute
Remarks
This color is used with the BackColor property when the BackHatchStyle or BackGradientStyle properties are used.
CalloutAnnotation.CalloutAnchorCap CalloutAnnotation.
CalloutAnchorCap
I n this Article
Gets or sets the style of the callout line anchor cap.
[System.ComponentModel.Bindable(true)]
public virtual System.Windows.Forms.DataVisualization.Charting.LineAnchorCapStyle CalloutAnchorCap {
get; set; }
member this.CalloutAnchorCap : System.Windows.Forms.DataVisualization.Charting.LineAnchorCapStyle
with get, set
Returns
LineAnchorCapStyle LineAnchorCapStyle
A LineAnchorCapStyle enumeration value that represents the style to use for a callout line anchor cap.
Attributes BindableAttribute
Remarks
The CalloutAnchorCap property sets the style of the anchor cap for the line that connects the annotation with the
anchor point. This property is only applicable when a SimpleLine or Borderline callout style is used.
CalloutAnnotation
I n this Article
Initializes a new instance of the CalloutAnnotation class.
public CalloutAnnotation ();
CalloutAnnotation.CalloutStyle CalloutAnnotation.
CalloutStyle
I n this Article
Gets or sets the annotation callout style.
[System.ComponentModel.Bindable(true)]
public virtual System.Windows.Forms.DataVisualization.Charting.CalloutStyle CalloutStyle { get; set;
}
member this.CalloutStyle : System.Windows.Forms.DataVisualization.Charting.CalloutStyle with get,
set
Returns
CalloutStyle CalloutStyle
A CalloutStyle enumeration value.
Attributes BindableAttribute
CalloutAnnotation.LineColor CalloutAnnotation.Line
Color
I n this Article
Gets or sets the annotation line color.
[System.ComponentModel.Browsable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color LineColor { get; set; }
member this.LineColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the annotation line.
Attributes BrowsableAttribute TypeConverterAttribute
CalloutAnnotation.LineDashStyle CalloutAnnotation.Line
DashStyle
I n this Article
Gets or sets the annotation line style.
[System.ComponentModel.Browsable(true)]
public override System.Windows.Forms.DataVisualization.Charting.ChartDashStyle LineDashStyle { get;
set; }
member this.LineDashStyle : System.Windows.Forms.DataVisualization.Charting.ChartDashStyle with get,
set
Returns
ChartDashStyle ChartDashStyle
A ChartDashStyle enumeration value used to draw the annotation line.
Attributes BrowsableAttribute
CalloutAnnotation.LineWidth CalloutAnnotation.Line
Width
I n this Article
Gets or sets the line width of the annotation.
[System.ComponentModel.Browsable(true)]
public override int LineWidth { get; set; }
member this.LineWidth : int with get, set
Returns
Int32 Int32
An integer value that represents the annotation line width, in pixels.
Attributes BrowsableAttribute
CalloutStyle CalloutStyle Enum
Represents the available callout styles. Applicable only to callout annotations.
D eclaration
public enum CalloutStyle
type CalloutStyle =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The CalloutStyle enumeration is used in conjunction with the CalloutStyle property.
Fields
Borderline Borderline A border is drawn around the callout text and a line points to the anchor point.
Cloud Cloud Callout text is inside the cloud and smaller clouds point to the anchor point.
Ellipse Ellipse An ellipse is drawn around the callout text, which is connected to the anchor point.
Perspective Perspective A perspective rectangle is drawn around the callout text, which is connected to the
anchor point.
Rectangle Rectangle A rectangle is drawn around the callout text, which is connected to the anchor point.
RoundedRectangle A rounded rectangle is drawn around the callout text, which is connected to the
RoundedRectangle anchor point.
SimpleLine SimpleLine Callout text is underlined and a line points to the anchor point.
Chart Chart Class
Serves as the root class of the Chart control.
D eclaration
[System.Drawing.ToolboxBitmap(typeof(System.Windows.Forms.DataVisualization.Charting.Chart),
"ChartControl.ico")]
public class Chart : System.Windows.Forms.Control, IDisposable,
System.ComponentModel.ISupportInitialize
type Chart = class
inherit Control
interface ISupportInitialize
interface IDisposable
I nheritance H ierarchy
Object Object
MarshalByRefObject MarshalByRefObject
Component Component
Control Control
Remarks
This class exposes all of the properties, methods and events of the Chart Windows control.
Two important properties of the Chart class are the Series and ChartAreas properties, both of which are collection
properties. The Series collection property stores Series objects, which are used to store data that is to be displayed,
along with attributes of that data. The ChartAreas collection property stores ChartArea objects, which are primarily
used to draw one or more charts using one set of axes.
Constructors
Chart()
Chart()
Properties
Annotations
Annotations
AntiAliasing
AntiAliasing
Gets or sets a value that determines whether anti-aliasing is used when text and graphics are drawn.
BackColor
BackColor
BackGradientStyle
BackGradientStyle
Gets or sets the orientation for the background gradient of a Chart control. Also determines whether a gradient is
used.
BackgroundImage
BackgroundImage
The BackgroundImage property is not used. Use the BackImage property instead.
BackHatchStyle
BackHatchStyle
BackImage
BackImage
BackImageAlignment
BackImageAlignment
Gets or sets the background image alignment used for the Unscaled drawing mode.
BackImageTransparentColor
BackImageTransparentColor
Gets or sets the color of the Chart control that will be displayed as transparent.
BackImageWrapMode
BackImageWrapMode
Gets or sets the drawing mode for the background image of the Chart control.
BackSecondaryColor
BackSecondaryColor
BorderDashStyle
BorderDashStyle
BorderlineColor
BorderlineColor
BorderlineDashStyle
BorderlineDashStyle
BorderlineWidth
BorderlineWidth
BorderSkin
BorderSkin
Gets or sets a BorderSkin object, which provides border skin functionality for the Chart control.
BorderWidth
BorderWidth
BuildNumber
BuildNumber
ChartAreas
ChartAreas
Gets a DataManipulator object that provides methods and properties that handle data.
DataSource
DataSource
DefaultSize
DefaultSize
Font
Font
ForeColor
ForeColor
Images
Images
Gets a NamedImagesCollection object that stores NamedImage objects for the chart.
IsSoftShadows
IsSoftShadows
Gets or sets a flag that determines if a smooth gradient is applied when shadows are drawn.
Legends
Legends
Gets or sets a LegendCollection that stores all Legend objects used by the Chart control.
Palette
Palette
Printing
Printing
RenderingDpiX
RenderingDpiX
RenderingDpiY
RenderingDpiY
Serializer
Serializer
Series
Series
Size
Size
SuppressExceptions
SuppressExceptions
Gets or sets a flag that determines whether non-critical exceptions should be suppressed.
TextAntiAliasingQuality
TextAntiAliasingQuality
Gets or sets the TextAntiAliasingQuality type to use when applying anti-aliasing to text.
Titles
Titles
Gets or sets a TitleCollection object that is used to store all Title objects used by the Chart control.
Methods
AlignDataPointsByAxisLabel()
AlignDataPointsByAxisLabel()
Aligns data points along the X axis using their axis labels. Applicable when multiple series are indexed and their X-
values are strings.
AlignDataPointsByAxisLabel(String)
AlignDataPointsByAxisLabel(String)
Aligns data points from different series along the X axis using their axis labels. The specified series in the chart are
aligned using an ascending sort order.
AlignDataPointsByAxisLabel(PointSortOrder)
AlignDataPointsByAxisLabel(PointSortOrder)
Aligns data points using their axis labels. All series in the chart are aligned, using the specified sort order.
AlignDataPointsByAxisLabel(String, PointSortOrder)
AlignDataPointsByAxisLabel(String, PointSortOrder)
ApplyPaletteColors()
ApplyPaletteColors()
Sets the automatically assigned series and data point colors, to allow programmatic access at run time.
BeginInit()
BeginInit()
CreateAccessibilityInstance()
CreateAccessibilityInstance()
When overridden in a derived class, returns the custom AccessibleObject for the entire chart.
DataBind()
DataBind()
Data binds a chart to the table, with one series created per unique value in a given column.
Data binds a chart to the table, with one series created per unique value in a given column.
DataBindTable(IEnumerable)
DataBindTable(IEnumerable)
Automatically creates and binds series data to the specified data table.
DataBindTable(IEnumerable, String)
DataBindTable(IEnumerable, String)
Automatically creates and binds series data to the specified data table, and optionally populates X-values.
Dispose(Boolean)
Dispose(Boolean)
EndInit()
EndInit()
GetChartElementOutline(Object, ChartElementType)
GetChartElementOutline(Object, ChartElementType)
GetService(Type)
GetService(Type)
Determines the chart element, if any, that is located at a point defined by the given X and Y coordinates.
Determines the chart element, if any, that is located at a point defined by given X and Y coordinates. Transparent
elements can optionally be ignored.
Determines if a chart element of a given type is located at a point defined by given X and Y coordinates.
Determines whether a chart element that is one of the specified types is located at a point defined by the given X
and Y coordinates.
Invalidate()
Invalidate()
Invalidates the entire surface of the Chart and causes the Chart control to be redrawn.
Invalidate(Rectangle)
Invalidate(Rectangle)
LoadTemplate(String)
LoadTemplate(String)
LoadTemplate(Stream)
LoadTemplate(Stream)
OnCursorChanged(EventArgs)
OnCursorChanged(EventArgs)
OnCustomize()
OnCustomize()
OnCustomizeLegend(LegendItemsCollection, String)
OnCustomizeLegend(LegendItemsCollection, String)
OnDoubleClick(EventArgs)
OnDoubleClick(EventArgs)
OnFormatNumber(FormatNumberEventArgs)
OnFormatNumber(FormatNumberEventArgs)
OnLocationChanged(EventArgs)
OnLocationChanged(EventArgs)
OnMouseDown(MouseEventArgs)
OnMouseDown(MouseEventArgs)
OnMouseMove(MouseEventArgs)
OnMouseMove(MouseEventArgs)
OnMouseUp(MouseEventArgs)
OnMouseUp(MouseEventArgs)
OnPaint(PaintEventArgs)
OnPaint(PaintEventArgs)
OnPaintBackground(PaintEventArgs)
OnPaintBackground(PaintEventArgs)
OnPostPaint(ChartPaintEventArgs)
OnPostPaint(ChartPaintEventArgs)
OnPrePaint(ChartPaintEventArgs)
OnPrePaint(ChartPaintEventArgs)
OnResize(EventArgs)
OnResize(EventArgs)
OnRightToLeftChanged(EventArgs)
OnRightToLeftChanged(EventArgs)
OnSystemColorsChanged(EventArgs)
OnSystemColorsChanged(EventArgs)
Refresh()
Refresh()
Forces the control to invalidate its client area and immediately redraw itself and any child controls.
ResetAutoValues()
ResetAutoValues()
SaveImage(String, ImageFormat)
SaveImage(String, ImageFormat)
SaveImage(Stream, ImageFormat)
SaveImage(Stream, ImageFormat)
SaveImage(Stream, ChartImageFormat)
SaveImage(Stream, ChartImageFormat)
UpdateAnnotations()
UpdateAnnotations()
UpdateCursor()
UpdateCursor()
Events
AnnotationPlaced
AnnotationPlaced
AnnotationPositionChanged
AnnotationPositionChanged
AnnotationPositionChanging
AnnotationPositionChanging
AnnotationTextChanged
AnnotationTextChanged
AxisScrollBarClicked
AxisScrollBarClicked
AxisViewChanged
AxisViewChanged
AxisViewChanging
AxisViewChanging
Occurs when the axis scale view position or size is about to change.
CursorPositionChanged
CursorPositionChanged
CursorPositionChanging
CursorPositionChanging
Customize
Customize
Occurs just before the chart image is drawn. Use this event to customize the chart picture.
CustomizeLegend
CustomizeLegend
GetToolTipText
GetToolTipText
PostPaint
PostPaint
PrePaint
PrePaint
SelectionRangeChanged
SelectionRangeChanged
SelectionRangeChanging
SelectionRangeChanging
Overloads
AlignDataPointsByAxisLabel() AlignDataPointsByAxisLabel()
Aligns data points along the X axis using their axis labels.
Applicable when multiple series are indexed and their X-values
are strings.
AlignDataPointsByAxisLabel(String) AlignDataPointsByAxis
Label(String) Aligns data points from different series along the X axis using
their axis labels. The specified series in the chart are aligned
using an ascending sort order.
AlignDataPointsByAxisLabel(PointSortOrder) AlignDataPoints
ByAxisLabel(PointSortOrder) Aligns data points using their axis labels. All series in the chart
are aligned, using the specified sort order.
AlignDataPointsByAxisLabel() AlignDataPointsByAxisLabel()
Aligns data points along the X axis using their axis labels. Applicable when multiple series are indexed and their X-
values are strings.
public void AlignDataPointsByAxisLabel ();
member this.AlignDataPointsByAxisLabel : unit -> unit
AlignDataPointsByAxisLabel(String)
AlignDataPointsByAxisLabel(String)
Aligns data points from different series along the X axis using their axis labels. The specified series in the chart are
aligned using an ascending sort order.
public void AlignDataPointsByAxisLabel (string series);
member this.AlignDataPointsByAxisLabel : string -> unit
Parameters
series String String
A comma-separated list of series that will have their data points aligned to the X axis using the data point axis labels.
Remarks
This method is used to align data points from different series along the X axis using their axis labels, and is applicable
when:
Multiple series are displayed and are indexed; that is, all data points have an XValue of 0, or the IsXValueIndexed
property is true .
All data points have non-empty axis labels, which are unique to their Series. If they are not unique, an exception will be
thrown.
This situation is very common when data-binding results in the creation of multiple series, and string values are used
for X-axis values.
Two issues arise when multiple, indexed series are plotted, and the X-values are set using string values:
It cannot be guaranteed that data points from different series with the same string X-values will be plotted at the same
index along the X axis.
Only the axis label for the data points in the first series will be displayed, even though data points from other series
with the same index have axis labels too.
By default, points are plotted in the order in which they are stored in their series. To specify a sort order, use an
AlignDataPointsByAxisLabel method overload that has a sortingOrder parameter.
AlignDataPointsByAxisLabel(PointSortOrder)
AlignDataPointsByAxisLabel(PointSortOrder)
Aligns data points using their axis labels. All series in the chart are aligned, using the specified sort order.
public void AlignDataPointsByAxisLabel
(System.Windows.Forms.DataVisualization.Charting.PointSortOrder sortingOrder);
member this.AlignDataPointsByAxisLabel :
System.Windows.Forms.DataVisualization.Charting.PointSortOrder -> unit
Parameters
sortingOrder PointSortOrder PointSortOrder
A PointSortOrder object that indicates if ascending or descending sort order is used on axis labels, which in turn
determines the order by which points that previously occupied the same axis space are displayed.
AlignDataPointsByAxisLabel(String, PointSortOrder)
AlignDataPointsByAxisLabel(String, PointSortOrder)
Aligns data points using their axis labels.
Parameters
series String String
A comma-separated list of series that should be aligned by axis label.
sortingOrder PointSortOrder PointSortOrder
A PointSortOrder enumeration value that determines if ascending or descending sort order is used on axis labels,
which in turn determines the order by which points that previously occupied the same axis space are displayed.
Remarks
This method is used to align data points from different series along the X axis using their axis labels, and is applicable
when:
Multiple series are displayed and are indexed; that is, all data points have an XValue of 0, or the IsXValueIndexed
property is true .
All data points have non-empty axis labels, which are unique to their Series. If they are not unique, an exception will be
thrown.
This situation is very common when data-binding results in the creation of multiple series, and string values are used
for X-axis values.
Two issues arise when multiple, indexed series are plotted, and the X-values are set using string values:
It cannot be guaranteed that data points from different series with the same string X-values will be plotted at the same
index along the X axis.
Only the axis label for the data points in the first series will be displayed, even though data points from other series
with the same index have axis labels too.
By default, points are plotted in the order in which they are stored in their series. To specify a sort order, use an
AlignDataPointsByAxisLabel method overload that has a sortingOrder parameter.
Chart.AnnotationPlaced Chart.AnnotationPlaced
I n this Article
Occurs when the end-user places an annotation on the chart.
public event EventHandler AnnotationPlaced;
member this.AnnotationPlaced : EventHandler
Chart.AnnotationPositionChanged Chart.Annotation
PositionChanged
I n this Article
Occurs when the annotation position is changed.
public event
EventHandler<System.Windows.Forms.DataVisualization.Charting.AnnotationPositionChangingEventArgs>
AnnotationPositionChanging;
member this.AnnotationPositionChanging :
EventHandler<System.Windows.Forms.DataVisualization.Charting.AnnotationPositionChangingEventArgs>
Chart.Annotations Chart.Annotations
I n this Article
Gets or sets a collection that stores the chart annotations.
public System.Windows.Forms.DataVisualization.Charting.AnnotationCollection Annotations { get; }
member this.Annotations : System.Windows.Forms.DataVisualization.Charting.AnnotationCollection
Returns
AnnotationCollection AnnotationCollection
An AnnotationCollection object that is used to store chart annotations.
Remarks
All of the chart annotations are stored in this collection property.
Chart.AnnotationSelectionChanged Chart.Annotation
SelectionChanged
I n this Article
Occurs when a selection of the annotation is changed.
Returns
AntiAliasingStyles AntiAliasingStyles
An AntiAliasingStyles enumeration value that determines whether anti-aliasing is used when text and graphics are
drawn.
Attributes BindableAttribute
Remarks
Anti-aliasing smoothens out "jagged edges" by padding pixels with intermediate colors, and is especially effective for
smoothing out edges for charts that are not drawn as rectangles. For example, anti-aliasing is very effective for line
charts and pie charts, but is not as effective for bar and column charts.
Anti-aliasing can be applied to text and/or graphics primitives such as rectangles, circles, and so forth.
Note that anti-aliasing will affect performance.
Chart.ApplyPaletteColors Chart.ApplyPaletteColors
I n this Article
Sets the automatically assigned series and data point colors, to allow programmatic access at run time.
public void ApplyPaletteColors ();
member this.ApplyPaletteColors : unit -> unit
Remarks
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.
If you call the ApplyPaletteColors method, the colors for the series and the data points will be set, which allows for
programmatic access.
Chart.AxisScrollBarClicked Chart.AxisScrollBarClicked
I n this Article
Occurs when the axis scroll bar is clicked by the end-user.
public event EventHandler<System.Windows.Forms.DataVisualization.Charting.ScrollBarEventArgs>
AxisScrollBarClicked;
member this.AxisScrollBarClicked :
EventHandler<System.Windows.Forms.DataVisualization.Charting.ScrollBarEventArgs>
Chart.AxisViewChanged Chart.AxisViewChanged
I n this Article
Occurs when the axis scale view position or size is changed.
public event EventHandler<System.Windows.Forms.DataVisualization.Charting.ViewEventArgs>
AxisViewChanged;
member this.AxisViewChanged :
EventHandler<System.Windows.Forms.DataVisualization.Charting.ViewEventArgs>
Chart.AxisViewChanging Chart.AxisViewChanging
I n this Article
Occurs when the axis scale view position or size is about to change.
public event EventHandler<System.Windows.Forms.DataVisualization.Charting.ViewEventArgs>
AxisViewChanging;
member this.AxisViewChanging :
EventHandler<System.Windows.Forms.DataVisualization.Charting.ViewEventArgs>
Chart.BackColor Chart.BackColor
I n this Article
Gets or sets the background color of the Chart object.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color BackColor { get; set; }
member this.BackColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the background color of the chart. The default color is White.
Attributes BindableAttribute TypeConverterAttribute
Remarks
You can set this property to any valid ARGB (alpha, red, green, blue) value. Note that for the Chart object, the alpha
component cannot be set to a value other than 255. This also means that, for the Chart object only, a Transparent value
cannot be used.
The BackColor value will be the first color used if you are using gradient colors for the background.
The alpha value controls the opacity of a color. If you set this color to "transparent" - that is, if you use an alpha value of
0 - no color will be assigned to the background of the title. As a result, the background will be transparent.
Chart.BackGradientStyle Chart.BackGradientStyle
I n this Article
Gets or sets the orientation for the background gradient of a Chart control. Also determines whether a gradient is used.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.GradientStyle BackGradientStyle { get; set; }
member this.BackGradientStyle : System.Windows.Forms.DataVisualization.Charting.GradientStyle with
get, set
Returns
GradientStyle GradientStyle
A GradientStyle enumeration that specifies the orientation for the background gradient of a chart and whether a
gradient is used. The default value is None.
Attributes BindableAttribute
Remarks
Use the BackGradientStyle property to determine whether a Chart control will display a gradient, and to determine the
orientation of the gradient if one is used.
For a listing of available patterns, refer to the GradientStyle enumeration.
To use gradient colors:
Set the primary color of the chart background with the BackColor property.
Set the secondary color of the chart background with the BackSecondaryColor property.
Set this BackGradientStyle property to the desired gradient style.
Chart.BackgroundImage Chart.BackgroundImage
I n this Article
The BackgroundImage property is not used. Use the BackImage property instead.
[System.ComponentModel.Browsable(false)]
public override System.Drawing.Image BackgroundImage { get; set; }
member this.BackgroundImage : System.Drawing.Image with get, set
Returns
Image Image
An Image object.
Attributes BrowsableAttribute
Chart.BackHatchStyle Chart.BackHatchStyle
I n this Article
Gets or sets the hatching style of the Chart control.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle BackHatchStyle { get; set; }
member this.BackHatchStyle : System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle with
get, set
Returns
ChartHatchStyle ChartHatchStyle
A ChartHatchStyle enumeration that specifies the hatching style of the Chart control. The default value is None.
Attributes BindableAttribute
Remarks
The ChartHatchStyle enumeration specifies the hatch pattern used by a brush of type HatchBrush. The hatch pattern
consists of a solid background color and lines drawn over the background.
For a listing of available hatching styles, refer to the ChartHatchStyle enumeration.
Note The color of hatching lines is determined by the BackSecondaryColor property.
Chart.BackImage Chart.BackImage
I n this Article
Gets or sets the background image of the Chart control.
[System.ComponentModel.Bindable(true)]
public string BackImage { get; set; }
member this.BackImage : string with get, set
Returns
String String
A string value that represents the URL of an image file. The default value is an empty string.
Attributes BindableAttribute
Remarks
This property defines a path to a background image for a Chart legend, and can be an absolute or relative URL.
To position the image, use the BackImageAlignment and BackImageWrapMode properties.
You can also specify one of the colors displayed by the image as "transparent", by setting the
BackImageTransparentColor property.
An image can originate from any valid graphics file supported by .NET Framework, including icons.
Background images take precedence over other background properties such as gradient color.
Chart.BackImageAlignment Chart.BackImageAlignment
I n this Article
Gets or sets the background image alignment used for the Unscaled drawing mode.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartImageAlignmentStyle BackImageAlignment {
get; set; }
member this.BackImageAlignment :
System.Windows.Forms.DataVisualization.Charting.ChartImageAlignmentStyle with get, set
Returns
ChartImageAlignmentStyle ChartImageAlignmentStyle
A ChartImageAlignmentStyle enumeration value that specifies the background image alignment of the chart. The
default value is TopLeft.
Attributes BindableAttribute
Remarks
This property determines the alignment of the background image for the Chart control; it is only applied when the
BackImageWrapMode property is set to ChartImageWrapMode.
Chart.BackImageTransparentColor Chart.BackImage
TransparentColor
I n this Article
Gets or sets the color of the Chart control that will be displayed as transparent.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BackImageTransparentColor { get; set; }
member this.BackImageTransparentColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that will be displayed as transparent when the chart image is drawn. The default value is Empty.
Attributes BindableAttribute TypeConverterAttribute
Chart.BackImageWrapMode Chart.BackImageWrapMode
I n this Article
Gets or sets the drawing mode for the background image of the Chart control.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartImageWrapMode BackImageWrapMode { get;
set; }
member this.BackImageWrapMode : System.Windows.Forms.DataVisualization.Charting.ChartImageWrapMode
with get, set
Returns
ChartImageWrapMode ChartImageWrapMode
A ChartImageWrapMode enumeration value that specifies the drawing mode for the background image of the chart.
The default value is Tile.
Attributes BindableAttribute
Remarks
This property determines how the image is displayed, for example, tiled, scaled, and so forth.
If an image is scaled, it will be stretched to fit within the bounds of the chart. If the image is tiled, it is repeatedly drawn,
starting from the top-left corner of the chart.
For more information about the available wrapping modes, see the ChartImageWrapMode enumeration topic.
If the BackImageWrapMode property is set to ChartImageWrapMode, the location where the image is drawn is
determined by the BackImageAlignment property setting.
Chart.BackSecondaryColor Chart.BackSecondaryColor
I n this Article
Gets or sets the secondary color of the chart background.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BackSecondaryColor { get; set; }
member this.BackSecondaryColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that represents the secondary color of the chart background. The default value is Empty.
Attributes BindableAttribute TypeConverterAttribute
Remarks
The BackSecondaryColor property determines the secondary background color of many Chart objects, and is used
when gradient colors are being applied.
You can set BackSecondaryColor to any valid ARGB (alpha, red, green, blue) value.
If hatching is used, the BackSecondaryColor property determines the color of the hatching lines for the chart.
To use gradient colors for the background of a chart:
Set the primary color with the BackColor property.
Set the secondary color with the BackSecondaryColor property.
Set the BackGradientStyle property to the desired gradient style.
Chart.BeginInit Chart.BeginInit
I n this Article
Signals to the object that initialization is starting.
public void BeginInit ();
abstract member BeginInit : unit -> unit
override this.BeginInit : unit -> unit
Chart.BorderColor Chart.BorderColor
I n this Article
Gets or sets the color of the chart border.
[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BorderColor { get; set; }
member this.BorderColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the chart border.
Attributes BindableAttribute BrowsableAttribute TypeConverterAttribute
Remarks
To get or set the border color, use BorderlineColor instead.
Chart.BorderDashStyle Chart.BorderDashStyle
I n this Article
Gets or sets the style of the border.
[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
public System.Windows.Forms.DataVisualization.Charting.ChartDashStyle BorderDashStyle { get; set; }
member this.BorderDashStyle : System.Windows.Forms.DataVisualization.Charting.ChartDashStyle with
get, set
Returns
ChartDashStyle ChartDashStyle
A ChartDashStyle enumeration value that specifies the style of the border.
Attributes BindableAttribute BrowsableAttribute
Chart.BorderlineColor Chart.BorderlineColor
I n this Article
Gets or sets the color of the border line.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BorderlineColor { get; set; }
member this.BorderlineColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the border line.
Attributes BindableAttribute TypeConverterAttribute
Chart.BorderlineDashStyle Chart.BorderlineDashStyle
I n this Article
Gets or sets the style of the border line.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartDashStyle BorderlineDashStyle { get;
set; }
member this.BorderlineDashStyle : System.Windows.Forms.DataVisualization.Charting.ChartDashStyle
with get, set
Returns
ChartDashStyle ChartDashStyle
A ChartDashStyle enumeration value that specifies the style of the border line.
Attributes BindableAttribute
Chart.BorderlineWidth Chart.BorderlineWidth
I n this Article
Gets or sets the width of the border line.
[System.ComponentModel.Bindable(true)]
public int BorderlineWidth { get; set; }
member this.BorderlineWidth : int with get, set
Returns
Int32 Int32
An integer value that specifies the width of the border line.
Attributes BindableAttribute
Chart.BorderSkin Chart.BorderSkin
I n this Article
Gets or sets a BorderSkin object, which provides border skin functionality for the Chart control.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.LegendCo
nverter))]
public System.Windows.Forms.DataVisualization.Charting.BorderSkin BorderSkin { get; set; }
member this.BorderSkin : System.Windows.Forms.DataVisualization.Charting.BorderSkin with get, set
Returns
BorderSkin BorderSkin
A BorderSkin object which provides border skin functionality for the chart.
Attributes BindableAttribute TypeConverterAttribute
Remarks
Use this property to specify a border skin for the chart.
Chart.BorderWidth Chart.BorderWidth
I n this Article
Gets or set s the width of the chart border.
[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
public int BorderWidth { get; set; }
member this.BorderWidth : int with get, set
Returns
Int32 Int32
An integer value that determines the border width, in pixels, of the chart.
Attributes BindableAttribute BrowsableAttribute
Remarks
To get or set of the border width, use BorderlineWidth instead.
Chart.BuildNumber Chart.BuildNumber
I n this Article
Gets the build number of the Chart control.
[System.ComponentModel.Browsable(false)]
public string BuildNumber { get; }
member this.BuildNumber : string
Returns
String String
A string that represents the build number of the chart control.
Attributes BrowsableAttribute
Chart
I n this Article
Initializes a new instance of the Chart class.
public Chart ();
Remarks
You can use this constructor to create a new instance of the Chart class at run time.
However, for simplicity, it is recommended that you create a Chart instance at design time.
This is the root object of the Chart control.
Chart.ChartAreas Chart.ChartAreas
I n this Article
Gets a read-only ChartAreaCollection object that is used to store ChartArea objects.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartAreaCollection ChartAreas { get; }
member this.ChartAreas : System.Windows.Forms.DataVisualization.Charting.ChartAreaCollection
Returns
ChartAreaCollection ChartAreaCollection
A read-only ChartAreaCollection object that contains collection of ChartArea objects.
Attributes BindableAttribute
Remarks
This collection property lets you access the ChartAreaCollection object, which stores ChartArea objects and also
provides methods and properties used to manipulate the collection.
ChartArea objects are used to plot one or more charts.
Chart.CreateAccessibilityInstance Chart.Create
AccessibilityInstance
I n this Article
When overridden in a derived class, returns the custom AccessibleObject for the entire chart.
Returns
AccessibleObject AccessibleObject
The AccessibleObject for the chart.
Chart.CursorPositionChanged Chart.CursorPosition
Changed
I n this Article
Occurs when the cursor position is changed.
Remarks
This method will bind the Chart control to the specified data source.
In cases where a data source is set to a chart and no other data operations are required, the DataBind method does not
have to be explicitly called. In these cases, the Chart itself will data bind to the data source prior to being rendered.
Chart.DataBindCrossTable Chart.DataBindCrossTable
I n this Article
Overloads
DataBindCrossTable(IEnumerable, String, String, String, String)
DataBindCrossTable(IEnumerable, String, String, String, String) Data binds a chart to the table, with one series created per
unique value in a given column.
Parameters
dataSource IEnumerable IEnumerable
The data source that is data bound by a chart.
seriesGroupByField String String
The name of the field used to group data into the series.
xField String String
The name of the field for X values.
yFields String String
A comma-separated list of name(s) of the field(s) for Y value(s).
otherFields String String
The other data point properties that can be bound.
Remarks
Series will be automatically added to the chart, depending on the number of unique values in the given
seriesGroupByField column of the data source; in other words, the creation of series depends upon grouping of a
column.
The data source can be a OleDbDataReader, SqlDataReader or a DataView object. Note that all collections that
implement the IEnumerable interface can be used.
Other data point properties besides X and Y -values can be bound. The format is: PointProperty=Field[{Format}]
[,PointProperty= Field[{Format}]]. For example:"Tooltip=Price{C1},Href=WebSiteName".
These data point properties are:
DataPointCustomProperties.AxisLabel
DataPointCustomProperties.ToolTip
DataPointCustomProperties.Label
DataPointCustomProperties.LegendText
DataPointCustomProperties.LegendToolTip
DataPointCustomProperties.CustomProperties, which are the names of the custom properties.
Parameters
dataSource IEnumerable IEnumerable
The data source that is data bound by a chart.
seriesGroupByField String String
The name of the field used to group data into the series.
xField String String
The name of the field for X values.
yFields String String
A comma-separated list of name(s) of the field(s) for Y value(s).
otherFields String String
The other data point properties that can be bound.
sortingOrder PointSortOrder PointSortOrder
The order in which the series will be sorted by group field values.
Remarks
Series will be automatically added to the chart, depending on the number of unique values in the given
seriesGroupByField column of the data source; in other words, the creation of series depends upon grouping of a
column.
The data source can be a OleDbDataReader, SqlDataReader or a DataView object.
Note that all collections that implement the IEnumerable interface can be used.
Other data point properties besides X and Y -values can be bound. The format is: PointProperty=Field[{Format}]
[,PointProperty= Field[{Format}]]. For example:"Tooltip=Price{C1},Href=WebSiteName".
These data point properties are:
DataPointCustomProperties.AxisLabel
DataPointCustomProperties.ToolTip
DataPointCustomProperties.Label
DataPointCustomProperties.LegendText
DataPointCustomProperties.LegendToolTip
CustomProperties, which are the names of the custom properties
Chart.DataBindTable Chart.DataBindTable
I n this Article
Overloads
DataBindTable(IEnumerable) DataBindTable(IEnumerable)
Automatically creates and binds series data to the specified
data table.
DataBindTable(IEnumerable) DataBindTable(IEnumerable)
Automatically creates and binds series data to the specified data table.
public void DataBindTable (System.Collections.IEnumerable dataSource);
member this.DataBindTable : System.Collections.IEnumerable -> unit
Parameters
dataSource IEnumerable IEnumerable
The data source that is data bound by a chart, which can be any IEnumerable object.
Remarks
Each column of the table becomes a Y -value for a series, with one series per column.
Parameters
dataSource IEnumerable IEnumerable
The data source that is data bound by a chart, which can be any IEnumerable object.
xField String String
The name of the field used for the series X-values.
Remarks
Each column of the table becomes a Y -value for a series, with one series per column.
The series' X-value field can also be provided.
Chart.DataManipulator Chart.DataManipulator
I n this Article
Gets a DataManipulator object that provides methods and properties that handle data.
[System.ComponentModel.Browsable(false)]
public System.Windows.Forms.DataVisualization.Charting.DataManipulator DataManipulator { get; }
member this.DataManipulator : System.Windows.Forms.DataVisualization.Charting.DataManipulator
Returns
DataManipulator DataManipulator
A DataManipulator object that provides methods and properties that handle data.
Attributes BrowsableAttribute
Remarks
Use this property at run-time to:
Copy Y -values.
Filter data.
Group data.
Replace missing data with empty points.
Export data to a DataSet object.
Sort data.
Apply a financial formula to data.
Refer to the DataManipulator class overview for further details.
Chart.DataSource Chart.DataSource
I n this Article
Gets or sets the data source for the Chart object.
[System.ComponentModel.Bindable(true)]
public object DataSource { get; set; }
member this.DataSource : obj with get, set
Returns
Object Object
An Object that represents the data source for the Chart object.
Attributes BindableAttribute
Remarks
The data points in a series can be bound to a data source at any time using the DataSource property.
To force the chart to bind to the data source, call the DataBind method.
The following is a list of objects that you can use as the data source:
DataView
Data readers (SQL, OleDB )
DataSet
DataTable
Binding Source
IDataSource
Arrays
Lists
All Enumerable objects
SqlCommand / OleDbCommand (DataSource data-binding only)
SqlDataAdapter / OleDbDataAdapter (DataSource data-binding only)
Chart.DefaultSize Chart.DefaultSize
I n this Article
Gets the default control size.
protected override System.Drawing.Size DefaultSize { get; }
member this.DefaultSize : System.Drawing.Size
Returns
Size Size
A Size object that represents the default size of the control.
Chart.Dispose Chart.Dispose
I n this Article
Releases unmanaged and, optionally, managed resources.
protected override void Dispose (bool disposing);
override this.Dispose : bool -> unit
Parameters
disposing Boolean Boolean
true to release both unmanaged and managed resources; false to release only unmanaged resources.
Chart.EndInit Chart.EndInit
I n this Article
Signals to the Chart object that initialization is complete.
public void EndInit ();
abstract member EndInit : unit -> unit
override this.EndInit : unit -> unit
Chart.Font Chart.Font
I n this Article
Gets the font properties of the control.
[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
public System.Drawing.Font Font { get; set; }
member this.Font : System.Drawing.Font with get, set
Returns
Font Font
A Font object that represents the text font of the control.
Attributes BindableAttribute BrowsableAttribute
Chart.ForeColor Chart.ForeColor
I n this Article
Gets or sets the text color of the Chart control.
[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color ForeColor { get; set; }
member this.ForeColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that specifies the text color of the chart.
Attributes BindableAttribute BrowsableAttribute TypeConverterAttribute
Remarks
This property is not applicable to this class.
Chart.FormatNumber Chart.FormatNumber
I n this Article
Occurs when a numeric value has to be converted to a string.
public event EventHandler<System.Windows.Forms.DataVisualization.Charting.FormatNumberEventArgs>
FormatNumber;
member this.FormatNumber :
EventHandler<System.Windows.Forms.DataVisualization.Charting.FormatNumberEventArgs>
Chart.GetChartElementOutline Chart.GetChartElement
Outline
I n this Article
Returns the chart element outline.
Parameters
element Object Object
The Chart object.
elementType ChartElementType ChartElementType
The type of the element.
Returns
ChartElementOutline ChartElementOutline
A ChartElementOutline object that contains:
An array of points in absolute coordinates that can be used as outline markers around this chart element.
A GraphicsPath object for drawing an outline around this chart element.
Remarks
If the chartElement is not part of the chart, or the elementType cannot be combined with chartElement , the result
will contain an empty array of marker points. The marker points are sorted clockwise.
Chart.GetService Chart.GetService
I n this Article
Returns the requested chart service.
public object GetService (Type serviceType);
override this.GetService : Type -> obj
Parameters
serviceType Type Type
The type of requested chart service.
Returns
Object Object
An Object that represents the service type, or null if the service cannot be found.
Chart.GetToolTipText Chart.GetToolTipText
I n this Article
Occurs before showing the tooltip to get the tooltip text.
public event EventHandler<System.Windows.Forms.DataVisualization.Charting.ToolTipEventArgs>
GetToolTipText;
member this.GetToolTipText :
EventHandler<System.Windows.Forms.DataVisualization.Charting.ToolTipEventArgs>
Chart.HitTest Chart.HitTest
I n this Article
Overloads
HitTest(Int32, Int32) HitTest(Int32, Int32)
Determines the chart element, if any, that is located at a point
defined by the given X and Y coordinates.
Remarks
Call this method to determine the chart element, if any, that is located at a specified point.
This method is often used in some mouse-related event - for example, OnMouseDown - to determine which chart
element the end-user clicked. The X and Y mouse coordinates obtained from the event parameters are then used for
the x and y parameter values of this method call.
The properties of the HitTestResult object that is returned can then be used to determine which chart element was
clicked; the HitTestResult object also provides an instance of the actual object selected, if any.
Parameters
x Int32 Int32
The X-coordinate value of the point the user clicked.
y Int32 Int32
The Y -coordinate value of the point the user clicked.
Returns
HitTestResult HitTestResult
A HitTestResult object, which provides information concerning the chart element, if any, that is at the specified location.
Remarks
Call this method to determine the chart element, if any, which is located at a specified point.
The properties of the HitTestResult object that is returned can then be used to determine which chart element was
clicked; the HitTestResult object also provides an instance of the actual object selected, if any.
Parameters
x Int32 Int32
The X-coordinate value of the point the user clicked on.
y Int32 Int32
The Y -coordinate value of the point the user clicked on.
ignoreTransparent Boolean Boolean
true to ignore transparent elements; otherwise, false .
Returns
HitTestResult HitTestResult
A HitTestResult object, which provides information concerning the chart element, if any, that is at the specified location.
Remarks
Call this method to determine the chart element, if any, which is located at a specified point.
To ignore transparent elements, set the ignoreTransparent parameter to true .
The properties of the HitTestResult object that is returned can then be used to determine which chart element was
clicked; the HitTestResult object also provides an instance of the actual object selected, if any.
Parameters
x Int32 Int32
The X-coordinate value of the point the user clicked on.
y Int32 Int32
The Y -coordinate value of the point the user clicked on.
requestedElement ChartElementType ChartElementType
A flag that determines the chart element type to be tested.
Returns
HitTestResult HitTestResult
A HitTestResult object, which provides information concerning the chart element, if any, that is at the specified location.
Remarks
Call this method to determine if a chart element of the given type is located at a specified point.
The properties of the HitTestResult object that is returned can then be used to determine which chart element was
clicked; the HitTestResult object also provides an instance of the actual object selected, if any.
Parameters
x Int32 Int32
The X-coordinate for the specified data point.
y Int32 Int32
The Y -coordinate for the specified data point.
ignoreTransparent Boolean Boolean
true to ignore transparent elements; otherwise, false .
requestedElement ChartElementType[]
An array of ChartElementType objects that specify the types to test for, in order to filter the result. If omitted, checking
for element types will be ignored and all element types will be valid.
Returns
HitTestResult[]
An array of HitTestResult objects that provides information about the chart element, if any, found at the specified
location. The array contains at least one element, which can be Nothing. The objects in the result are sorted from the
top to the bottom of different layers of control.
Remarks
Call this method to determine the gauge element, if any, which is located at a specified point. This method is often used
in some mouse-related event, for example, OnMouseDown, to determine which gauge element the end-user clicked.
The X and Y mouse coordinates obtained from the event parameters are then used for the X and Y parameter values of
this method call.
The properties of the returned HitTestResult object can then be used to determine which chart element was clicked; the
HitTestResult object also provides an instance of the actual object selected, if any.
Chart.Images Chart.Images
I n this Article
Gets a NamedImagesCollection object that stores NamedImage objects for the chart.
[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
public System.Windows.Forms.DataVisualization.Charting.NamedImagesCollection Images { get; }
member this.Images : System.Windows.Forms.DataVisualization.Charting.NamedImagesCollection
Returns
NamedImagesCollection NamedImagesCollection
A NamedImagesCollection object that contains the collection of NamedImage objects.
Attributes BindableAttribute BrowsableAttribute
Remarks
Use this property to add NamedImage objects to and remove NamedImage objects from the NamedImagesCollection
object of the Chart. This collection property is available at run time only.
An image - that is, an object derived from type Image, such as Bitmap, that is created dynamically - can be stored in
this collection, and then assigned at a later time to any image-related Chart property, such as BackImage.
When you assign a NamedImage object to an image-related property in the Chart class, use the name of the
NamedImage object for the string value of the image-related property.
Chart.Invalidate Chart.Invalidate
I n this Article
Overloads
Invalidate() Invalidate()
Invalidates the entire surface of the Chart and causes the
Chart control to be redrawn.
Invalidate(Rectangle) Invalidate(Rectangle)
Invalidates the specified area of the Chart control.
Invalidate() Invalidate()
Invalidates the entire surface of the Chart and causes the Chart control to be redrawn.
public void Invalidate ();
override this.Invalidate : unit -> unit
Invalidate(Rectangle) Invalidate(Rectangle)
Invalidates the specified area of the Chart control.
public void Invalidate (System.Drawing.Rectangle rectangle);
override this.Invalidate : System.Drawing.Rectangle -> unit
Parameters
rectangle Rectangle Rectangle
A Rectangle object that specifies the area to invalidate.
Remarks
This method adds the specified area to the Chart control's update area, which is the area that will be repainted at the
next paint operation. This method also causes a paint message to be sent to the Chart control.
Chart.IsSoftShadows Chart.IsSoftShadows
I n this Article
Gets or sets a flag that determines if a smooth gradient is applied when shadows are drawn.
[System.ComponentModel.Bindable(true)]
public bool IsSoftShadows { get; set; }
member this.IsSoftShadows : bool with get, set
Returns
Boolean Boolean
true if shadows are drawn using smoothing; otherwise, false . The default value is true .
Attributes BindableAttribute
Remarks
If the value of the ShadowOffset property for a series, data point, chart area or legend is nonzero, a shadow will be
applied using a color set by their ShadowColor property.
If the value of the IsSoftShadows property is true , a smooth gradient will be applied to the shadow.
Chart.Legends Chart.Legends
I n this Article
Gets or sets a LegendCollection that stores all Legend objects used by the Chart control.
public System.Windows.Forms.DataVisualization.Charting.LegendCollection Legends { get; }
member this.Legends : System.Windows.Forms.DataVisualization.Charting.LegendCollection
Returns
LegendCollection LegendCollection
A LegendCollection object that contains the Legend objects used by the chart.
Remarks
This collection property stores all Legend objects used by the Chart control.
Chart.LoadTemplate Chart.LoadTemplate
I n this Article
Overloads
LoadTemplate(String) LoadTemplate(String)
Loads a template with the specified filename from the disk.
LoadTemplate(Stream) LoadTemplate(Stream)
Loads a template into the Chart control from an image
stream.
LoadTemplate(String) LoadTemplate(String)
Loads a template with the specified filename from the disk.
public void LoadTemplate (string name);
member this.LoadTemplate : string -> unit
Parameters
name String String
The file name of the template to load. You must specify the full path of the template to be loaded from the disk.
Remarks
The name parameter must use a full path, for example, C:\MyPic.jpg. Note that you must also specify the file extension.
This method loads a template from disk that was saved using the Save method.
Make sure to set the IsTemplateMode property to true before saving the template with the Save method.
If a loaded template has two data series, the appearance properties of the series are applied sequentially to the chart. In
other words, the first template series appearance properties are assigned to the first series of the chart, the second
template series appearance properties are applied to the second series of the chart, then the first template series is
used again for the third series of the chart, and so on. The same holds true for chart areas, and any other collections
that have appearance properties.
Templates can be used to simulate custom palettes.
LoadTemplate(Stream) LoadTemplate(Stream)
Loads a template into the Chart control from an image stream.
public void LoadTemplate (System.IO.Stream stream);
member this.LoadTemplate : System.IO.Stream -> unit
Parameters
stream Stream Stream
The stream to load from.
Remarks
Use this method if you want to load a template from a stream, such as a memory stream, file stream, and so forth.
Make sure to set the IsTemplateMode property to true before saving the template with the Save method.
If a loaded template has two data series, the appearance properties of the series are applied sequentially to the chart. In
other words, the first template series appearance properties are assigned to the first series of the chart, the second
template series appearance properties are applied to the second series of the chart, then the first template series is
used again for the third series of the chart, and so on. The same holds true for chart areas, and any other collections
that have appearance properties.
Templates can be used to simulate custom palettes.
Chart.OnCursorChanged Chart.OnCursorChanged
I n this Article
Overrides the OnCursorChanged(EventArgs) method and raises the CursorPositionChanging and
CursorPositionChanged events.
Parameters
e EventArgs EventArgs
An EventArgs that contains the event data.
Chart.OnCustomize Chart.OnCustomize
I n this Article
Raises the Customize event.
protected virtual void OnCustomize ();
abstract member OnCustomize : unit -> unit
override this.OnCustomize : unit -> unit
Chart.OnCustomizeLegend Chart.OnCustomizeLegend
I n this Article
Raises the CustomizeLegend event.
protected virtual void OnCustomizeLegend
(System.Windows.Forms.DataVisualization.Charting.LegendItemsCollection legendItems, string
legendName);
abstract member OnCustomizeLegend :
System.Windows.Forms.DataVisualization.Charting.LegendItemsCollection * string -> unit
override this.OnCustomizeLegend :
System.Windows.Forms.DataVisualization.Charting.LegendItemsCollection * string -> unit
Parameters
legendItems LegendItemsCollection LegendItemsCollection
A LegendItemsCollection object.
legendName String String
The name of the legend.
Chart.OnDoubleClick Chart.OnDoubleClick
I n this Article
Overrides the OnDoubleClick(EventArgs) method.
protected override void OnDoubleClick (EventArgs e);
override this.OnDoubleClick : EventArgs -> unit
Parameters
e EventArgs EventArgs
An EventArgs object that contains the event arguments.
Chart.OnFormatNumber Chart.OnFormatNumber
I n this Article
Raises the FormatNumber event.
protected virtual void OnFormatNumber
(System.Windows.Forms.DataVisualization.Charting.FormatNumberEventArgs e);
abstract member OnFormatNumber :
System.Windows.Forms.DataVisualization.Charting.FormatNumberEventArgs -> unit
override this.OnFormatNumber : System.Windows.Forms.DataVisualization.Charting.FormatNumberEventArgs
-> unit
Parameters
e FormatNumberEventArgs FormatNumberEventArgs
A FormatNumberEventArgs object that contains the event arguments.
Chart.OnLocationChanged Chart.OnLocationChanged
I n this Article
Overrides the OnLocationChanged(EventArgs) method.
protected override void OnLocationChanged (EventArgs e);
override this.OnLocationChanged : EventArgs -> unit
Parameters
e EventArgs EventArgs
An EventArgs object that contains the event arguments.
Chart.OnMouseDown Chart.OnMouseDown
I n this Article
Overrides the OnMouseDown(MouseEventArgs) method.
protected override void OnMouseDown (System.Windows.Forms.MouseEventArgs e);
override this.OnMouseDown : System.Windows.Forms.MouseEventArgs -> unit
Parameters
e MouseEventArgs MouseEventArgs
A MouseEventArgs object that contains the event arguments.
Chart.OnMouseMove Chart.OnMouseMove
I n this Article
Overrides the OnMouseMove(MouseEventArgs) method.
protected override void OnMouseMove (System.Windows.Forms.MouseEventArgs e);
override this.OnMouseMove : System.Windows.Forms.MouseEventArgs -> unit
Parameters
e MouseEventArgs MouseEventArgs
A MouseEventArgs object that contains the event arguments.
Chart.OnMouseUp Chart.OnMouseUp
I n this Article
Overrides the OnMouseUp(MouseEventArgs) method.
protected override void OnMouseUp (System.Windows.Forms.MouseEventArgs e);
override this.OnMouseUp : System.Windows.Forms.MouseEventArgs -> unit
Parameters
e MouseEventArgs MouseEventArgs
A MouseEventArgs object that contains the event arguments.
Chart.OnPaint Chart.OnPaint
I n this Article
Overrides the OnPaint(PaintEventArgs) method.
protected override void OnPaint (System.Windows.Forms.PaintEventArgs e);
override this.OnPaint : System.Windows.Forms.PaintEventArgs -> unit
Parameters
e PaintEventArgs PaintEventArgs
A PaintEventArgs object that contains the event arguments.
Chart.OnPaintBackground Chart.OnPaintBackground
I n this Article
Overrides the OnPaintBackground(PaintEventArgs) method.
protected override void OnPaintBackground (System.Windows.Forms.PaintEventArgs pevent);
override this.OnPaintBackground : System.Windows.Forms.PaintEventArgs -> unit
Parameters
pevent PaintEventArgs PaintEventArgs
A PaintEventArgs object that contains the event arguments.
Chart.OnPostPaint Chart.OnPostPaint
I n this Article
Raises the PostPaint event.
protected virtual void OnPostPaint
(System.Windows.Forms.DataVisualization.Charting.ChartPaintEventArgs e);
abstract member OnPostPaint : System.Windows.Forms.DataVisualization.Charting.ChartPaintEventArgs ->
unit
override this.OnPostPaint : System.Windows.Forms.DataVisualization.Charting.ChartPaintEventArgs ->
unit
Parameters
e ChartPaintEventArgs ChartPaintEventArgs
A ChartPaintEventArgs object that contains the event arguments.
Chart.OnPrePaint Chart.OnPrePaint
I n this Article
Raises the PrePaint event.
protected virtual void OnPrePaint
(System.Windows.Forms.DataVisualization.Charting.ChartPaintEventArgs e);
abstract member OnPrePaint : System.Windows.Forms.DataVisualization.Charting.ChartPaintEventArgs ->
unit
override this.OnPrePaint : System.Windows.Forms.DataVisualization.Charting.ChartPaintEventArgs ->
unit
Parameters
e ChartPaintEventArgs ChartPaintEventArgs
A ChartPaintEventArgs object that contains the event arguments.
Chart.OnResize Chart.OnResize
I n this Article
Overrides the OnResize(EventArgs) method.
protected override void OnResize (EventArgs e);
override this.OnResize : EventArgs -> unit
Parameters
e EventArgs EventArgs
An EventArgs object that contains the event arguments.
Chart.OnRightToLeftChanged Chart.OnRightToLeft
Changed
I n this Article
Overrides the OnRightToLeftChanged(EventArgs) method.
Parameters
e EventArgs EventArgs
An EventArgs object that contains the event arguments.
Chart.OnSystemColorsChanged Chart.OnSystemColors
Changed
I n this Article
Overrides the OnSystemColorsChanged(EventArgs) method.
Parameters
e EventArgs EventArgs
An EventArgs that contains the event data.
Chart.Palette Chart.Palette
I n this Article
Gets or sets the palette for the Chart control.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartColorPalette Palette { get; set; }
member this.Palette : System.Windows.Forms.DataVisualization.Charting.ChartColorPalette with get,
set
Returns
ChartColorPalette ChartColorPalette
A ChartColorPalette enumeration value that determines the palette to be used.
Attributes BindableAttribute
Remarks
A palette is used to automatically assign colors to data elements if both of the following conditions have been met:
the data points themselves do not have colors assigned to them.
the data series 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 object's
palette or the palette of an associated series, if one is specified.
Note
If the Palette property for both the Chart and Series objects is set to ChartColorPalette, and no color is assigned to
the relevant data series or data points, the data points will not be drawn, and will be displayed as "empty" areas.
Chart.PaletteCustomColors Chart.PaletteCustomColors
I n this Article
Gets or sets an array of custom palette colors.
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.ColorArr
ayConverter))]
public System.Drawing.Color[] PaletteCustomColors { get; set; }
member this.PaletteCustomColors : System.Drawing.Color[] with get, set
Returns
Color[]
An array of Color objects that represent the set of colors used for series on the chart.
Attributes TypeConverterAttribute
Remarks
If you need more than 16 colors or you want to apply your own colors to the chart, you must define a custom palette. A
custom palette let you add your own colors in the order you want them to appear on the chart. This type of palette is
especially helpful if the number of series in your chart is unknown at design time.
This property has no effect when the Palette property is not set to
ChartColorPalette.
Chart.PostPaint Chart.PostPaint
I n this Article
Occurs when the chart element is painted.
public event EventHandler<System.Windows.Forms.DataVisualization.Charting.ChartPaintEventArgs>
PostPaint;
member this.PostPaint :
EventHandler<System.Windows.Forms.DataVisualization.Charting.ChartPaintEventArgs>
Chart.PrePaint Chart.PrePaint
I n this Article
Occurs when the chart element background is painted.
public event EventHandler<System.Windows.Forms.DataVisualization.Charting.ChartPaintEventArgs>
PrePaint;
member this.PrePaint :
EventHandler<System.Windows.Forms.DataVisualization.Charting.ChartPaintEventArgs>
Chart.Printing Chart.Printing
I n this Article
Gets a read-only PrintingManager object used for printing a chart.
[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
public System.Windows.Forms.DataVisualization.Charting.PrintingManager Printing { get; }
member this.Printing : System.Windows.Forms.DataVisualization.Charting.PrintingManager
Returns
PrintingManager PrintingManager
A PrintingManager object used for printing a chart.
Attributes BindableAttribute BrowsableAttribute
Remarks
When a chart is printed, all chart elements except scrollbars will be printed.
The PrintingManager object contains the following methods, which are used for basic printing operations:
PageSetup: Displays a Page Setup dialog, which allows the end-user to select paper size, paper source, page
orientation, and so forth.
PrintPreview: Displays a Print Preview dialog, which allows the end-user to zoom, print the chart, and so forth.
Print: Prints the Chart; the Print dialog can optionally be displayed prior to printing.
Chart.Refresh Chart.Refresh
I n this Article
Forces the control to invalidate its client area and immediately redraw itself and any child controls.
public override void Refresh ();
override this.Refresh : unit -> unit
Chart.RenderingDpiX Chart.RenderingDpiX
I n this Article
Gets or sets the horizontal resolution of the Chart renderer.
[System.ComponentModel.Browsable(false)]
public double RenderingDpiX { get; set; }
member this.RenderingDpiX : double with get, set
Returns
Double Double
A double value that represents the horizontal resolution of the chart renderer.
Attributes BrowsableAttribute
Chart.RenderingDpiY Chart.RenderingDpiY
I n this Article
Gets or sets the vertical resolution of the Chart renderer.
[System.ComponentModel.Browsable(false)]
public double RenderingDpiY { get; set; }
member this.RenderingDpiY : double with get, set
Returns
Double Double
A double value that represents the vertical resolution of the chart renderer.
Attributes BrowsableAttribute
Chart.ResetAutoValues Chart.ResetAutoValues
I n this Article
Resets automatically calculated chart property values to "Auto".
public void ResetAutoValues ();
member this.ResetAutoValues : unit -> unit
Remarks
Several chart properties can be set to "Auto" - for example, Minimum; these properties are calculated prior to the chart
being rendered. "Auto" is usually represented as a NaN value.
Call this method to reset these properties from their calculated value to "Auto" (NaN ).
Chart.SaveImage Chart.SaveImage
I n this Article
Overloads
SaveImage(String, ChartImageFormat) SaveImage(String,
ChartImageFormat) Saves the chart image to the specified file.
Parameters
imageFileName String String
The name of the file in which image is saved to.
format ChartImageFormat ChartImageFormat
The chart image format.
Parameters
imageFileName String String
The name of the file in which image is saved to.
format ImageFormat ImageFormat
The image format.
Parameters
imageStream Stream Stream
The stream in which the image is saved to.
format ImageFormat ImageFormat
The image format.
Parameters
imageStream Stream Stream
The stream in which the image is saved to.
format ChartImageFormat ChartImageFormat
The chart image format.
Chart.SelectionRangeChanged Chart.SelectionRange
Changed
I n this Article
Occurs when the selection start position or end position is changed.
Returns
ChartSerializer ChartSerializer
A ChartSerializer object that is used for chart serialization.
Attributes BrowsableAttribute
Remarks
Use this property at either design time or run time to serialize the chart.
For a detailed discussion of the ChartSerializer class, refer to the class overview.
Chart.Series Chart.Series
I n this Article
Gets a SeriesCollection object, which contains Series objects.
public System.Windows.Forms.DataVisualization.Charting.SeriesCollection Series { get; }
member this.Series : System.Windows.Forms.DataVisualization.Charting.SeriesCollection
Returns
SeriesCollection SeriesCollection
A SeriesCollection object which contains Series objects.
Remarks
This collection property allows you to access the SeriesCollection class, which stores Series objects and also provides
methods and properties used to manipulate this collection.
Series objects store DataPoint objects, as well as data attributes.
Chart.Size Chart.Size
I n this Article
Gets or sets the size of the Chart control.
[System.ComponentModel.Bindable(true)]
public System.Drawing.Size Size { get; set; }
member this.Size : System.Drawing.Size with get, set
Returns
Size Size
A Size object that represents the size of the control.
Attributes BindableAttribute
Chart.SuppressExceptions Chart.SuppressExceptions
I n this Article
Gets or sets a flag that determines whether non-critical exceptions should be suppressed.
public bool SuppressExceptions { get; set; }
member this.SuppressExceptions : bool with get, set
Returns
Boolean Boolean
true if non-critical exceptions should be suppressed; otherwise, false . The default value is false .
Remarks
If you set this property to true , non-critical exceptions will be suppressed.
When the Chart control cannot properly plot the chart using the data and other settings provided, an exception will be
thrown. Although displaying exceptions is useful during application testing, they should not be shown when the
application is released.
Note
Setting this property to true may hide serious issues in the user application source code. This setting could also cause
a chart image to be generated that might misrepresent your data. It is highly recommended that this mode be only
used in Release builds.
Chart.TextAntiAliasingQuality Chart.TextAntiAliasing
Quality
I n this Article
Gets or sets the TextAntiAliasingQuality type to use when applying anti-aliasing to text.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.TextAntiAliasingQuality
TextAntiAliasingQuality { get; set; }
member this.TextAntiAliasingQuality :
System.Windows.Forms.DataVisualization.Charting.TextAntiAliasingQuality with get, set
Returns
TextAntiAliasingQuality TextAntiAliasingQuality
A TextAntiAliasingQuality enumeration value used to apply anti-aliasing to text. The default value is High.
Attributes BindableAttribute
Remarks
If the anti-aliasing is applied to text, the Chart control will use this property to determine the type of textual anti-
aliasing to apply.
Chart.Titles Chart.Titles
I n this Article
Gets or sets a TitleCollection object that is used to store all Title objects used by the Chart control.
public System.Windows.Forms.DataVisualization.Charting.TitleCollection Titles { get; }
member this.Titles : System.Windows.Forms.DataVisualization.Charting.TitleCollection
Returns
TitleCollection TitleCollection
A TitleCollection object that is used to store all Title objects used by the chart control.
Remarks
The Titles property stores all Title objects used by the Chart control.
Chart.UpdateAnnotations Chart.UpdateAnnotations
I n this Article
Updates the annotations in the Chart control.
public void UpdateAnnotations ();
member this.UpdateAnnotations : unit -> unit
Chart.UpdateCursor Chart.UpdateCursor
I n this Article
Updates the cursor in the Chart control.
public void UpdateCursor ();
member this.UpdateCursor : unit -> unit
ChartArea ChartArea Class
Represents a chart area on the chart image.
D eclaration
public class ChartArea : System.Windows.Forms.DataVisualization.Charting.ChartNamedElement
type ChartArea = class
inherit ChartNamedElement
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
Remarks
Within any given chart, the inner plot position is the rectangular area, inside the x and y-axis lines, where the data
points are drawn. The plot position is the rectangular area that encompasses the inner plot position, the tick marks, and
the axis labels. The chart area is the rectangular area that encompasses the plot position, the tick marks, the axis labels
and the axis titles on the chart.
A chart area is represented by a ChartArea class; ChartArea objects are stored in the ChartAreaCollection class.
The number of chart series that can be plotted in a chart area is unlimited.
A ChartArea object:
Uses one distinct inner plotting area.
Is used to plot one or more chart series.
Has primary and secondary x and y-axes, except for pie and doughnut chart types.
When you use Shape chart types, which includes pie, doughnut, funnel, pyramid, polar, and radar charts, the inner
plotting position defines the size of the chart type shape. For example, when you increase the value of the
InnerPlotPosition property on a pie chart, you will increase the radius of the pie shape.
For all other chart types, each chart area has two sets of X- and Y -axes, primary and secondary. To access properties
related to these axes, use the AxisX, AxisX2, AxisY and AxisY2 properties. If you need to set a property that affects all
axes on the chart, use the Axes property.
One or more series are associated with a chart area. The series has a ChartArea property that determines the chart
area that each series belongs to. By default, the series is connected to the default chart area. To disable the display of a
series, set the ChartArea property of that series to a zero-length string.
If another chart area is added to the chart, you can associate any series with the new chart area. In all Shape chart
types, as well as bar and stacked bar chart types, each series must be plotted in a separate chart area. In all other chart
types, multiple series can be combined in the same chart area.
A 3D chart is displayed on a chart area-by-chart area basis. You can use the Area3DStyle property to enable and
customize your chart in 3D.
The chart area minimum and maximum will not be automatically recalculated if you add new data, so the chart will not
automatically change axis sizes. You can require the chart area to recalculate these values by using the
RecalculateAxesScale method.
To align multiple chart areas vertically, set the AlignmentOrientation property. To align multiple chart areas
horizontally, you must first position the chart areas using the Position property, and then set the AlignmentOrientation
property to Horizontal.
To suppress the display of a series, set the Series property of that series to a zero-length string.
Constructors
ChartArea()
ChartArea()
ChartArea(String)
ChartArea(String)
Initializes a new instance of the ChartArea class with the specified chart area name.
Properties
AlignmentOrientation
AlignmentOrientation
AlignmentStyle
AlignmentStyle
AlignWithChartArea
AlignWithChartArea
Gets or sets the name of the ChartArea object to which this chart area should be aligned.
Area3DStyle
Area3DStyle
Gets or sets a ChartArea3DStyle object, which is used to implement three-dimensional (3D ) for all series in a chart
area.
Axes
Axes
Gets or sets an array that represents all axes for a chart area.
AxisX
AxisX
AxisX2
AxisX2
AxisY
AxisY
AxisY2
AxisY2
BackColor
BackColor
BackGradientStyle
BackGradientStyle
Gets or sets the orientation for the background gradient of a chart area, and also determines whether or not a
gradient is used.
BackHatchStyle
BackHatchStyle
BackImage
BackImage
BackImageAlignment
BackImageAlignment
Gets or sets the color of a ChartArea object background image that will be drawn as transparent.
BackImageWrapMode
BackImageWrapMode
Gets or sets the drawing mode for the background image of a ChartArea object.
BackSecondaryColor
BackSecondaryColor
Gets or sets the secondary color for the background of a ChartArea object.
BorderColor
BorderColor
BorderDashStyle
BorderDashStyle
BorderWidth
BorderWidth
CursorX
CursorX
Gets or sets a Cursor object that is used for cursors and selected ranges along the X-axis.
CursorY
CursorY
Gets or sets a Cursor object that is used for cursors and selected ranges along the Y -axis.
InnerPlotPosition
InnerPlotPosition
Gets or sets an ElementPosition object, which defines the inner plot position of a chart area object.
IsSameFontSizeForAllAxes
IsSameFontSizeForAllAxes
Gets or sets a flag that determines if the labels of the relevant chart area axes are of equal size.
Name
Name
Position
Position
Gets or sets an ElementPosition object that defines the position of a ChartArea object within the Chart.
ShadowColor
ShadowColor
ShadowOffset
ShadowOffset
Visible
Visible
Methods
Dispose(Boolean)
Dispose(Boolean)
GetSeriesDepth(Series)
GetSeriesDepth(Series)
GetSeriesZPosition(Series)
GetSeriesZPosition(Series)
Recalculates the properties of the chart area after changes have been made to the chart in the Customize event.
TransformPoints(Point3D[])
TransformPoints(Point3D[])
Applies 3D transformations to an array of 3D points, which must be done before GDI+ drawing methods can be
called.
ChartArea.AlignmentOrientation ChartArea.Alignment
Orientation
I n this Article
Gets or sets the alignment orientation of a chart area.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.AreaAlignmentOrientations
AlignmentOrientation { get; set; }
member this.AlignmentOrientation :
System.Windows.Forms.DataVisualization.Charting.AreaAlignmentOrientations with get, set
Returns
AreaAlignmentOrientations AreaAlignmentOrientations
An AreaAlignmentOrientations enumeration value that specifies the alignment orientation of a chart area.
Attributes BindableAttribute
Remarks
Through the use of the AlignWithChartArea, AlignmentOrientation and AlignmentStyle properties, it is possible to
align or synchronize two or more chart areas horizontally, vertically or both.
First, set the AlignWithChartArea property to the name of a ChartArea object. This chart area will then be aligned,
based on the AlignmentStyle setting, which defines the alignment to use, and the AlignmentOrientation setting, which
defines the elements of the chart area that should be used to set the alignment.
If the AlignWithChartArea property is not set, the chart area will not be aligned, regardless of the AlignmentStyle and
AlignmentOrientation settings.
ChartArea.AlignmentStyle ChartArea.AlignmentStyle
I n this Article
Gets or sets the alignment style of the ChartArea.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.AreaAlignmentStyles AlignmentStyle { get;
set; }
member this.AlignmentStyle : System.Windows.Forms.DataVisualization.Charting.AreaAlignmentStyles
with get, set
Returns
AreaAlignmentStyles AreaAlignmentStyles
An AreaAlignmentStyles enumeration value that can represent either a single value or the bitwise-OR of multiple
values that define the alignment to use.
Attributes BindableAttribute
Remarks
Use the AlignmentStyle property to align two or more chart areas horizontally, vertically or both. The alignment type is
one of the following values, or a bitwise OR combination of the values below.
AxesView Chart areas are aligned using the View of the specified
ChartArea.
Position Chart areas are aligned with the Position of the chart area
specified.
InnerPlotPosition Chart areas are aligned with the InnerPlotPosition of the chart
area specified.
If the AlignWithChartArea value is not set, the AlignmentStyle property will have no effect.
ChartArea.AlignWithChartArea ChartArea.AlignWith
ChartArea
I n this Article
Gets or sets the name of the ChartArea object to which this chart area should be aligned.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.LegendAr
eaNameConverter))]
public string AlignWithChartArea { get; set; }
member this.AlignWithChartArea : string with get, set
Returns
String String
A string value that represents the name of a ChartArea object to which this chart area should be aligned. The default
is the empty string.
Attributes BindableAttribute TypeConverterAttribute
Remarks
Through the use of the AlignWithChartArea, AlignmentOrientation and AlignmentStyle properties, it is possible to
align or synchronize two or more chart areas horizontally, vertically or both.
First, set the AlignWithChartArea property to the name of a ChartArea object. This chart area will then be aligned,
based on the AlignmentStyle setting, which defines the alignment to use, and the AlignmentOrientation setting, which
defines the elements of the chart area that should be used to set the alignment.
If the AlignWithChartArea property is not set, the chart area will not be aligned, regardless of the AlignmentStyle and
AlignmentOrientation settings.
ChartArea.Area3DStyle ChartArea.Area3DStyle
I n this Article
Gets or sets a ChartArea3DStyle object, which is used to implement three-dimensional (3D ) for all series in a chart
area.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.NoNameEx
pandableObjectConverter))]
public System.Windows.Forms.DataVisualization.Charting.ChartArea3DStyle Area3DStyle { get; set; }
member this.Area3DStyle : System.Windows.Forms.DataVisualization.Charting.ChartArea3DStyle with get,
set
Returns
ChartArea3DStyle ChartArea3DStyle
A ChartArea3DStyle object that implements 3D for all series plotted in a chart area.
Attributes BindableAttribute TypeConverterAttribute
Remarks
To enable or disable 3D for a chart area, set the Enable3D property.
When the chart is drawn in 3D, scale breaks are not supported on the axis.
ChartArea.Axes ChartArea.Axes
I n this Article
Gets or sets an array that represents all axes for a chart area.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.AxesArra
yConverter))]
public System.Windows.Forms.DataVisualization.Charting.Axis[] Axes { get; set; }
member this.Axes : System.Windows.Forms.DataVisualization.Charting.Axis[] with get, set
Returns
Axis[]
An array of Axis objects that represents all axes used by a chart area.
Attributes BindableAttribute TypeConverterAttribute
Remarks
The main purpose of this property is to provide access to the properties of the X, Y, X2 and Y2 axes at design time.
At run time, the axes for a chart area should be accessed using the individual axis properties, such as AxisX, AxisX2, and
so forth.
If you decide to use this property at run time - for example, in an event - you can access an item in this array by
specifying an AxisName enumeration member as the identifier.
ChartArea.AxisX ChartArea.AxisX
I n this Article
Gets or sets an Axis object that represents the primary X-axis.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.NoNameEx
pandableObjectConverter))]
public System.Windows.Forms.DataVisualization.Charting.Axis AxisX { get; set; }
member this.AxisX : System.Windows.Forms.DataVisualization.Charting.Axis with get, set
Returns
Axis Axis
An Axis object that represents the primary X-axis.
Attributes BindableAttribute BrowsableAttribute TypeConverterAttribute
Remarks
Use this property to manipulate the primary X-axis in the chart area.
ChartArea.AxisX2 ChartArea.AxisX2
I n this Article
Gets or sets an Axis object that represents the secondary X-axis.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.NoNameEx
pandableObjectConverter))]
public System.Windows.Forms.DataVisualization.Charting.Axis AxisX2 { get; set; }
member this.AxisX2 : System.Windows.Forms.DataVisualization.Charting.Axis with get, set
Returns
Axis Axis
An Axis object that represents the secondary X-axis.
Attributes BindableAttribute BrowsableAttribute TypeConverterAttribute
Remarks
Use this property to manipulate the secondary X-axis in the chart area.
ChartArea.AxisY ChartArea.AxisY
I n this Article
Gets or sets an Axis object that represents the primary Y -axis.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.NoNameEx
pandableObjectConverter))]
public System.Windows.Forms.DataVisualization.Charting.Axis AxisY { get; set; }
member this.AxisY : System.Windows.Forms.DataVisualization.Charting.Axis with get, set
Returns
Axis Axis
An Axis object that represents the primary Y -axis.
Attributes BindableAttribute BrowsableAttribute TypeConverterAttribute
Remarks
Use this property to manipulate the primary Y -axis in the chart area.
ChartArea.AxisY2 ChartArea.AxisY2
I n this Article
Gets or sets an Axis object that represents the secondary Y -axis.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.NoNameEx
pandableObjectConverter))]
public System.Windows.Forms.DataVisualization.Charting.Axis AxisY2 { get; set; }
member this.AxisY2 : System.Windows.Forms.DataVisualization.Charting.Axis with get, set
Returns
Axis Axis
An Axis object that represents the secondary Y -axis.
Attributes BindableAttribute BrowsableAttribute TypeConverterAttribute
Remarks
Use this property to manipulate the secondary Y -axis in the chart area.
ChartArea.BackColor ChartArea.BackColor
I n this Article
Gets or sets the background color of a ChartArea object.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BackColor { get; set; }
member this.BackColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that specifies the background color of a chart area. The default color is White.
Attributes BindableAttribute TypeConverterAttribute
Remarks
You can set this property to any valid ARGB (alpha, red, green, blue) value.
The BackColor value will be the first color used if you have specified gradient colors for the background.
The alpha value controls the opacity of a color. If you set this color to "transparent" - that is, if you use an alpha value of
0 - no color will be assigned to the background of the chart area. As a result, the background will be transparent.
ChartArea.BackGradientStyle ChartArea.BackGradient
Style
I n this Article
Gets or sets the orientation for the background gradient of a chart area, and also determines whether or not a gradient
is used.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.GradientStyle BackGradientStyle { get; set; }
member this.BackGradientStyle : System.Windows.Forms.DataVisualization.Charting.GradientStyle with
get, set
Returns
GradientStyle GradientStyle
A GradientStyle enumeration that specifies the orientation for the background gradient of a chart area and determines
whether a gradient is used. The default value is None.
Attributes BindableAttribute
Remarks
Use the BackGradientStyle property to determine whether a chart area will display a gradient, and to determine the
orientation of the gradient if one is used.
For a listing of available patterns, refer to the GradientStyle enumeration.
To use gradient colors:
Set the primary color of the chart area background with the BackColor property.
Set the secondary color of the chart area background with the BackSecondaryColor property.
Set this BackGradientStyle property to the desired gradient style.
ChartArea.BackHatchStyle ChartArea.BackHatchStyle
I n this Article
Gets or sets the hatching style of a ChartArea object.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle BackHatchStyle { get; set; }
member this.BackHatchStyle : System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle with
get, set
Returns
ChartHatchStyle ChartHatchStyle
A ChartHatchStyle enumeration that specifies the hatching style of a chart area. The default value is None.
Attributes BindableAttribute
Remarks
The ChartHatchStyle enumeration specifies the hatch pattern used by a brush of type HatchBrush. The hatch pattern
consists of a solid background color and lines drawn over the background.
For a listing of available hatching styles, refer to the ChartHatchStyle enumeration.
Note
Returns
String String
A string value that represents the URL of an image file, used as the background image of a chart area. The default is
an empty string.
Attributes BindableAttribute
Remarks
This property defines a path to a background image for a ChartArea, and can be an absolute or relative URL.
To position the image, use the BackImageAlignment and BackImageWrapMode properties.
You can also specify one of the colors displayed by the image as "transparent", by setting the
BackImageTransparentColor property.
An image be any valid graphics file supported by .NET Framework, including icons.
Background images take precedence over other background properties such as gradient color.
ChartArea.BackImageAlignment ChartArea.BackImage
Alignment
I n this Article
Gets or sets the alignment of a ChartArea background image.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartImageAlignmentStyle BackImageAlignment {
get; set; }
member this.BackImageAlignment :
System.Windows.Forms.DataVisualization.Charting.ChartImageAlignmentStyle with get, set
Returns
ChartImageAlignmentStyle ChartImageAlignmentStyle
A ChartImageAlignmentStyle enumeration value that specifies the alignment of the background image of the chart
area. The default value is TopLeft.
Attributes BindableAttribute
Remarks
This property determines the alignment of the background image for the chart area, and is only applied when the
ChartImageWrapMode property is set to Unscaled.
For more information about the available alignments, see the ChartImageAlignmentStyle enumeration topic.
ChartArea.BackImageTransparentColor ChartArea.Back
ImageTransparentColor
I n this Article
Gets or sets the color of a ChartArea object background image that will be drawn as transparent.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BackImageTransparentColor { get; set; }
member this.BackImageTransparentColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that represents the color of a background image that will be drawn as transparent. The default value is
Empty.
Attributes BindableAttribute TypeConverterAttribute
ChartArea.BackImageWrapMode ChartArea.BackImage
WrapMode
I n this Article
Gets or sets the drawing mode for the background image of a ChartArea object.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartImageWrapMode BackImageWrapMode { get;
set; }
member this.BackImageWrapMode : System.Windows.Forms.DataVisualization.Charting.ChartImageWrapMode
with get, set
Returns
ChartImageWrapMode ChartImageWrapMode
A ChartImageWrapMode enumeration value that specifies the drawing mode for the background image of a chart
area. The default value is Tile.
Attributes BindableAttribute
Remarks
The BackImageWrapMode property determines how the image is displayed; the image can be tiled, scaled, and so
forth.
If an image is scaled, it will be stretched to fit within the bounds of the chart area. If the image is tiled, it is repeatedly
drawn, starting from the top-left corner of the chart area.
For more information about the available wrapping modes, see the ChartImageWrapMode enumeration topic.
If the BackImageWrapMode property is set to Unscaled, the location where the image is drawn is determined by the
BackImageAlignment property setting.
ChartArea.BackSecondaryColor ChartArea.Back
SecondaryColor
I n this Article
Gets or sets the secondary color for the background of a ChartArea object.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BackSecondaryColor { get; set; }
member this.BackSecondaryColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that specifies the secondary color for the background of a chart area. The default value is Empty.
Attributes BindableAttribute TypeConverterAttribute
Remarks
This BackSecondaryColor property is one of several related properties that determine the secondary background color
of Chart objects, and is used when gradient colors are being applied.
You can set BackSecondaryColor to any valid ARGB (alpha, red, green, blue) value.
If hatching is used, the BackSecondaryColor property determines the color of the hatching lines for the chart area.
To use gradient colors for the background of a chart area:
Set the primary color with the BackColor property.
Set the secondary color with the BackSecondaryColor property.
Set the BackGradientStyle property to the desired gradient style.
ChartArea.BorderColor ChartArea.BorderColor
I n this Article
Gets or sets the border color of a ChartArea object.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BorderColor { get; set; }
member this.BorderColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that specifies the border color of a chart area. The default color is Empty.
Attributes BindableAttribute TypeConverterAttribute
Remarks
You can set the BorderColor property to any valid ARGB (alpha, red, green, blue) value.
Note
For pie and doughnut charts, this property determines the color of radial and horizontal lines if data labels are drawn
outside the pie or doughnut - that is, if the LabelStyle custom property is set to "Outside".
This property also determines the marker lines for 3D charts if the ShowMarkerLines custom property is set to true .
ChartArea.BorderDashStyle ChartArea.BorderDashStyle
I n this Article
Gets or sets the border style of a ChartArea object.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartDashStyle BorderDashStyle { get; set; }
member this.BorderDashStyle : System.Windows.Forms.DataVisualization.Charting.ChartDashStyle with
get, set
Returns
ChartDashStyle ChartDashStyle
A ChartDashStyle enumeration value that determines the border style of the chart area.
Attributes BindableAttribute
Remarks
The BorderDashStyle property determines the line style to use for a border. The line can be solid, dotted, and so forth.
For other border styles, see the ChartDashStyle enumeration topic.
ChartArea.BorderWidth ChartArea.BorderWidth
I n this Article
Gets or sets the border width of a ChartArea object.
[System.ComponentModel.Bindable(true)]
public int BorderWidth { get; set; }
member this.BorderWidth : int with get, set
Returns
Int32 Int32
An integer value that determines the border width, in pixels, of the chart area.
Attributes BindableAttribute
Remarks
Note that the BorderWidth property can also set the width of lines for line charts, custom legend items displayed with
a line style, and so forth.
ChartArea ChartArea
I n this Article
Overloads
ChartArea()
Initializes a new instance of the ChartArea class.
ChartArea(String) ChartArea(String)
Initializes a new instance of the ChartArea class with the
specified chart area name.
ChartArea()
Initializes a new instance of the ChartArea class.
public ChartArea ();
Remarks
Use this constructor to create and initialize a new instance of the ChartArea class.
Note
It is highly recommended that you use one of the Add or Insert methods of the ChartAreas collection property to
add a chart area at run time.
ChartArea(String) ChartArea(String)
Initializes a new instance of the ChartArea class with the specified chart area name.
public ChartArea (string name);
new System.Windows.Forms.DataVisualization.Charting.ChartArea : string ->
System.Windows.Forms.DataVisualization.Charting.ChartArea
Parameters
name String String
The name for the new ChartArea object.
ChartArea.CursorX ChartArea.CursorX
I n this Article
Gets or sets a Cursor object that is used for cursors and selected ranges along the X-axis.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.NoNameEx
pandableObjectConverter))]
public System.Windows.Forms.DataVisualization.Charting.Cursor CursorX { get; set; }
member this.CursorX : System.Windows.Forms.DataVisualization.Charting.Cursor with get, set
Returns
Cursor Cursor
A Cursor object used for cursors and selected ranges along the X-axis.
Attributes BindableAttribute TypeConverterAttribute
Remarks
This Cursor object is used for the X-axis cursor and its selected ranges. For all charts except bar chart types, the X-axis
cursor represents the vertical cursor. For bar chart types, the X-axis cursor represents the horizontal cursor.
Refer to the Cursor class documentation for a description of its members, as well as sample source code.
ChartArea.CursorY ChartArea.CursorY
I n this Article
Gets or sets a Cursor object that is used for cursors and selected ranges along the Y -axis.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.NoNameEx
pandableObjectConverter))]
public System.Windows.Forms.DataVisualization.Charting.Cursor CursorY { get; set; }
member this.CursorY : System.Windows.Forms.DataVisualization.Charting.Cursor with get, set
Returns
Cursor Cursor
A Cursor object used for cursors and selected ranges along the Y -axis.
Attributes BindableAttribute TypeConverterAttribute
Remarks
This Cursor object is used for the Y -axis cursor and its selected ranges. For all charts except bar chart types, the Y -axis
cursor represents the horizontal cursor. For bar chart types, the Y -axis cursor represents the vertical cursor.
Refer to the Cursor class documentation for a description of its members, as well as sample source code.
ChartArea.Dispose ChartArea.Dispose
I n this Article
Releases unmanaged and, optionally, managed resources.
protected override void Dispose (bool disposing);
override this.Dispose : bool -> unit
Parameters
disposing Boolean Boolean
true to release both unmanaged and managed resources; false to release only unmanaged resources.
ChartArea.GetSeriesDepth ChartArea.GetSeriesDepth
I n this Article
Returns the depth of a Series in a chart area.
public float GetSeriesDepth (System.Windows.Forms.DataVisualization.Charting.Series series);
member this.GetSeriesDepth : System.Windows.Forms.DataVisualization.Charting.Series -> single
Parameters
series Series Series
The Series for which the depth is retrieved.
Returns
Single Single
A float value that represents the depth of the specified Series, which is measured as a percentage of the chart area's
depth.
Remarks
Call this method to get the depth of a specified series. The returned value is measured as a percentage of the chart
area's depth, which is the same unit of measurement used in the Z property.
All series have a depth, regardless of their chart type. For example, even point and bubble series have a depth, even
though the entire depth is not used to draw the points or bubbles.
The depth of a series can be used to determine a Z value for a point that is used in a custom drawing routine.
Note
Any points used in custom 3D drawing must be transformed from relative 3D coordinates to relative 2D coordinates
using the TransformPoints method.
To get relative X and Y -values from an axis, use the ValueToPosition method for both the X and Y axes.
ChartArea.GetSeriesZPosition ChartArea.GetSeries
ZPosition
I n this Article
Returns the Z position of a series, which is useful for custom drawing.
Parameters
series Series Series
The Series for which the Z position is retrieved.
Returns
Single Single
A float value that represents the Z position of the specified series, which is measured as a percentage of the depth of
a chart area.
Remarks
Call this method to get the Z position of a series. The Z position is measured from the back wall of the chart area to the
center of a data series, and is represented as a percentage of the chart area's depth. For example, a series that is drawn
halfway along the Z -axis has a Z position of 50.
The Z position of a series is normally used for a custom drawing routine.
Note
Any points used in custom 3D drawing must be transformed from relative 3D coordinates to relative 2D coordinates
using the TransformPoints method.
To get relative X and Y -values from an axis, use the ValueToPosition method for both the X and Y axes.
ChartArea.InnerPlotPosition ChartArea.InnerPlotPosition
I n this Article
Gets or sets an ElementPosition object, which defines the inner plot position of a chart area object.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.ElementP
ositionConverter))]
public System.Windows.Forms.DataVisualization.Charting.ElementPosition InnerPlotPosition { get; set;
}
member this.InnerPlotPosition : System.Windows.Forms.DataVisualization.Charting.ElementPosition with
get, set
Returns
ElementPosition ElementPosition
An ElementPosition object, which defines the inner plot position of a ChartArea object.
Attributes BindableAttribute TypeConverterAttribute
Remarks
The InnerPlotPosition property defines the rectangle within a chart area element that is used for plotting data; it
excludes tick marks, axis labels, and so forth.
The coordinates used for this property (0,0 to 100,100) are related to the ChartArea object, and not to the entire Chart.
The InnerPlotPosition property can be used to align multiple chart areas. However, if one chart area has tick marks and
axis labels and another one does not, their axis lines cannot be aligned.
Im p o rt a nt
This property can also be used to change the size of charts, such as pie or doughnut, without changing the size of the
generated chart image.
To change the position of an entire ChartArea object use the Position property instead.
ChartArea.IsSameFontSizeForAllAxes ChartArea.IsSame
FontSizeForAllAxes
I n this Article
Gets or sets a flag that determines if the labels of the relevant chart area axes are of equal size.
[System.ComponentModel.Bindable(true)]
public bool IsSameFontSizeForAllAxes { get; set; }
member this.IsSameFontSizeForAllAxes : bool with get, set
Returns
Boolean Boolean
true if all axes that have their IsLabelAutoFit property set to true and will display their labels using the same font
size; otherwise, false.
Attributes BindableAttribute
Remarks
The font size is automatically calculated by the Chart control, with the largest size that fits being used.
This property applies to all chart area axes that have their IsLabelAutoFit property set to true .
ChartArea.Name ChartArea.Name
I n this Article
Gets or sets the unique name of a ChartArea object.
[System.ComponentModel.Bindable(true)]
public override string Name { get; set; }
member this.Name : string with get, set
Returns
String String
A string value that represents the unique name of a ChartArea object.
Attributes BindableAttribute
Remarks
The name of a ChartArea object must be unique, otherwise an exception will be thrown.
This property can be used as the indexer when retrieving a ChartArea object from the ChartAreaCollection object.
If you set this property to a zero-length string. an exception will be thrown.
ChartArea.Position ChartArea.Position
I n this Article
Gets or sets an ElementPosition object that defines the position of a ChartArea object within the Chart.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.ElementP
ositionConverter))]
public System.Windows.Forms.DataVisualization.Charting.ElementPosition Position { get; set; }
member this.Position : System.Windows.Forms.DataVisualization.Charting.ElementPosition with get, set
Returns
ElementPosition ElementPosition
An ElementPosition object that defines the position of a chart area object within the chart image.
Attributes BindableAttribute TypeConverterAttribute
Remarks
This property defines the position of a ChartArea object within the Chart, and includes tick marks, axis labels, and so
forth.
The coordinates used for this property (0,0 to 100,100) are related to the entire chart image.
ChartArea.RecalculateAxesScale ChartArea.Recalculate
AxesScale
I n this Article
Recalculates the properties of the chart area after changes have been made to the chart in the Customize event.
Remarks
If you use the Customize event to make changes, it is sometimes necessary to recalculate chart area properties so that
the chart is rendered correctly. For example, if an axis range is changed, the labels for that axis must be recalculated.
Call this method after you use the Customize event to make ANY changes to a chart area.
ChartArea.ShadowColor ChartArea.ShadowColor
I n this Article
Gets or sets the shadow color of a ChartArea object.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color ShadowColor { get; set; }
member this.ShadowColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that specifies the shadow color of a chart area. The default color is Black.
Attributes BindableAttribute TypeConverterAttribute
Remarks
This property can be set to any valid ARGB (alpha, red, green, blue) value.
The alpha value can be used to achieve a "realistic" shadowing effect; try a color value of "128,0,0,0" for shadows.
To implement a shadow, set the ShadowOffset property to a value other than zero (0).
ChartArea.ShadowOffset ChartArea.ShadowOffset
I n this Article
Gets or sets the shadow offset, in pixels, of a ChartArea object.
[System.ComponentModel.Bindable(true)]
public int ShadowOffset { get; set; }
member this.ShadowOffset : int with get, set
Returns
Int32 Int32
An integer that represents the shadow offset, in pixels, of the chart area.
Attributes BindableAttribute
Remarks
To implement shadowing, use a value other than zero (0). A positive value will result in a shadow that shifts down and
to the right. A negative value will result in a shadow that shifts up and to the left.
ChartArea.TransformPoints ChartArea.TransformPoints
I n this Article
Applies 3D transformations to an array of 3D points, which must be done before GDI+ drawing methods can be called.
public void TransformPoints (System.Windows.Forms.DataVisualization.Charting.Point3D[] points);
member this.TransformPoints : System.Windows.Forms.DataVisualization.Charting.Point3D[] -> unit
Parameters
points Point3D []
An array of 3D points.
ChartArea.Visible ChartArea.Visible
I n this Article
Gets or sets a flag that determines if a chart area is visible.
public virtual bool Visible { get; set; }
member this.Visible : bool with get, set
Returns
Boolean Boolean
true if the chart area is visible; otherwise, false .
Remarks
When this flag is set to false , all series, legends, titles and annotation objects associated with the chart area will also
be hidden.
ChartArea3DStyle ChartArea3DStyle Class
Manages the display attributes for three-dimensional (3D ) chart areas.
D eclaration
public class ChartArea3DStyle
type ChartArea3DStyle = class
I nheritance H ierarchy
Object Object
Remarks
This class provides the styles for 3D chart areas, and is exposed using the Area3DStyle property.
To enable 3D for a chart area, set the Enable3D property to true . This causes 3D to be applied to all data series drawn
in a chart area.
An isometric projection of a chart area can be displayed by setting the IsRightAngleAxes property to true , which is
the default. Isometric views are not actually 3D, because the displayed angles of rotation may not match the actual
angles of rotation around the vertical and horizontal axes. The actual angles are controlled using the Rotation and
Inclination properties, respectively.
For more information about isometric projections, see the Remarks section of the IsRightAngleAxes property.
You can also use this class to:
Cluster bar and column chart data series using the IsClustered property.
Control the lighting effects using the LightStyle property.
Set the width of chart area walls using the WallWidth property.
Set the amount of perspective with the Perspective property.
Control the depth of data points and the distance between data rows using the PointDepth and PointGapDepth
properties, respectively.
Rotate a chart area using the Inclination and Rotation properties.
To work with coordinates of 3D points, use the Point3D class.
When a chart is set to 3D, the following chart features are not valid:
Scale breaks
Gradients
Scrolling and zooming
Constructors
ChartArea3DStyle()
ChartArea3DStyle()
Initializes a new instance of the ChartArea3DStyle class using the chartArea parameter.
Properties
Enable3D
Enable3D
Gets or sets a flag that toggles the 3D on and off for a chart area.
Inclination
Inclination
Gets or sets the angle of rotation around the horizontal axes for 3D chart areas.
IsClustered
IsClustered
Gets or sets a flag that determines whether data series for a bar or column chart are clustered; that is, displayed
along distinct rows.
IsRightAngleAxes
IsRightAngleAxes
Gets or sets a flag that determines whether a chart area is displayed using an isometric projection.
LightStyle
LightStyle
Perspective
Perspective
PointDepth
PointDepth
PointGapDepth
PointGapDepth
Gets or sets the distance between series rows in a 3D chart area.
Rotation
Rotation
Gets or sets the angle of rotation around the vertical axes for 3D chart areas.
WallWidth
WallWidth
Overloads
ChartArea3DStyle()
Initializes a new instance of the ChartArea3DStyle class.
ChartArea3DStyle(ChartArea) ChartArea3DStyle(ChartArea)
Initializes a new instance of the ChartArea3DStyle class using
the chartArea parameter.
ChartArea3DStyle()
Initializes a new instance of the ChartArea3DStyle class.
public ChartArea3DStyle ();
ChartArea3DStyle(ChartArea) ChartArea3DStyle(ChartArea)
Initializes a new instance of the ChartArea3DStyle class using the chartArea parameter.
Parameters
chartArea ChartArea ChartArea
A ChartArea object that is used for initialization.
ChartArea3DStyle.Enable3D ChartArea3DStyle.Enable3D
I n this Article
Gets or sets a flag that toggles the 3D on and off for a chart area.
[System.ComponentModel.Bindable(true)]
public bool Enable3D { get; set; }
member this.Enable3D : bool with get, set
Returns
Boolean Boolean
true the chart area is displayed using 3D, false if the chart area is displayed in 2D. The default value is false .
Attributes BindableAttribute
Remarks
Toggles the three-dimensional display of a chart area.
ChartArea3DStyle.Inclination ChartArea3DStyle.
Inclination
I n this Article
Gets or sets the angle of rotation around the horizontal axes for 3D chart areas.
[System.ComponentModel.Bindable(true)]
public int Inclination { get; set; }
member this.Inclination : int with get, set
Returns
Int32 Int32
An integer that represents the angle of rotation around the horizontal axes for 3D chart areas.
Attributes BindableAttribute
ChartArea3DStyle.IsClustered ChartArea3DStyle.Is
Clustered
I n this Article
Gets or sets a flag that determines whether data series for a bar or column chart are clustered; that is, displayed along
distinct rows.
[System.ComponentModel.Bindable(true)]
public bool IsClustered { get; set; }
member this.IsClustered : bool with get, set
Returns
Boolean Boolean
true if whether data series for a bar or column chart are clustered; otherwise, false .
Attributes BindableAttribute
ChartArea3DStyle.IsRightAngleAxes ChartArea3DStyle.Is
RightAngleAxes
I n this Article
Gets or sets a flag that determines whether a chart area is displayed using an isometric projection.
[System.ComponentModel.Bindable(true)]
public bool IsRightAngleAxes { get; set; }
member this.IsRightAngleAxes : bool with get, set
Returns
Boolean Boolean
true if the chart area is displayed using an isometric projection; otherwise, false .
Attributes BindableAttribute
Remarks
Isometric views are not actually 3D, because the displayed angles of rotation may not match the actual angles of
rotation around the vertical and horizontal axes. The actual angles are controlled using the Rotation and Inclination
properties, respectively.
Note the following points concerning isometric projection:
It is not "real" 3D. That is, the angle of rotation around axes doesn't use true rotational angles.
It is ideal for displaying 3D charts with some depth.
If your application allows end-users to rotate the charts, the rotation will not be smooth. In this case, using isometric
views is not recommended.
With isometric projection, perspective is not supported.
ChartArea3DStyle.LightStyle ChartArea3DStyle.Light
Style
I n this Article
Gets or sets the style of lighting for a 3D chart area.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.LightStyle LightStyle { get; set; }
member this.LightStyle : System.Windows.Forms.DataVisualization.Charting.LightStyle with get, set
Returns
LightStyle LightStyle
A LightStyle enumeration value that specifies the style of lighting for a 3D chart area.
Attributes BindableAttribute
ChartArea3DStyle.Perspective ChartArea3DStyle.
Perspective
I n this Article
Gets or sets the percent of perspective for a 3D chart area.
[System.ComponentModel.Bindable(true)]
public int Perspective { get; set; }
member this.Perspective : int with get, set
Returns
Int32 Int32
An integer value that represents the percent of perspective for a 3D chart area. The allowable range is 0-100 percent,
and the default is zero (0) percent.
Attributes BindableAttribute
Remarks
A perspective projection of any set of parallel lines that are not parallel to the projection plane converges to a vanishing
point.
If you set the Perspective property, the IsRightAngleAxes property will be automatically set to false , because these
properties are mutually exclusive.
ChartArea3DStyle.PointDepth ChartArea3DStyle.Point
Depth
I n this Article
Gets or sets the depth of data points displayed in a 3D chart area.
[System.ComponentModel.Bindable(true)]
public int PointDepth { get; set; }
member this.PointDepth : int with get, set
Returns
Int32 Int32
An integer value that represents the depth of data points. The allowable range is 0-1000 percent. The default is 100
percent.
Attributes BindableAttribute
Remarks
This property determines the depth of data points, and is represented as a percentage of the data point width.
The PointDepth property can be applied to the depth of bar, column, line, pie and spline chart data points only. If you
set this property for other chart types (for example, bubble and point charts) that cannot have their point depths
"stretched", it will reserve extra space for the data points, but will not increase their depth.
You can display the chart as an isometric projection by setting the IsRightAngleAxes property to true , which is the
default value. This will cause the point depth to appear to be more or less than the percentage set by this property,
depending on the chart being displayed.
To control the spacing between rows of data, use the PointGapDepth property.
ChartArea3DStyle.PointGapDepth ChartArea3DStyle.
PointGapDepth
I n this Article
Gets or sets the distance between series rows in a 3D chart area.
[System.ComponentModel.Bindable(true)]
public int PointGapDepth { get; set; }
member this.PointGapDepth : int with get, set
Returns
Int32 Int32
An integer value that represents the distance between data rows (that is, the data series) in the 3D chart area. The
allowable range is 0-1000 percent, and the default is 100 percent.
Attributes BindableAttribute
Remarks
This property determines the distance between data rows, with each row corresponding to a data series. The unit of
measurement is expressed as a percentage of the distance between data points in one row.
Changing the gap between columns or bars for column and bar chart types using the PointWidth custom property
will affect the PointGapDepth property value.
Set the IsRightAngleAxes property to true (the default value) to display the chart as an isometric projection. This will
cause the point gap depth to appear to be more or less than the percentage set by this property, depending on the
chart being displayed.
To control the depth of data points, use the PointDepth property.
ChartArea3DStyle.Rotation ChartArea3DStyle.Rotation
I n this Article
Gets or sets the angle of rotation around the vertical axes for 3D chart areas.
[System.ComponentModel.Bindable(true)]
public int Rotation { get; set; }
member this.Rotation : int with get, set
Returns
Int32 Int32
An integer value that represents the angle of rotation around the vertical axes for 3D chart areas.
Attributes BindableAttribute
ChartArea3DStyle.WallWidth ChartArea3DStyle.Wall
Width
I n this Article
Gets or sets the width of the walls displayed in a 3D chart area.
[System.ComponentModel.Bindable(true)]
public int WallWidth { get; set; }
member this.WallWidth : int with get, set
Returns
Int32 Int32
An integer value that represents the width, in pixels, of the walls displayed in a 3D chart area.
Attributes BindableAttribute
Remarks
This property determines the width of the walls (for example, the back wall, side walls, and so forth) that are displayed
in 3D chart areas. The allowable range is 0-30 pixels.
ChartAreaCollection ChartAreaCollection Class
Represents a collection of ChartArea objects.
D eclaration
public class ChartAreaCollection :
System.Windows.Forms.DataVisualization.Charting.ChartNamedElementCollection<System.Windows.Forms
.DataVisualization.Charting.ChartArea>
type ChartAreaCollection = class
inherit ChartNamedElementCollection<ChartArea>
I nheritance H ierarchy
Object Object
Collection<T> Collection<T>
ChartElementCollection<T> ChartElementCollection<T>
ChartNamedElementCollection<T> ChartNamedElementCollection<T>
Remarks
The ChartAreaCollection class represents a collection of ChartArea objects, which in turn represent the chart areas that
are displayed within the chart image.
This class is exposed as the ChartAreas property of the root Chart object.
The Count property indicates the total number of items in the collection and is commonly used to find the upper
bound of the collection.
Methods
Add(String)
Add(String)
Parameters
name String String
The name of the object to be added to the collection.
Returns
ChartArea ChartArea
A string value that represents a reference to the newly added object.
Remarks
Objects are always added as the last item in the collection.
The name argument specifies the Name property of the object being added.
ChartColorPalette ChartColorPalette Enum
Specifies a palette when setting a Palette property.
D eclaration
public enum ChartColorPalette
type ChartColorPalette =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The ChartColorPalette enumeration represents the palettes to be used for the root Chart object and any Series objects.
If no colors are assigned to data points and their associated series, the default colors will be assigned to the data. For
example:
If Palette is set to None, then the default palette is set to PaletteCustomColors or BrightPastel.
If.Palette is set to None, then the default palette for the chart is used ( Palette).
Fields
Berry Berry Palette utilizes blues and purples.
EarthTones EarthTones Palette utilizes earth tone colors such as green and brown.
Grayscale Grayscale Palette utilizes grayscale colors, that is, shades of black and white.
Light Light Palette utilizes LightStyle style colors; very light colors.
SeaGreen SeaGreen Palette utilizes colors that range from green to blue.
D eclaration
public enum ChartDashStyle
type ChartDashStyle =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The ChartDashStyle enumeration represents a line style.
Fields
Dash Dash A dashed line.
D eclaration
public abstract class ChartElement : IDisposable
type ChartElement = class
interface IDisposable
I nheritance H ierarchy
Object Object
Constructors
ChartElement()
ChartElement()
Properties
Tag
Tag
Methods
Dispose()
Dispose()
Dispose(Boolean)
Dispose(Boolean)
Releases the unmanaged resources used by the ChartElement and optionally releases the managed resources.
Equals(Object)
Equals(Object)
GetHashCode()
GetHashCode()
Returns a hash function for a particular type.
ToString()
ToString()
Overloads
Dispose() Dispose()
Releases the resources used by the ChartElement.
Dispose(Boolean) Dispose(Boolean)
Releases the unmanaged resources used by the ChartElement
and optionally releases the managed resources.
Dispose() Dispose()
Releases the resources used by the ChartElement.
public void Dispose ();
abstract member Dispose : unit -> unit
override this.Dispose : unit -> unit
Dispose(Boolean) Dispose(Boolean)
Releases the unmanaged resources used by the ChartElement and optionally releases the managed resources.
protected virtual void Dispose (bool disposing);
abstract member Dispose : bool -> unit
override this.Dispose : bool -> unit
Parameters
disposing Boolean Boolean
true to release both managed and unmanaged resources; false to release only unmanaged resources.
ChartElement.Equals ChartElement.Equals
I n this Article
Determines whether the specified Object is equal to the current ChartElement.
public override bool Equals (object obj);
override this.Equals : obj -> bool
Parameters
obj Object Object
The Object to compare with the current ChartElement.
Returns
Boolean Boolean
true if the specified Object is equal to the current ChartElement; otherwise, false .
ChartElement.GetHashCode ChartElement.GetHashCode
I n this Article
Returns a hash function for a particular type.
public override int GetHashCode ();
override this.GetHashCode : unit -> int
Returns
Int32 Int32
An integer value that represents the hash code for the current Object.
ChartElement.Tag ChartElement.Tag
I n this Article
Gets or sets an object associated with this chart element.
[System.ComponentModel.Browsable(false)]
public object Tag { get; set; }
member this.Tag : obj with get, set
Returns
Object Object
An Object associated with this chart element.
Attributes BrowsableAttribute
Remarks
The Tag property can be used to store additional data with this chart element.
ChartElement.ToString ChartElement.ToString
I n this Article
Returns a string that represents the current Object.
public override string ToString ();
override this.ToString : unit -> string
Returns
String String
A string value that represents the current Object.
ChartElementCollection<T> ChartElementCollection<T>
Class
Represents the base class for all chart element collections.
D eclaration
public abstract class ChartElementCollection<T> : System.Collections.ObjectModel.Collection<T>,
IDisposable where T : ChartElement
type ChartElementCollection<'T (requires 'T :> ChartElement)> = class
inherit Collection<'T (requires 'T :> ChartElement)>
interface IDisposable
I nheritance H ierarchy
Object Object
Collection<T> Collection<T>
Methods
ClearItems()
ClearItems()
Dispose()
Dispose()
Dispose(Boolean)
Dispose(Boolean)
Releases the unmanaged resources used by the ChartElementCollection<T> and optionally releases the managed
resources.
InsertItem(Int32, T)
InsertItem(Int32, T)
Invalidate()
Invalidate()
RemoveItem(Int32)
RemoveItem(Int32)
ResumeUpdates()
ResumeUpdates()
SetItem(Int32, T)
SetItem(Int32, T)
SuspendUpdates()
SuspendUpdates()
Overloads
Dispose() Dispose()
Releases the resources used by the
ChartElementCollection<T>.
Dispose(Boolean) Dispose(Boolean)
Releases the unmanaged resources used by the
ChartElementCollection<T> and optionally releases the
managed resources.
Dispose() Dispose()
Releases the resources used by the ChartElementCollection<T>.
public void Dispose ();
abstract member Dispose : unit -> unit
override this.Dispose : unit -> unit
Dispose(Boolean) Dispose(Boolean)
Releases the unmanaged resources used by the ChartElementCollection<T> and optionally releases the managed
resources.
protected virtual void Dispose (bool disposing);
abstract member Dispose : bool -> unit
override this.Dispose : bool -> unit
Parameters
disposing Boolean Boolean
true to release both managed and unmanaged resources; false to release only unmanaged resources.
ChartElementCollection<T>.InsertItem ChartElement
Collection<T>.InsertItem
I n this Article
Inserts an element into the Collection<T> at the specified index location.
Parameters
index Int32 Int32
The zero-based index location of the item will be inserted.
item
The object to insert. The value can be null for reference types.
ChartElementCollection<T>.Invalidate ChartElement
Collection<T>.Invalidate
I n this Article
Forces the invalidation of the parent chart element.
Parameters
index Int32 Int32
The zero-based index location of the element to remove.
ChartElementCollection<T>.ResumeUpdates Chart
ElementCollection<T>.ResumeUpdates
I n this Article
Resumes the invalidation of a chart element in the collection.
Remarks
If you call the SuspendUpdates method several times, you will need to call the ResumeUpdates method an equal
number of times.
ChartElementCollection<T>.SetItem ChartElement
Collection<T>.SetItem
I n this Article
Replaces the element at the specified index location.
Parameters
index Int32 Int32
The zero-based index location of the element to replace.
item
The new value for the element at the specified index location. The value can be null for reference types.
ChartElementCollection<T>.SuspendUpdates Chart
ElementCollection<T>.SuspendUpdates
I n this Article
Suspends the invalidation of a chart element in the collection.
Remarks
A call to the Invalidate method will have no effect after the SuspendUpdates method is called.
If you call the SuspendUpdates method several times, you will need to call the ResumeUpdates method an equal
number of times.
ChartElementOutline ChartElementOutline Class
Represents an array of marker points and the outline path used for visual object selection in the chart.
D eclaration
public class ChartElementOutline : IDisposable
type ChartElementOutline = class
interface IDisposable
I nheritance H ierarchy
Object Object
Remarks
The value of the OutlinePath property can be null for complex objects or objects with two points or fewer.
Properties
Markers
Markers
OutlinePath
OutlinePath
Gets or sets the outline path. The result can be null for complex objects and objects with two points or fewer.
Methods
Dispose()
Dispose()
Dispose(Boolean)
Dispose(Boolean)
Overloads
Dispose() Dispose()
Performs application-defined tasks that frees, releases, or
resets unmanaged resources.
Dispose(Boolean) Dispose(Boolean)
Releases unmanaged and, optionally, managed resources.
Dispose() Dispose()
Performs application-defined tasks that frees, releases, or resets unmanaged resources.
public void Dispose ();
abstract member Dispose : unit -> unit
override this.Dispose : unit -> unit
Dispose(Boolean) Dispose(Boolean)
Releases unmanaged and, optionally, managed resources.
protected virtual void Dispose (bool disposing);
abstract member Dispose : bool -> unit
override this.Dispose : bool -> unit
Parameters
disposing Boolean Boolean
true to release both unmanaged and managed resources; false to release only unmanaged resources.
ChartElementOutline.Markers ChartElementOutline.
Markers
I n this Article
Gets or sets the array of marker points.
Returns
ReadOnlyCollection<PointF>
An array of PointF values that represents the marker points.
ChartElementOutline.OutlinePath ChartElementOutline.
OutlinePath
I n this Article
Gets or sets the outline path. The result can be null for complex objects and objects with two points or fewer.
Returns
GraphicsPath GraphicsPath
A GraphicsPath object that represents the outline path.
ChartElementType ChartElementType Enum
Specifies a chart element type.
D eclaration
public enum ChartElementType
type ChartElementType =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Fields
Annotation Annotation Any object derived from the Annotation class.
Gridlines Gridlines Any major or minor grid line, either vertical or horizontal.
LegendArea LegendArea The area inside a Legend object. Does not include the space occupied by legend items.
PlottingArea The plotting area, which is the chart area excluding axes, labels, and so on. Also excludes the
PlottingArea areas that data points might occupy.
ScrollBarLargeDecrement The background of a scrollbar that, when clicked, results in a large decrement in the view size.
ScrollBarLargeDecrement This background is located below the thumb for a vertical scrollbar, and to the left of the
thumb for a horizontal scrollbar.
ScrollBarLargeIncrement The background of a scrollbar that, when clicked, results in a large increment in the view size.
ScrollBarLargeIncrement This background is located above the thumb for a vertical scrollbar, and to the right of the
thumb for a horizontal scrollbar.
ScrollBarSmallDecrement A scrollbar small decrement button. A "down arrow" button for a vertical scrollbar, a "left
ScrollBarSmallDecrement arrow" button for a horizontal scrollbar.
ScrollBarSmallIncrement A scrollbar small increment button. An "up arrow" button for a vertical scrollbar, a "right
ScrollBarSmallIncrement arrow" button for a horizontal scrollbar.
D eclaration
public class ChartGraphics : System.Windows.Forms.DataVisualization.Charting.ChartElement
type ChartGraphics = class
inherit ChartElement
I nheritance H ierarchy
Object Object
ChartElement ChartElement
Remarks
This class provides numerous conversion functions and also exposes a GDI+ Graphics object. Note that when
rendering as Scalable Vector Graphics (SVG ), use of the Graphics object for custom drawing will not be included as
part of the SVG document.
Note also that, by default, Graphics functions usually take absolute coordinates. Therefore the conversion methods of
this class should be useful if you perform drawing operations.
A ChartGraphics object is exposed in the ChartGraphics property of the ChartPaintEventArgs class, which makes it
easy to perform custom drawing in the PrePaint and PostPaint events.
Im p o rt a nt
If significant changes are made to the default behavior of the Graphics object, the chart image and its associated
elements may be drawn erratically. For example, positioning may be altered. It is highly recommended that you
become well acquainted with GDI+ before you make any significant changes to the properties of the Graphics object.
Properties
Graphics
Graphics
Gets or sets a GDI+ Graphics object that can be used for drawing purposes.
Methods
Dispose(Boolean)
Dispose(Boolean)
GetAbsolutePoint(PointF)
GetAbsolutePoint(PointF)
Takes a PointF object and converts its relative coordinates to absolute coordinates.
GetAbsoluteRectangle(RectangleF)
GetAbsoluteRectangle(RectangleF)
Takes a RectangleF object and converts its relative coordinates to absolute coordinates.
GetAbsoluteSize(SizeF)
GetAbsoluteSize(SizeF)
Takes a SizeF object that uses relative coordinates and returns a SizeF object that uses absolute coordinates.
Takes a given axis value for a specified axis and returns the relative pixel value.
GetRelativePoint(PointF)
GetRelativePoint(PointF)
Takes a PointF object that uses absolute coordinates and returns a PointF object that uses relative coordinates.
GetRelativeRectangle(RectangleF)
GetRelativeRectangle(RectangleF)
Takes a RectangleF structure that is using absolute coordinates and returns a RectangleF object that uses relative
coordinates.
GetRelativeSize(SizeF)
GetRelativeSize(SizeF)
Takes a SizeF object in absolute coordinates and returns a SizeF object that uses relative coordinates.
ChartGraphics.Dispose ChartGraphics.Dispose
I n this Article
Releases unmanaged and, optionally, managed resources.
protected override void Dispose (bool disposing);
override this.Dispose : bool -> unit
Parameters
disposing Boolean Boolean
true to release both unmanaged and managed resources; false to release only unmanaged resources.
ChartGraphics.GetAbsolutePoint ChartGraphics.Get
AbsolutePoint
I n this Article
Takes a PointF object and converts its relative coordinates to absolute coordinates.
Parameters
point PointF PointF
A PointF object in relative coordinates.
Returns
PointF PointF
A PointF object in absolute coordinates.
ChartGraphics.GetAbsoluteRectangle ChartGraphics.Get
AbsoluteRectangle
I n this Article
Takes a RectangleF object and converts its relative coordinates to absolute coordinates.
Parameters
rectangle RectangleF RectangleF
A RectangleF object in relative coordinates.
Returns
RectangleF RectangleF
A RectangleF object in absolute coordinates.
ChartGraphics.GetAbsoluteSize ChartGraphics.Get
AbsoluteSize
I n this Article
Takes a SizeF object that uses relative coordinates and returns a SizeF object that uses absolute coordinates.
Parameters
size SizeF SizeF
A SizeF object in relative coordinates.
Returns
SizeF SizeF
A SizeF object in absolute coordinates.
ChartGraphics.GetPositionFromAxis ChartGraphics.Get
PositionFromAxis
I n this Article
Takes a given axis value for a specified axis and returns the relative pixel value.
Parameters
chartAreaName String String
Chart area name.
axis AxisName AxisName
An AxisName enumeration value that identifies the relevant axis.
axisValue Double Double
The axis value to be converted to a relative pixel value.
Returns
Double Double
A string value that represents the converted axis value, in relative pixel coordinates.
ChartGraphics.GetRelativePoint ChartGraphics.Get
RelativePoint
I n this Article
Takes a PointF object that uses absolute coordinates and returns a PointF object that uses relative coordinates.
Parameters
point PointF PointF
A PointF object in absolute coordinates.
Returns
PointF PointF
A PointF object in relative coordinates.
ChartGraphics.GetRelativeRectangle ChartGraphics.Get
RelativeRectangle
I n this Article
Takes a RectangleF structure that is using absolute coordinates and returns a RectangleF object that uses relative
coordinates.
public System.Drawing.RectangleF GetRelativeRectangle (System.Drawing.RectangleF rectangle);
member this.GetRelativeRectangle : System.Drawing.RectangleF -> System.Drawing.RectangleF
Parameters
rectangle RectangleF RectangleF
A RectangleF structure in absolute coordinates.
Returns
RectangleF RectangleF
A RectangleF structure in relative coordinates.
ChartGraphics.GetRelativeSize ChartGraphics.Get
RelativeSize
I n this Article
Takes a SizeF object in absolute coordinates and returns a SizeF object that uses relative coordinates.
Parameters
size SizeF SizeF
A SizeF object in absolute coordinates.
Returns
SizeF SizeF
A SizeF object in relative coordinates.
ChartGraphics.Graphics ChartGraphics.Graphics
I n this Article
Gets or sets a GDI+ Graphics object that can be used for drawing purposes.
public System.Drawing.Graphics Graphics { get; set; }
member this.Graphics : System.Drawing.Graphics with get, set
Returns
Graphics Graphics
A Graphics object used for drawing.
Remarks
You can use this property to perform any custom drawing that can be performed using GDI+.
ChartHatchStyle ChartHatchStyle Enum
Specifies a hatching style for a chart element.
D eclaration
public enum ChartHatchStyle
type ChartHatchStyle =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The ChartHatchStyle enumeration represents the hatching styles that can be used for numerous chart elements, such
as the ChartArea, Legend, and so forth.
Setting the BackHatchStyle property of a chart element object to any member of this enumeration except None will
cause the corresponding hatching style to be applied to the chart element.
Fields
BackwardDiagonal BackwardDiagonal Backward diagonal style.
D eclaration
public enum ChartImageAlignmentStyle
type ChartImageAlignmentStyle =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Fields
Bottom Bottom The image is aligned to the bottom boundary of the chart element.
BottomLeft BottomLeft The image is aligned to the bottom left corner of the chart element.
BottomRight BottomRight The image is aligned to the bottom right corner of the chart element.
Center Center The image is aligned in the center of the chart element.
Left Left The image is aligned to the left boundary of the chart element.
Right Right The image is aligned to the right boundary of the chart element.
Top Top The image is aligned to the top boundary of the chart element.
TopLeft TopLeft The mage is aligned to the top left corner of the chart element.
TopRight TopRight The image is aligned to the top right corner of the chart element.
ChartImageFormat ChartImageFormat Enum
Specifies the image type of the chart.
D eclaration
public enum ChartImageFormat
type ChartImageFormat =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The ChartImageFormat enumeration represents an image type that is used to save the chart to a file or stream.
Note
Only charts saved to disk can use the EmfDual or EmfDual format. Charts cannot be rendered on a Web page using
EMF -dual or EMF+.
Fields
Bmp Bmp A bitmap (BMP) image format.
D eclaration
public enum ChartImageWrapMode
type ChartImageWrapMode =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The ChartImageWrapMode enumeration represents the drawing mode for a background image, as set by the
BackImageWrapMode property of the Chart control. To set a background image for a chart element, use the
BackImage property.
Note
If you specify the Unscaled value, the location where the image is drawn will depend on the BackImageAlignment
property setting.
Fields
Scaled Scaled Background image is scaled to fit the entire chart element.
Tile Tile Background image is tiled to fit the entire chart element.
TileFlipX TileFlipX Every other tiled image is reversed around the X-axis.
TileFlipXY TileFlipXY Every other tiled image is reversed around the X-axis and Y-axis.
TileFlipY TileFlipY Every other tiled image is reversed around the Y-axis.
D eclaration
public abstract class ChartNamedElement :
System.Windows.Forms.DataVisualization.Charting.ChartElement
type ChartNamedElement = class
inherit ChartElement
I nheritance H ierarchy
Object Object
ChartElement ChartElement
Constructors
ChartNamedElement()
ChartNamedElement()
ChartNamedElement(String)
ChartNamedElement(String)
Initializes a new instance of the ChartNamedElement class with the specified chart element name.
Properties
Name
Name
Overloads
ChartNamedElement()
Initializes a new instance of the ChartNamedElement class.
ChartNamedElement(String) ChartNamedElement(String)
Initializes a new instance of the ChartNamedElement class with
the specified chart element name.
ChartNamedElement()
Initializes a new instance of the ChartNamedElement class.
protected ChartNamedElement ();
ChartNamedElement(String) ChartNamedElement(String)
Initializes a new instance of the ChartNamedElement class with the specified chart element name.
protected ChartNamedElement (string name);
new System.Windows.Forms.DataVisualization.Charting.ChartNamedElement : string ->
System.Windows.Forms.DataVisualization.Charting.ChartNamedElement
Parameters
name String String
The name of the new chart element.
ChartNamedElement.Name ChartNamedElement.Name
I n this Article
Gets or sets the name of the chart element.
public virtual string Name { get; set; }
member this.Name : string with get, set
Returns
String String
A string value that represents the name of the chart element.
ChartNamedElementCollection<T> ChartNamedElement
Collection<T> Class
Represents the base class for all collections of named chart elements. Performs name management and enforces the
uniqueness of the names.
D eclaration
public abstract class ChartNamedElementCollection<T> :
System.Windows.Forms.DataVisualization.Charting.ChartElementCollection<T> where T :
ChartNamedElement
type ChartNamedElementCollection<'T (requires 'T :> ChartNamedElement)> = class
inherit ChartElementCollection<'T (requires 'T :> ChartNamedElement)>
I nheritance H ierarchy
Object Object
Collection<T> Collection<T>
ChartElementCollection<T> ChartElementCollection<T>
Properties
Item[String]
Item[String]
NamePrefix
NamePrefix
Gets the name prefix that is used to create unique chart element names.
Methods
FindByName(String)
FindByName(String)
IndexOf(String)
IndexOf(String)
Finds the index of the chart element with the specified name.
InsertItem(Int32, T)
InsertItem(Int32, T)
Determines whether the chart element with the specified name already exists in the collection.
NextUniqueName()
NextUniqueName()
Finds the unique name for the new element to be added to the collection.
RemoveItem(Int32)
RemoveItem(Int32)
SetItem(Int32, T)
SetItem(Int32, T)
Replaces the chart element at the specified index with a new chart element.
ChartNamedElementCollection<T>.FindByName Chart
NamedElementCollection<T>.FindByName
I n this Article
Finds the chart element by the specified name.
Parameters
name String String
The name of the chart element.
Returns
TT
The ChartNamedElement object of the specified name in the collection.
ChartNamedElementCollection<T>.IndexOf Chart
NamedElementCollection<T>.IndexOf
I n this Article
Finds the index of the chart element with the specified name.
Parameters
name String String
The name of the chart element.
Returns
Int32 Int32
An integer value that represents the position of the chart element in the zero-based index.
ChartNamedElementCollection<T>.InsertItem Chart
NamedElementCollection<T>.InsertItem
I n this Article
Inserts the specified item in the collection at the specified index.
Parameters
index Int32 Int32
The zero-based index where the item is to be inserted.
item TT
The object to insert.
ChartNamedElementCollection<T>.IsUniqueName Chart
NamedElementCollection<T>.IsUniqueName
I n this Article
Determines whether the chart element with the specified name already exists in the collection.
Parameters
name String String
The new chart element name.
Returns
Boolean Boolean
true if the new chart element name is unique; otherwise, false .
ChartNamedElementCollection<T>.Item[String] Chart
NamedElementCollection<T>.Item[String]
I n this Article
Gets or sets the chart element with the specified name.
Parameters
name String String
The name of the chart element.
Returns
TT
The ChartNamedElement object of the specified name in the collection.
ChartNamedElementCollection<T>.NamePrefix Chart
NamedElementCollection<T>.NamePrefix
I n this Article
Gets the name prefix that is used to create unique chart element names.
Returns
String String
A string value that represents the default name prefix of the chart elements stored in the collection.
ChartNamedElementCollection<T>.NextUniqueName
ChartNamedElementCollection<T>.NextUniqueName
I n this Article
Finds the unique name for the new element to be added to the collection.
Returns
String String
A string value that represents the next unique chart element name.
ChartNamedElementCollection<T>.RemoveItem Chart
NamedElementCollection<T>.RemoveItem
I n this Article
Removes the chart element at the specified index of the collection.
Parameters
index Int32 Int32
The zero-based index of the chart element to remove.
ChartNamedElementCollection<T>.SetItem ChartNamed
ElementCollection<T>.SetItem
I n this Article
Replaces the chart element at the specified index with a new chart element.
Parameters
index Int32 Int32
The zero-based index of the chart element to replace.
item TT
The new chart element to insert at the specified index.
ChartPaintEventArgs ChartPaintEventArgs Class
Provides data for the paint events of the Chart control.
D eclaration
public class ChartPaintEventArgs : EventArgs
type ChartPaintEventArgs = class
inherit EventArgs
I nheritance H ierarchy
Object Object
EventArgs EventArgs
Remarks
A ChartPaintEventArgs object is used to set chart properties during the PostPaint and PrePaint events of the Chart
control.
The Position property allows you to position chart elements, and the ChartGraphics property facilitates GDI+ drawing
operations.
The Chart property gives the developer access to the root Chart object, which can be used to set various properties of
the chart.
Properties
Chart
Chart
ChartElement
ChartElement
ChartGraphics
ChartGraphics
Position
Position
Returns
Chart Chart
The root Chart object.
Remarks
The Chart property allows the developer to set chart properties during the PostPaint and PrePaint events of the Chart
control.
ChartPaintEventArgs.ChartElement ChartPaintEventArgs.
ChartElement
I n this Article
Gets an Object for the event.
Returns
Object Object
An Object that represents the hart element.
ChartPaintEventArgs.ChartGraphics ChartPaintEvent
Args.ChartGraphics
I n this Article
Gets a ChartGraphics object.
Returns
ChartGraphics ChartGraphics
A ChartGraphics object.
Remarks
Use this object property during a painting event to:
Help with the conversion to and from relative and/or absolute chart coordinates.
Perform custom drawing using a GDI+ Graphics object.
ChartPaintEventArgs.Position ChartPaintEventArgs.
Position
I n this Article
Gets an ElementPosition object.
Returns
ElementPosition ElementPosition
An ElementPosition object.
Remarks
Use this object property during a painting event to position a chart element.
ChartSerializer ChartSerializer Class
Enables serialization of the Chart control.
D eclaration
public class ChartSerializer
type ChartSerializer = class
I nheritance H ierarchy
Object Object
Remarks
This class is exposed as the Serializer property of the root Chart class.
Serialization saves the state of the chart and also provides the option to load the serialized data into the chart. All chart
properties can be persisted, including the chart's data. In addition, all chart properties marked for serialization can be
reset.
This class can optionally be used when managing user-defined view state. One of its Load methods can be used to
load the view state, and one of the Save methods can be used when setting the view state.
The XML or binary formats can be used to store serialized data. XML is used by default, but you can change the format
with the Format property.
Chart properties are saved and loaded using the Save and Load methods, respectively. Note that only properties with
non-default values will be saved. Data can be saved and/or loaded using a file, stream, TextWriter, TextReader,
XmlWriter and XmlReader objects. When saving and/or loading data using an object derived from the TextReader,
TextWriter, XmlReader or XmlWriter classes, the format of the data must be XML.
The following list describes three techniques, from basic to advanced, used to define serializable data. Note that it is
also possible to define non-serializable data. This technique is described in the next paragraph.
Serialize the Chart using the Save and Load methods, without specifying any serializable properties. All chart
properties with non-default values, which includes chart data, will be serialized.
Serialize the chart properties specified by the Content property. The Content property groups the chart properties to
be serialized into categories such as Data, Appearance, and so forth. Note that the names of ChartArea and Series
objects are automatically serialized; the serialized data is then applied to existing chart areas and series when loaded.
Im p o rt a nt
The Content property is implemented internally by the Chart control as the SerializableContent property
Serialization of chart properties specified by the SerializableContent property. This is a comma-separated listing of all
chart properties that are serializable. After this property is set to an explicit value, it is the responsibility of the
developer to specify all properties to be saved. In other words, unlike the Content property, the names of chart areas
and series will not be automatically persisted. The Content and SerializableContent properties can also be used in
conjunction. However, make sure that SerializableContent is concatenated with itself when being set, otherwise the
chart properties specified by the Content property will be overridden.
To prohibit certain properties from being serialized, use the NonSerializableContent property. When one property is
set as serializable and non-serializable, which is common when wildcards are used, the SerializableContent property
has precedence. However, precedence also depends on how many wildcards were used when a property was specified.
By default, serializable properties are reset to their defaults before they are loaded. This behavior can be changed using
the IsResetWhenLoading property. The Reset method can also be used to explicitly reset chart properties to their
default values.
Properties
Content
Content
Format
Format
IsResetWhenLoading
IsResetWhenLoading
Gets or sets a flag that indicates whether object properties are reset to default values before loading.
IsTemplateMode
IsTemplateMode
Gets or sets a flag that indicates whether the chart serializer is working in template-creation mode.
IsUnknownAttributeIgnored
IsUnknownAttributeIgnored
Gets or sets a flag that indicates whether unknown XML properties and elements will be ignored without throwing
an exception.
NonSerializableContent
NonSerializableContent
SerializableContent
SerializableContent
Methods
GetContentString(SerializationContents, Boolean)
GetContentString(SerializationContents, Boolean)
Returns a serializable or non-serializable class and/or property names, depending on the specific flag value.
Load(XmlReader)
Load(XmlReader)
Loads serialized data into the control from an object derived from the XmlReader class.
Load(String)
Load(String)
Load(Stream)
Load(Stream)
Loads serialized data into the control from an object derived from the Stream class.
Load(TextReader)
Load(TextReader)
Loads serialized data into the control from a reader object that derives from the TextReader class.
Reset()
Reset()
Save(XmlWriter)
Save(XmlWriter)
Saves chart data and properties with non-default values to the given object that is derived from the XmlWriter
class.
Save(Stream)
Save(Stream)
Saves chart data and properties with non-default values to an object that derives from the Stream class.
Save(TextWriter)
Save(TextWriter)
Saves chart data and properties with non-default values to the given object that is derived from the TextWriter
class.
Save(String)
Save(String)
Saves chart data and properties with non-default values to the given file.
ChartSerializer.Content ChartSerializer.Content
I n this Article
Gets or sets the type of chart content to be serialized.
public System.Windows.Forms.DataVisualization.Charting.SerializationContents Content { get; set; }
member this.Content : System.Windows.Forms.DataVisualization.Charting.SerializationContents with
get, set
Returns
SerializationContents SerializationContents
A SerializationContents enumeration value that represents the chart content that will be serialized during a load, save
or reset operation. By default, all non-default chart properties, including data, are persisted.
Remarks
By default, all chart properties will be serialized when any of the Save and Load methods are called. To provide more
control over what is serialized, use the Content property. Note that the SerializableContent and
NonSerializableContent properties can also be used along with the Content property.
Im p o rt a nt
The Content property determines types of chart characteristics, such as "appearance", to be serialized, and is actually
implemented internally as the SerializableContent property. This means that setting the Content property and then
setting the SerializableContent property will result in the Content property value being overridden, unless
SerializableContent is concatenated. See the sample code below for an example of this procedure.
If you set the Content property, all ChartArea and Series objects names will automatically be serialized; this means that
serialized data that pertains to chart areas and series will be applied to existing objects when loaded.
Setting this property affects all load, save and reset operations.
ChartSerializer.Format ChartSerializer.Format
I n this Article
Gets or sets the format used when the chart is serialized.
public System.Windows.Forms.DataVisualization.Charting.SerializationFormat Format { get; set; }
member this.Format : System.Windows.Forms.DataVisualization.Charting.SerializationFormat with get,
set
Returns
SerializationFormat SerializationFormat
A SerializationFormat enumeration value that represents the format of the serialized data. The default value is XML.
Remarks
Data can be serialized in either an XML or binary format. Binary format is compact, and takes less storage than XML.
XML, however, is a text format that is human-readable.
When you save or load serialized data, the format must be XML.
ChartSerializer.GetContentString ChartSerializer.Get
ContentString
I n this Article
Returns a serializable or non-serializable class and/or property names, depending on the specific flag value.
Parameters
content SerializationContents SerializationContents
The serializable content.
serializable Boolean Boolean
true to get a serializable string; false to get a non-serializable string.
Returns
String String
A string value that represents the serializable or non-serializable class and/or property names.
ChartSerializer.IsResetWhenLoading ChartSerializer.Is
ResetWhenLoading
I n this Article
Gets or sets a flag that indicates whether object properties are reset to default values before loading.
Returns
Boolean Boolean
true if object properties are reset to default values before loading; otherwise, false .
ChartSerializer.IsTemplateMode ChartSerializer.Is
TemplateMode
I n this Article
Gets or sets a flag that indicates whether the chart serializer is working in template-creation mode.
Returns
Boolean Boolean
true if the chart serializer is working in template-creation mode; otherwise, false .
ChartSerializer.IsUnknownAttributeIgnored Chart
Serializer.IsUnknownAttributeIgnored
I n this Article
Gets or sets a flag that indicates whether unknown XML properties and elements will be ignored without throwing an
exception.
public bool IsUnknownAttributeIgnored { get; set; }
member this.IsUnknownAttributeIgnored : bool with get, set
Returns
Boolean Boolean
true if unknown XML properties and elements are ignored without throwing an exception; otherwise, false .
ChartSerializer.Load ChartSerializer.Load
I n this Article
Overloads
Load(XmlReader) Load(XmlReader)
Loads serialized data into the control from an object derived
from the XmlReader class.
Load(String) Load(String)
Loads serialized data saved to disk into the Chart control.
Load(Stream) Load(Stream)
Loads serialized data into the control from an object derived
from the Stream class.
Load(TextReader) Load(TextReader)
Loads serialized data into the control from a reader object that
derives from the TextReader class.
Load(XmlReader) Load(XmlReader)
Loads serialized data into the control from an object derived from the XmlReader class.
public void Load (System.Xml.XmlReader reader);
member this.Load : System.Xml.XmlReader -> unit
Parameters
reader XmlReader XmlReader
An object from which to read the persisted data. The object is derived from the XmlReader class, and can be a .NET
Framework object or a user-defined object.
Remarks
Call this method to load serialized data into the Chart control.
When a load operation occurs, by default serializable properties are first reset to their default values before they are set
to the persisted values, if saved. To change this behavior, use the IsResetWhenLoading property.
By default, all serialized chart properties will be loaded. If you set the Content, SerializableContent or
NonSerializableContent properties, a specific set of properties can be loaded.
When you use this definition, the format must be XML; the format can be changed with the Format property.
When you work with XML format text files, for simplicity use the Load method instead.
Load(String) Load(String)
Loads serialized data saved to disk into the Chart control.
public void Load (string fileName);
member this.Load : string -> unit
Parameters
fileName String String
The relative or absolute path of the file used to store the serialized data. If a relative path is specified, the path will be
relative to the current directory.
Remarks
Call this method to load serialized data into the Chart control.
When a load operation occurs, serializable properties are, by default, first reset to their default values before they are
set to the persisted values, if saved. To change this behavior, use the IsResetWhenLoading property.
By default, all serialized chart properties will be loaded. To load specific serialized properties, set the Content ,
SerializableContent or NonSerializableContent properties before loading the data.
Note that when data is saved using a Save method, only those properties that have non-default values are actually
serialized.
Load(Stream) Load(Stream)
Loads serialized data into the control from an object derived from the Stream class.
Parameters
stream Stream Stream
An object derived from the Stream class, for example, a MemoryStream object.
Remarks
Call this method to load serialized data into the Chart control.
When a load operation occurs, serializable properties are, by default, first reset to their default values before they are
set to the persisted values, if saved. To change this behavior, use the IsResetWhenLoading property.
By default, all serialized chart properties will be loaded. To load specific serialized properties, set the Content ,
SerializableContent or NonSerializableContent properties before loading the data.
Note that when data is saved using a Save method, only those properties that have non-default values are actually
serialized.
Load(TextReader) Load(TextReader)
Loads serialized data into the control from a reader object that derives from the TextReader class.
Parameters
reader TextReader TextReader
A reader, such as StringReader, that is derived from the abstract TextReader class.
Remarks
Call this method to load serialized data into the Chart control.
When a load operation occurs, by default the serializable properties are first reset to their default values before they
are set to the persisted values, if saved. To change this behavior, use the IsResetWhenLoading property.
By default, all serialized chart properties will be loaded. By setting the Content, SerializableContent or
NonSerializableContent properties, a specific set of properties can be loaded.
If you use this definition, note that the format, which is set by the Format property, must be XML.
ChartSerializer.NonSerializableContent ChartSerializer.
NonSerializableContent
I n this Article
Gets or sets the chart properties that will not be serialized.
Returns
String String
A comma-separated string expression that represents the chart properties that will not be serialized. The syntax is
"Class.Property[,Class.Property]".
Remarks
By default all chart properties will be serialized when the Save and Load methods are called. You can use the
NonSerializableContent property to limit chart characteristics to be serialized, along with the SerializableContent and
Content properties.
This property determines which chart characteristics will not be serialized. Wildcards can be used in the string
expression, in the same manner as the SerializableContent property. For example, to exclude all chart BackColor
properties from serialization, set this property to "*.BackColor".
Sometimes, a property can be set to be both serialized and not serialized, which is common when wildcards are used.
The NonSerializableContent expression has a lower priority when compared to the SerializableContent expression.
However, note that less weight is given to string expressions that use wildcards. For example, if the SerializableContent
property is set to "*.BackColor" and the NonSerializableContent property is set to BackColor, all BackColor properties
except for ChartArea objects will be serialized.
If the Content property has been set, the priority depends on how many wild cards are used in the
NonSerializableContent expression. For example, setting the Content property to Appearance will result in the
SerializableContent property containing a "*.Back*" expression. If the NonSerializableContent property is set to
"*.Back*", all Back\* chart properties, such as BackColor , BackGradient , and so forth, will still be serialized. This is
because the SerializableContent property value has higher priority when compared to the NonSerializableContent
property.
This property affects all save, load and reset operations.
ChartSerializer.Reset ChartSerializer.Reset
I n this Article
Resets all chart properties marked for serialization.
public void Reset ();
member this.Reset : unit -> unit
Remarks
By default, this method resets all chart properties to their default values.
To limit the chart properties that are reset to their defaults, use the Content, SerializableContent and
NonSerializableContent properties.
Note that this method is also called automatically when a Load method is used and the IsResetWhenLoading property
is set to true .
ChartSerializer.Save ChartSerializer.Save
I n this Article
Overloads
Save(XmlWriter) Save(XmlWriter)
Saves chart data and properties with non-default values to
the given object that is derived from the XmlWriter class.
Save(Stream) Save(Stream)
Saves chart data and properties with non-default values to an
object that derives from the Stream class.
Save(TextWriter) Save(TextWriter)
Saves chart data and properties with non-default values to
the given object that is derived from the TextWriter class.
Save(String) Save(String)
Saves chart data and properties with non-default values to
the given file.
Save(XmlWriter) Save(XmlWriter)
Saves chart data and properties with non-default values to the given object that is derived from the XmlWriter class.
public void Save (System.Xml.XmlWriter writer);
member this.Save : System.Xml.XmlWriter -> unit
Parameters
writer XmlWriter XmlWriter
An object derived from XmlWriter used to save Chart properties.
Remarks
By default, all chart properties with non-default values, which includes data points, will be serialized when this method
is called. To control which chart characteristics are serialized, use the Content, SerializableContent and
NonSerializableContent properties.
When you use this definition, the format must be XML; the format can be changed with the Format property.
When you work with XML format text files, for simplicity use the Save method instead.
Save(Stream) Save(Stream)
Saves chart data and properties with non-default values to an object that derives from the Stream class.
public void Save (System.IO.Stream stream);
member this.Save : System.IO.Stream -> unit
Parameters
stream Stream Stream
An object derived from the Stream class, such as MemoryStream, that is used to save chart properties.
Remarks
By default, all chart properties with non-default values, which includes data points, will be serialized when this method
is called. To control chart characteristics to be serialized, use the Content, SerializableContent and
NonSerializableContent properties.
If this method is used to save appearance properties as a template, make sure that the IsTemplateMode property of the
ChartSerializer object is first set to true before calling this method.
Serialization of a chart as a template occurs differently from non-template serialization; template serialization
concentrates on Appearance properties.
When a template is serialized, the LoadTemplate method can be used to load the template, to provide the Appearance
properties for a chart.
Templates can be used to simulate custom palettes.
Save(TextWriter) Save(TextWriter)
Saves chart data and properties with non-default values to the given object that is derived from the TextWriter class.
Parameters
writer TextWriter TextWriter
An object derived from TextWriter class, for example, StringWriter, that is used to save chart properties.
Remarks
By default, all chart properties with non-default values, which includes data points, will be serialized when this method
is called. To control which chart characteristics are serialized, use the Content, SerializableContent and
NonSerializableContent properties.
When you use this definition, the format must be XML; the format can be set with the Format property.
Save(String) Save(String)
Saves chart data and properties with non-default values to the given file.
Parameters
fileName String String
The relative or absolute path of the file used to store the serialized data. Note that if a relative path is specified, the path
will be relative to the current directory.
Remarks
By default, all chart properties with non-default values, which includes data points, will be serialized when this method
is called. To control chart characteristics to be serialized use the Content, SerializableContent and
NonSerializableContent properties.
By default data is saved in an XML format. To save the data in a binary format, use the Format property.
Note that Write permissions must be enabled for the directory in which the file is stored. By default, this is the Bin
folder of the application.
If this method is being used to save Appearance properties as a template, make sure that the IsTemplateMode
property is first set to true before calling this method.
Serialization of a chart as a template proceeds differently from non-template serialization, primarily because template
serialization concentrates on Appearance properties.
When a template is serialized, the LoadTemplate method can be used to load the template, to provide the Appearance
properties for a chart.
Templates can be used to simulate custom palettes.
ChartSerializer.SerializableContent ChartSerializer.
SerializableContent
I n this Article
Gets or sets the chart properties that can be serialized.
Returns
String String
A comma-separated string expression that represents the chart properties to be serialized. The syntax is
"Class.Property[,Class.Property]".
Remarks
By default all chart properties will be serialized when the Save and Load methods are called. You can use the
NonSerializableContent property to limit chart characteristics to be serialized, along with the SerializableContent and
Content properties.
The SerializableContent property determines which chart characteristics will be serialized. Wildcards can be used in the
string expression, in the same manner as the NonSerializableContent property. For example, to serialize all chart
BackColor properties, set this property to "*.BackColor".
If ChartArea and/or Series child properties are specified, then the names of all ChartArea and Series objects must be
also specified to enable the persisted data to be applied to existing ChartArea and Series objects; that is, you must
specify "Series.Name" and "ChartArea.Name" expressions. See the sample code below for an example of this
procedure. Similarly, if multiple chart areas are being used, the ChartArea property of all plotted Series must also be
saved.
Sometimes, a property can be set to be both serialized and not serialized, which is common when wildcards are used.
The NonSerializableContent expression has a lower priority when compared to the SerializableContent expression.
However, note that less weight is given to string expressions that use wildcards. For example, if the SerializableContent
property is set to "*.BackColor" and the NonSerializableContent property is set to BackColor, all B ackColor properties
except for ChartArea objects will be serialized.
If you set the Content property, the SerializableContent property will be set internally. If the Content property is
already set but another property needs to be serialized, make sure to concatenate the SerializableContent property
when specifying that extra property. See the sample code below for an example of this procedure.
This property affects all save, load and reset operations.
ChartValueType ChartValueType Enum
Specifies value types for various chart properties.
D eclaration
public enum ChartValueType
type ChartValueType =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Fields
Auto Auto Property type is set automatically by the Chart control.
D eclaration
public enum CompareMethod
type CompareMethod =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The CompareMethod enumeration represents a comparison type for certain filtering operations.
Note
By default, if the filtering criteria are met, a data point is either removed or marked as empty. However, data points can
be filtered even if they do not match the filtering criteria, by setting the FilterMatchedPoints property to false .
Fields
EqualTo EqualTo If the data point value is equal to the compared value, the point is filtered.
LessThan LessThan If the data point value is less than the compared value, the point is filtered.
LessThanOrEqualTo If the data point value is less than or equal to the compared value, the point is
LessThanOrEqualTo filtered.
MoreThan MoreThan If the data point value is more than the compared value, the point is filtered.
MoreThanOrEqualTo If the data point value more than or equal to the compared value, the point is
MoreThanOrEqualTo filtered.
NotEqualTo NotEqualTo If the data point value is not equal to the compared value, the point is filtered.
Cursor Cursor Class
Represents a horizontal or vertical line that defines a position along an axis.
D eclaration
public class Cursor : IDisposable
type Cursor = class
interface IDisposable
I nheritance H ierarchy
Object Object
Remarks
A cursor is a horizontal or vertical line that defines a position along an axis. A range selection is a range along an axis
that is defined by a beginning and end position, and is displayed using a semi-transparent color.
Cursors and range selections are both implemented by the Cursor class, which is exposed as the CursorX and CursorY
properties of the ChartArea object. The CursorX object is for the X axis of a chart area, and the CursorY object is for the
Y axis. The AxisType property of these objects determines whether the associated axis is primary or secondary.
The only cursor and range selection functionality found outside the Cursor class are the events related to the cursor
and range selection that are in the root Chart object.
Constructors
Cursor()
Cursor()
Properties
AutoScroll
AutoScroll
Gets or sets a flag that determines whether scrolling will occur if a range selection operation extends beyond a
boundary of the chart area.
AxisType
AxisType
Gets or sets the type of axis that the cursor is attached to.
Interval
Interval
Gets or sets the interval offset, which affects where the cursor and range selection can be drawn when they are set
by a user.
IntervalOffsetType
IntervalOffsetType
Gets or sets the interval offset type of a cursor and selected range for an axis.
IntervalType
IntervalType
Gets or sets the interval type for the cursor and selected range of an axis.
IsUserEnabled
IsUserEnabled
Gets or sets a flag that enables or disables the cursor user interface.
IsUserSelectionEnabled
IsUserSelectionEnabled
Gets or sets a flag that enables or disables the range selection user interface.
LineColor
LineColor
LineDashStyle
LineDashStyle
LineWidth
LineWidth
Position
Position
SelectionEnd
SelectionEnd
SelectionStart
SelectionStart
Methods
Dispose()
Dispose()
Dispose(Boolean)
Dispose(Boolean)
SetCursorPixelPosition(PointF, Boolean)
SetCursorPixelPosition(PointF, Boolean)
SetCursorPosition(Double)
SetCursorPosition(Double)
Sets the position of a cursor within a chart area at the specified axis value.
SetSelectionPosition(Double, Double)
SetSelectionPosition(Double, Double)
Sets the position of a selected range within a chart area at the specified axis values.
Cursor.AutoScroll Cursor.AutoScroll
I n this Article
Gets or sets a flag that determines whether scrolling will occur if a range selection operation extends beyond a
boundary of the chart area.
[System.ComponentModel.Bindable(true)]
public bool AutoScroll { get; set; }
member this.AutoScroll : bool with get, set
Returns
Boolean Boolean
true if the data view can be scrolled automatically; otherwise, false .
Attributes BindableAttribute
Remarks
If a data view does not display all data points in a plotted series and a range is being selected by the user, automatic
scrolling of the view will occur if this property is true and the mouse - and therefore the cursor - is moved outside the
chart area boundary.
Scrolling will only occur along an axis if there is more data available to be viewed.
A data view that does not display all data usually results if the end-user zooms into a subset of data. Views and
zooming are implemented by the AxisScaleView class.
Cursor.AxisType Cursor.AxisType
I n this Article
Gets or sets the type of axis that the cursor is attached to.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.AxisType AxisType { get; set; }
member this.AxisType : System.Windows.Forms.DataVisualization.Charting.AxisType with get, set
Returns
AxisType AxisType
An AxisType enumeration value that represents whether the axis is attached to the primary or secondary axis.
Attributes BindableAttribute
Remarks
There are two sets of axes: primary and secondary. Primary axes for all charts except the bar charts are located at the
bottom (primary X-axis) and left (primary Y -axis) border of the chart area.
The secondary axes are located at the right (secondary X-axis) and top (secondary Y -axis) border of the chart area.
Note
If all series plotted within a chart area use only one type of axis (for example, the primary X-axis), then setting this
property to an axis type not used by the series (in this case, the secondary X-axis) will have no effect; the cursor will
automatically be attached to the only axis being used to plot the series.
Cursor
I n this Article
Initializes a new instance of the Cursor class.
public Cursor ();
Cursor.Dispose Cursor.Dispose
I n this Article
Overloads
Dispose() Dispose()
Performs application-defined tasks that free, release, or reset
unmanaged resources.
Dispose(Boolean) Dispose(Boolean)
Releases unmanaged and, optionally, managed resources.
Dispose() Dispose()
Performs application-defined tasks that free, release, or reset unmanaged resources.
public void Dispose ();
abstract member Dispose : unit -> unit
override this.Dispose : unit -> unit
Dispose(Boolean) Dispose(Boolean)
Releases unmanaged and, optionally, managed resources.
protected virtual void Dispose (bool disposing);
abstract member Dispose : bool -> unit
override this.Dispose : bool -> unit
Parameters
disposing Boolean Boolean
true to release both unmanaged and managed resources; false to release only unmanaged resources.
Cursor.Interval Cursor.Interval
I n this Article
Gets or sets the cursor interval.
[System.ComponentModel.Bindable(true)]
public double Interval { get; set; }
member this.Interval : double with get, set
Returns
Double Double
The cursor interval.
Attributes BindableAttribute
Remarks
The Interval property determines how often and where a cursor can be drawn by an end user, as well as where the
beginning and end points of a range selection can be drawn. A value of zero, which is the default value, signifies that a
cursor or range selection can be drawn anywhere within a chart area. A nonzero value signifies that the cursor or
beginning and/or end points of a selected range will only be drawn at the specified interval when set by user
interaction.
The unit of measurement is determined by the IntervalType property.
This property can also be used in conjunction with the IntervalOffset property, which allows you to specify an offset
from the specified interval. For example, to allow a cursor to only be displayed every Saturday, an interval of 1 week
should be specified, along with an interval offset of 6 days. In .NET Framework, Sunday is considered to be the first day
of the week.
If the cursor user interface is enabled by setting the IsUserEnabled property, and the mouse is clicked inside a chart
area, the position of the cursor will be set to the nearest allowable location.
Im p o rt a nt
The Interval property has no effect if you set the position of a cursor or range selection programmatically.
Cursor.IntervalOffset Cursor.IntervalOffset
I n this Article
Gets or sets the interval offset, which affects where the cursor and range selection can be drawn when they are set by a
user.
[System.ComponentModel.Bindable(true)]
public double IntervalOffset { get; set; }
member this.IntervalOffset : double with get, set
Returns
Double Double
The offset from the interval. The default value is zero, which signifies no limitations, and negative values are allowed.
Attributes BindableAttribute
Remarks
The IntervalOffset property determines the interval offset of a cursor and the beginning and/or end points of a range
selection. In conjunction with the Interval property, this property determines where a cursor and range can be
displayed within a chart area. A value of zero, which is the default, signifies that there is no offset.
The unit of measurement is determined by the IntervalOffsetType property.
The offset affects the locations at which a cursor and the beginning and/or end points of a range selection can be
drawn. For example, to allow a cursor to only be displayed every Saturday, an interval of 1 week should be specified,
along with an interval offset of 6 days. In .NET Framework, Sunday is considered to be the first day of the week.
If the cursor user interface is enabled by setting the IsUserEnabled property, and the mouse is clicked inside a chart
area, the position of the cursor will be set to the nearest allowable location.
Im p o rt a nt
Interval-related properties have no effect when a range selection or cursor position are set programmatically.
Cursor.IntervalOffsetType Cursor.IntervalOffsetType
I n this Article
Gets or sets the interval offset type of a cursor and selected range for an axis.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType IntervalOffsetType {
get; set; }
member this.IntervalOffsetType :
System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType with get, set
Returns
DateTimeIntervalType DateTimeIntervalType
A DateTimeIntervalType enumeration value that determines the unit of measurement for the interval offset.
Attributes BindableAttribute
Remarks
The IntervalOffsetType property determines the type of interval offset, which is specified using the IntervalOffset
property.
If the IntervalOffsetType property is set to Auto, the IntervalType property setting will be used.
Note
Interval-related properties have no effect when a range selection or cursor position are set programmatically.
Cursor.IntervalType Cursor.IntervalType
I n this Article
Gets or sets the interval type for the cursor and selected range of an axis.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType IntervalType { get; set;
}
member this.IntervalType : System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType with
get, set
Returns
DateTimeIntervalType DateTimeIntervalType
The interval type for the cursor and selected range of an axis.
Attributes BindableAttribute
Remarks
The IntervalType property determines the type of interval, which is specified using the Interval property.
If the interval type is Auto, the unit of measurement for the interval is treated as a double , which is equivalent to one
day when DateTime values are specified.
Note
Interval-related properties have no effect when a range selection or cursor position is set programmatically.
If the axis interval type represents a time - for example, hours, minutes, and so forth - then in order to correctly enable
the zooming function, the IntervalType must also be set to a time value. For example, if the
ChartArea1.AxisX.IntervalType is expressed in hours, then the ChartArea1.CursorX.IntervalType could be set to
minutes.
Cursor.IsUserEnabled Cursor.IsUserEnabled
I n this Article
Gets or sets a flag that enables or disables the cursor user interface.
[System.ComponentModel.Bindable(true)]
public bool IsUserEnabled { get; set; }
member this.IsUserEnabled : bool with get, set
Returns
Boolean Boolean
true if the cursor user interface is enabled; otherwise, false .
Attributes BindableAttribute
Cursor.IsUserSelectionEnabled Cursor.IsUserSelection
Enabled
I n this Article
Gets or sets a flag that enables or disables the range selection user interface.
[System.ComponentModel.Bindable(true)]
public bool IsUserSelectionEnabled { get; set; }
member this.IsUserSelectionEnabled : bool with get, set
Returns
Boolean Boolean
true if the range selection user interface is enabled; otherwise, false .
Attributes BindableAttribute
Cursor.LineColor Cursor.LineColor
I n this Article
Gets or sets the cursor line color.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color LineColor { get; set; }
member this.LineColor : System.Drawing.Color with get, set
Returns
Color Color
The line color of the cursor. The default value is Red.
Attributes BindableAttribute TypeConverterAttribute
Cursor.LineDashStyle Cursor.LineDashStyle
I n this Article
Gets or sets the style of the cursor line.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartDashStyle LineDashStyle { get; set; }
member this.LineDashStyle : System.Windows.Forms.DataVisualization.Charting.ChartDashStyle with get,
set
Returns
ChartDashStyle ChartDashStyle
The style of the cursor line.
Attributes BindableAttribute
Cursor.LineWidth Cursor.LineWidth
I n this Article
Gets or sets the line width, in pixels, of a cursor
[System.ComponentModel.Bindable(true)]
public int LineWidth { get; set; }
member this.LineWidth : int with get, set
Returns
Int32 Int32
The line width, in pixels. The default value is one (1).
Attributes BindableAttribute
Remarks
Use this property to specify the line width, in pixels, of a cursor.
Cursor.Position Cursor.Position
I n this Article
Gets or sets the position of a cursor.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.DoubleDa
teNanValueConverter))]
public double Position { get; set; }
member this.Position : double with get, set
Returns
Double Double
The position of a cursor.
Attributes BindableAttribute TypeConverterAttribute
Remarks
This property can be used to get the position of a cursor, as well as to programmatically set the cursor position.
The position is measured as a value of the axis that the cursor belongs to, which is determined by the AxisType
property. For example, if the cursor belongs to the primary X axis, then setting this property to a value of January 1,
2000 will result in the X-axis cursor being drawn at the January 1, 2000 position along the axis. If this axis value does
not exist, the cursor will not be displayed.
Note that if you set this property, the Interval and IntervalOffset properties will have no effect; that is, the cursor will be
displayed at this specified location.
Setting this property will not raise the CursorPositionChanged or CursorPositionChanging events.
Alternatively, the SetCursorPosition and SetCursorPixelPosition methods can be used to set the cursor.
To programmatically remove a cursor, use this property to set the position of the cursor to NaN.
Cursor.SelectionColor Cursor.SelectionColor
I n this Article
Gets or sets a semi-transparent color that highlights a range of data.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color SelectionColor { get; set; }
member this.SelectionColor : System.Drawing.Color with get, set
Returns
Color Color
The color of the highlighted range. The default value is LightGray, with an alpha value of 120.
Attributes BindableAttribute TypeConverterAttribute
Remarks
This property determines the color of the range selection, and can be set to any valid ARGB (alpha, red, green, blue)
value. If an alpha value, which determines the level of transparency, is not provided, a default alpha value of 120 is
used.
The selected color can be set for both the X and Y axis cursors, which is implemented using the CursorX and CursorY
properties of the ChartArea object, respectively. If a range is only selected along the X-axis, the SelectionColor value for
the X-axis cursor is used; if a range is only selected along the Y -axis, the SelectionColor value for the Y -axis cursor is
used. If a range is selected along both axes, the SelectionColor value for the Y -axis cursor is also used for the selected
color.
Cursor.SelectionEnd Cursor.SelectionEnd
I n this Article
Gets or sets the end position of a range selection.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.DoubleDa
teNanValueConverter))]
public double SelectionEnd { get; set; }
member this.SelectionEnd : double with get, set
Returns
Double Double
The end position of a range selection.
Attributes BindableAttribute TypeConverterAttribute
Remarks
A user can select a range within a chart area by clicking on the left mouse button and then dragging the mouse. Note
that the IsUserSelectionEnabled property must also be set to true . In addition, a range selection can be set
programmatically using either the SelectionEnd and SelectionStart properties, or the SetSelectionPosition or
SetSelectionPixelPosition methods.
The end position of a range selection is calculated as a value of the axis to which the cursor belongs. For example, if the
cursor belongs to the primary X-axis, and you set the SelectionEnd property to a value of December 31, 2000, the end
of the selected area will occur at December 31, 2000 along the primary X axis.
To programmatically remove a range selection, set the beginning and end points of the range to NaN using the
SelectionEnd and SelectionStart properties, or use the SetSelectionPosition method.
Cursor.SelectionStart Cursor.SelectionStart
I n this Article
Gets or sets the start position of a cursor's selected range.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.DoubleDa
teNanValueConverter))]
public double SelectionStart { get; set; }
member this.SelectionStart : double with get, set
Returns
Double Double
The start position of a cursor's selected range.
Attributes BindableAttribute TypeConverterAttribute
Remarks
A user can select a range by clicking on the left mouse button and then moving the cursor position by dragging the
mouse. Note that the IsUserSelectionEnabled property must also be set to true . In addition, a range selection can be
set programmatically using either the SelectionEnd and SelectionStart properties, or the SetSelectionPosition or
SetSelectionPixelPosition methods.
The start position of a range selection is calculated as a value of the axis to which the cursor belongs. For example, if
the cursor belongs to the primary X-axis, and you set the SelectionStart property to a value of January 1, 2000, the
beginning of the selected area will occur at January 1, 2000 along the primary X axis.
To programmatically remove a range selection, set the beginning and end points of the range to NaN using the
SelectionEnd and SelectionStart properties, or use the SetSelectionPosition method.
Cursor.SetCursorPixelPosition Cursor.SetCursorPixel
Position
I n this Article
Displays a cursor at the specified position. Measured in pixels.
Parameters
point PointF PointF
A PointF structure that specifies where the cursor will be drawn.
roundToBoundary Boolean Boolean
If true , the cursor will be drawn along the nearest chart area boundary, if the specified position does not fall within a
ChartArea object.
Cursor.SetCursorPosition Cursor.SetCursorPosition
I n this Article
Sets the position of a cursor within a chart area at the specified axis value.
public void SetCursorPosition (double newPosition);
member this.SetCursorPosition : double -> unit
Parameters
newPosition Double Double
The new position of the cursor. Measured as a value along the relevant axis.
Cursor.SetSelectionPixelPosition Cursor.SetSelectionPixel
Position
I n this Article
Sets the start and end positions of a range selection.
Parameters
startPoint PointF PointF
A PointF structure that specifies where the range selection begins.
endPoint PointF PointF
A PointF structure that specifies where the range selection ends.
roundToBoundary Boolean Boolean
If true , the start and end points will be rounded to the nearest chart area boundary if the specified positions do not
fall within a ChartArea object.
Cursor.SetSelectionPosition Cursor.SetSelectionPosition
I n this Article
Sets the position of a selected range within a chart area at the specified axis values.
public void SetSelectionPosition (double newStart, double newEnd);
member this.SetSelectionPosition : double * double -> unit
Parameters
newStart Double Double
The new start position of the range selection. Measured as a value along the relevant axis.
newEnd Double Double
The new end position of the range selection. Measured as a value along the relevant axis.
CursorEventArgs CursorEventArgs Class
Provides properties that are used with the following events in the root Chart object: CursorPositionChanged,
CursorPositionChanging, SelectionRangeChanged and SelectionRangeChanging.
D eclaration
public class CursorEventArgs : EventArgs
type CursorEventArgs = class
inherit EventArgs
I nheritance H ierarchy
Object Object
EventArgs EventArgs
Remarks
The CursorEventArgs class is exposed as the e parameter in the CursorPositionChanged, CursorPositionChanging,
SelectionRangeChanged and SelectionRangeChanging events of the root Chart object.
This class contains the following properties:
The ChartArea property, which is used to get the ChartArea object that the event was raised for. The Name property
gets the name of the chart area; other chart area properties can also be set.
The Axis property, which is used to get the Axis object that the event was raised for. To determine the type of axis - X,
X2, Y or Y2 - use the AxisName property. Other axis properties can also be set.
The NewPosition property, which represents the position of a cursor along an axis, measured as an axis value, at the
time the event was raised. The NewPosition property can be used to get the position of a cursor. In the
CursorPositionChanging event, this property can also be used to reset the cursor position.
The NewSelectionStart property, which represents the starting position of a range selection along an axis, measured as
an axis value, at the time the event was raised. The NewSelectionStart property can be used to get the selected range
start position. In the SelectionRangeChanging event, this property can also be used to reset the position.
The NewSelectionEnd property, which represents the end position of a range selection along an axis, measured as an
axis value, at the time the event was raised. The NewSelectionEnd property can be used to get the selected range end
position. In the SelectionRangeChanging event, this property can also be used to reset the position.
Constructors
CursorEventArgs(ChartArea, Axis, Double)
CursorEventArgs(ChartArea, Axis, Double)
Initializes a new instance of the CursorEventArgs class with the specified chart area, axis, and cursor position.
Initializes a new instance of the CursorEventArgs class with the specified chart area, axis, start and end positions
for the new range.
Properties
Axis
Axis
Gets the Axis object that a cursor or range selection belongs to.
ChartArea
ChartArea
Gets the ChartArea object that a cursor or range selection belongs to.
NewPosition
NewPosition
Gets or sets the position of a cursor. Depending on the event, also sets the cursor's position.
NewSelectionEnd
NewSelectionEnd
Gets or sets the end position of a selected range. Depending on the event, also sets the end position of the range.
NewSelectionStart
NewSelectionStart
Gets or sets the start position of a selected range. Depending on the event, also sets the start position of the range.
CursorEventArgs.Axis CursorEventArgs.Axis
I n this Article
Gets the Axis object that a cursor or range selection belongs to.
public System.Windows.Forms.DataVisualization.Charting.Axis Axis { get; }
member this.Axis : System.Windows.Forms.DataVisualization.Charting.Axis
Returns
Axis Axis
An Axis object that represents the axis that a cursor or range selection belongs to.
Remarks
The Axis property is exposed in the following events of the root Chart object: CursorPositionChanged,
CursorPositionChanging, SelectionRangeChanged and SelectionRangeChanging.
This property can be used to:
determine the type of axis - X, X2, Y or Y2 - that the event is being raised for, using the AxisName property.
get and set axis properties, such as LineColor.
CursorEventArgs.ChartArea CursorEventArgs.ChartArea
I n this Article
Gets the ChartArea object that a cursor or range selection belongs to.
public System.Windows.Forms.DataVisualization.Charting.ChartArea ChartArea { get; }
member this.ChartArea : System.Windows.Forms.DataVisualization.Charting.ChartArea
Returns
ChartArea ChartArea
An object of type ChartArea that represents the chart area that a range selection or cursor belongs to.
Remarks
The ChartArea property is exposed in the following events of the root Chart object: CursorPositionChanged,
CursorPositionChanging, SelectionRangeChanged and SelectionRangeChanging.
This property can be used to:
determine which chart area the event is being raised for; this is useful to know when there are multiple chart areas
within a chart image.
get and set chart area properties, such as BackColor.
CursorEventArgs CursorEventArgs
I n this Article
Overloads
CursorEventArgs(ChartArea, Axis, Double) CursorEventArgs(
ChartArea, Axis, Double) Initializes a new instance of the CursorEventArgs class with the
specified chart area, axis, and cursor position.
Parameters
chartArea ChartArea ChartArea
The ChartArea of the cursor.
axis Axis Axis
The axis of the cursor.
newPosition Double Double
The new cursor position.
Returns
Double Double
A double value that represents the position of a cursor along an axis.
Remarks
This property represents the new position of a cursor, and can be used in the CursorPositionChanging and
CursorPositionChanged events to get the cursor position. It can also be used in the SelectionRangeChanging event to
set the cursor position.
Note that setting this property in the SelectionRangeChanging event will have no effect. The NewPosition property
will have a value of NaN in this event.
To determine the chart area that the event is being raised for, use the ChartArea property.
Use the Axis property to determine if this end position is for a range selected along the primary or secondary X or Y
axis.
CursorEventArgs.NewSelectionEnd CursorEventArgs.New
SelectionEnd
I n this Article
Gets or sets the end position of a selected range. Depending on the event, also sets the end position of the range.
Returns
Double Double
A double value that represents the end position of a selected range.
Remarks
The NewSelectionEnd property represents the new position of a cursor, and can be used in the
CursorPositionChanging and CursorPositionChanged events to get the cursor position. It can also be used in the
SelectionRangeChanging event to set the cursor position.
Note that setting this property in the SelectionRangeChanging event will have no effect. The NewSelectionEnd
property will have a value of NaN in this event.
The start position of a selected range is not necessarily less than the end position of a selected range. The start position
is the position where the user fist clicked within the chart area, and the end position is the position of the mouse at the
time the event is raised.
To determine the chart area that the event is being raised for use the ChartArea property.
Use the Axis property to determine if this end position is for a range selected along the primary or secondary X or Y
axis.
CursorEventArgs.NewSelectionStart CursorEventArgs.
NewSelectionStart
I n this Article
Gets or sets the start position of a selected range. Depending on the event, also sets the start position of the range.
Returns
Double Double
A double value that represents the start position of a selected range.
Remarks
The NewSelectionStart property represents the new position of a cursor, and can be used in the
CursorPositionChanging and CursorPositionChanged events to get the cursor position. It can also be used in the
CursorPositionChanging event to set the cursor position.
Note that setting this property in the CursorPositionChanging event will have no effect; the NewSelectionStart
property will have a value of NaN in this event.
The start position of a selected range is not necessarily less than the end position of a selected range. The start position
is the position where the user fist clicked within the chart area, and the end position is the position of the mouse at the
time the event is raised.
To determine the chart area that the event is being raised for, use the ChartArea property.
Use the Axis property to determine if this end position is for a range selected along the primary or secondary X or Y
axis.
CustomizeLegendEventArgs CustomizeLegendEventArgs
Class
Provides data for the CustomizeLegend event of the Chart control.
D eclaration
public class CustomizeLegendEventArgs : EventArgs
type CustomizeLegendEventArgs = class
inherit EventArgs
I nheritance H ierarchy
Object Object
EventArgs EventArgs
Remarks
The CustomizeLegendEventArgs class is used in the CustomizeLegend event.
There are only two properties in this class. The LegendItems property allows you to delete or modify both default and
custom legend items, and to add custom legend items. This property can also be used to change the order of legend
items.
The LegendName property is used to identify the legend that raised this event.
Constructors
CustomizeLegendEventArgs(LegendItemsCollection)
CustomizeLegendEventArgs(LegendItemsCollection)
Initializes a new instance of the CustomizeLegendEventArgs class with the specified LegendItemsCollection.
CustomizeLegendEventArgs(LegendItemsCollection, String)
CustomizeLegendEventArgs(LegendItemsCollection, String)
Initializes a new instance of the CustomizeLegendEventArgs class with the specified LegendItemsCollection and
legend name.
Properties
LegendItems
LegendItems
Used to remove, modify or change the order of both custom and default legend items in the CustomizeLegend
event. Can also be used to add custom legend items.
LegendName
LegendName
Gets the name of the Legend object, which can be used to determine which legend was the sender of the
CustomizeLegend event.
CustomizeLegendEventArgs CustomizeLegendEventArgs
I n this Article
Overloads
CustomizeLegendEventArgs(LegendItemsCollection)
CustomizeLegendEventArgs(LegendItemsCollection) Initializes a new instance of the CustomizeLegendEventArgs
class with the specified LegendItemsCollection.
CustomizeLegendEventArgs(LegendItemsCollection, String)
CustomizeLegendEventArgs(LegendItemsCollection, String) Initializes a new instance of the CustomizeLegendEventArgs
class with the specified LegendItemsCollection and legend
name.
CustomizeLegendEventArgs(LegendItemsCollection)
CustomizeLegendEventArgs(LegendItemsCollection)
Initializes a new instance of the CustomizeLegendEventArgs class with the specified LegendItemsCollection.
public CustomizeLegendEventArgs
(System.Windows.Forms.DataVisualization.Charting.LegendItemsCollection legendItems);
new System.Windows.Forms.DataVisualization.Charting.CustomizeLegendEventArgs :
System.Windows.Forms.DataVisualization.Charting.LegendItemsCollection ->
System.Windows.Forms.DataVisualization.Charting.CustomizeLegendEventArgs
Parameters
legendItems LegendItemsCollection LegendItemsCollection
The LegendItemsCollection.
CustomizeLegendEventArgs(LegendItemsCollection, String)
CustomizeLegendEventArgs(LegendItemsCollection, String)
Initializes a new instance of the CustomizeLegendEventArgs class with the specified LegendItemsCollection and
legend name.
public CustomizeLegendEventArgs
(System.Windows.Forms.DataVisualization.Charting.LegendItemsCollection legendItems, string
legendName);
new System.Windows.Forms.DataVisualization.Charting.CustomizeLegendEventArgs :
System.Windows.Forms.DataVisualization.Charting.LegendItemsCollection * string ->
System.Windows.Forms.DataVisualization.Charting.CustomizeLegendEventArgs
Parameters
legendItems LegendItemsCollection LegendItemsCollection
The LegendItemsCollection.
legendName String String
The legend name.
CustomizeLegendEventArgs.LegendItems Customize
LegendEventArgs.LegendItems
I n this Article
Used to remove, modify or change the order of both custom and default legend items in the CustomizeLegend event.
Can also be used to add custom legend items.
public System.Windows.Forms.DataVisualization.Charting.LegendItemsCollection LegendItems { get; }
member this.LegendItems : System.Windows.Forms.DataVisualization.Charting.LegendItemsCollection
Returns
LegendItemsCollection LegendItemsCollection
A LegendItemsCollection object.
Remarks
The LegendItems property allows you to delete or modify both default and custom legend items in the
CustomizeLegend event, and to add custom legend items. The order of legend items can also be changed.
Note
The SeriesPointIndex and SeriesName properties can be used to determine the data element that is associated with a
default legend item. These properties will return zero-length strings for custom legend items, because custom items
are not associated with chart data.
This property enables you to determine which Legend the event was raised for, which enables you to customize an
individual Legend.
CustomizeLegendEventArgs.LegendName Customize
LegendEventArgs.LegendName
I n this Article
Gets the name of the Legend object, which can be used to determine which legend was the sender of the
CustomizeLegend event.
public string LegendName { get; }
member this.LegendName : string
Returns
String String
A string value that represents the name of the associated Legend object.
CustomLabel CustomLabel Class
Represents a custom label for an axis.
D eclaration
public class CustomLabel : System.Windows.Forms.DataVisualization.Charting.ChartNamedElement
type CustomLabel = class
inherit ChartNamedElement
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
Remarks
CustomLabel objects are stored in the CustomLabelsCollection class, which is exposed as the CustomLabels property
of the Axis class.
Axis labels for the first label row are automatically generated unless custom labels are specified using the
CustomLabels property. If you specify a custom label along the first label row, no axis labels will be automatically
generated for the entire first row.
Only custom labels may be used for the second label row.
The ToPosition and FromPosition properties determine the axis range that the label applies to.
A grid line and/or tick mark can be displayed for a custom axis label by using the GridTicks property; this property
specifies whether a custom grid line or tick mark will be drawn in the middle of the label range.
Constructors
CustomLabel()
CustomLabel()
Initializes a new instance of the CustomLabel class with the specified fromPosition , toPosition , text ,
labelRow , and markStyle parameters.
Initializes a new instance of the CustomLabel class with the specified fromPosition , toPosition , text ,
labelRow , markStyle and gridTick parameters.
Properties
Axis
Axis
ForeColor
ForeColor
FromPosition
FromPosition
Gets or sets the beginning position, in axis coordinates, of the custom label.
GridTicks
GridTicks
Gets or sets a property that specifies whether custom tick marks and grid lines will be drawn in the center of the
label.
Image
Image
ImageTransparentColor
ImageTransparentColor
Gets or sets a color that will be replaced with a transparent color when a custom label image is drawn.
LabelMark
LabelMark
Gets or sets the label mark for a custom label. This applies to labels in rows other than the first row.
MarkColor
MarkColor
Name
Name
Gets or sets the name of the custom label.
RowIndex
RowIndex
Text
Text
ToolTip
ToolTip
ToPosition
ToPosition
Gets or sets the starting position of the custom label, in axis coordinates.
Methods
Clone()
Clone()
Returns
Axis Axis
An Axis object that represents the axis that this CustomLabel object belongs to.
Attributes BrowsableAttribute
Remarks
Use this method to determine which Axis object the CustomLabel object belongs to.
CustomLabel.Clone CustomLabel.Clone
I n this Article
Returns a cloned label object.
public System.Windows.Forms.DataVisualization.Charting.CustomLabel Clone ();
member this.Clone : unit -> System.Windows.Forms.DataVisualization.Charting.CustomLabel
Returns
CustomLabel CustomLabel
A CustomLabel object that represents a copy of the current custom label.
CustomLabel CustomLabel
I n this Article
Overloads
CustomLabel()
Creates a new instance of the CustomLabel class.
CustomLabel()
Creates a new instance of the CustomLabel class.
public CustomLabel ();
Remarks
This constructor can be used to create and initialize a new instance of the CustomLabel class.
However, it is recommended that you use one of the Add methods in the CustomLabelsCollection class to add custom
labels.
public CustomLabel (double fromPosition, double toPosition, string text, int labelRow,
System.Windows.Forms.DataVisualization.Charting.LabelMarkStyle markStyle);
new System.Windows.Forms.DataVisualization.Charting.CustomLabel : double * double * string * int *
System.Windows.Forms.DataVisualization.Charting.LabelMarkStyle ->
System.Windows.Forms.DataVisualization.Charting.CustomLabel
Parameters
fromPosition Double Double
The beginning of the axis range the label applies to.
toPosition Double Double
The end of the axis range the label applies to.
text String String
The label text.
labelRow Int32 Int32
The label row index.
markStyle LabelMarkStyle LabelMarkStyle
The label mark style.
public CustomLabel (double fromPosition, double toPosition, string text, int labelRow,
System.Windows.Forms.DataVisualization.Charting.LabelMarkStyle markStyle,
System.Windows.Forms.DataVisualization.Charting.GridTickTypes gridTick);
new System.Windows.Forms.DataVisualization.Charting.CustomLabel : double * double * string * int *
System.Windows.Forms.DataVisualization.Charting.LabelMarkStyle *
System.Windows.Forms.DataVisualization.Charting.GridTickTypes ->
System.Windows.Forms.DataVisualization.Charting.CustomLabel
Parameters
fromPosition Double Double
The beginning of the axis range the label applies to.
toPosition Double Double
The end of the axis range the label applies to.
text String String
The label text.
labelRow Int32 Int32
The label row index.
markStyle LabelMarkStyle LabelMarkStyle
The label mark style.
gridTick GridTickTypes GridTickTypes
The custom grid line and/or tick marks flag.
CustomLabel.ForeColor CustomLabel.ForeColor
I n this Article
Gets or sets the text color of the custom label.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color ForeColor { get; set; }
member this.ForeColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that represents the text color of a custom label.
Attributes BindableAttribute TypeConverterAttribute
Remarks
The ForeColor property determines the text color for a custom label.
CustomLabel.FromPosition CustomLabel.FromPosition
I n this Article
Gets or sets the beginning position, in axis coordinates, of the custom label.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.AxisLabe
lDateValueConverter))]
public double FromPosition { get; set; }
member this.FromPosition : double with get, set
Returns
Double Double
A double value that represents the beginning of the axis range that the label is applied to.
Attributes BindableAttribute TypeConverterAttribute
Remarks
The FromPosition property determines the start position of the axis range the label is applied to.
The difference between the values of the ToPosition and FromPosition properties determines where the label text will
be displayed. For example, suppose the X-axis has a scale that ranges from 1 to 5 (1, 2 ,3 , 4, 5). In order to display a
custom label just underneath the second point, you would set the ToPosition property to 1.5 and the FromPosition
property to 2.5.
If the XValueType - or YValueType, depending on the axis in question - is set to a DateTime value, then this
FromPosition property will be displayed as a DateTime value in the designer.
This property should not be set to the same value as the ToPosition property.
CustomLabel.GridTicks CustomLabel.GridTicks
I n this Article
Gets or sets a property that specifies whether custom tick marks and grid lines will be drawn in the center of the label.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.GridTickTypes GridTicks { get; set; }
member this.GridTicks : System.Windows.Forms.DataVisualization.Charting.GridTickTypes with get, set
Returns
GridTickTypes GridTickTypes
A GridTickTypes enumeration value that specifies whether custom tick marks and grid lines will be drawn in the center
of the label.
Attributes BindableAttribute
CustomLabel.Image CustomLabel.Image
I n this Article
Gets or sets the custom label image.
[System.ComponentModel.Bindable(true)]
public string Image { get; set; }
member this.Image : string with get, set
Returns
String String
A string value that represents the name of the custom label image.
Attributes BindableAttribute
CustomLabel.ImageTransparentColor CustomLabel.
ImageTransparentColor
I n this Article
Gets or sets a color that will be replaced with a transparent color when a custom label image is drawn.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color ImageTransparentColor { get; set; }
member this.ImageTransparentColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value which is replaced with a transparent color when a custom label image is drawn. The default value is
Magenta.
Attributes BindableAttribute TypeConverterAttribute
CustomLabel.LabelMark CustomLabel.LabelMark
I n this Article
Gets or sets the label mark for a custom label. This applies to labels in rows other than the first row.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.LabelMarkStyle LabelMark { get; set; }
member this.LabelMark : System.Windows.Forms.DataVisualization.Charting.LabelMarkStyle with get, set
Returns
LabelMarkStyle LabelMarkStyle
A LabelMarkStyle enumeration value that determines the type of label mark, if any, to be used.
Attributes BindableAttribute
Remarks
Label marks can only be used for the second row of labels, and are usually used to group labels together from the first
row.
The major tick mark's line style of the relevant Axis object is used for the line pattern of the mark, for example, the
AxisX.MajorTickMark.LineDashStyle property.
CustomLabel.MarkColor CustomLabel.MarkColor
I n this Article
Gets or sets the marker color for the custom label.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color MarkColor { get; set; }
member this.MarkColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that represents the marker color of a custom label.
Attributes BindableAttribute TypeConverterAttribute
Remarks
The MarkColor property determines the color of a custom label's marker.
CustomLabel.Name CustomLabel.Name
I n this Article
Gets or sets the name of the custom label.
public override string Name { get; set; }
member this.Name : string with get, set
Returns
String String
A string value that represents the text name of the custom label.
Remarks
A string value that represents the text name of the item.
CustomLabel.RowIndex CustomLabel.RowIndex
I n this Article
Gets or sets the index of the custom label row.
[System.ComponentModel.Bindable(true)]
public int RowIndex { get; set; }
member this.RowIndex : int with get, set
Returns
Int32 Int32
An integer value that specifies the index, 0 to 10, of the custom label row.
Attributes BindableAttribute
Remarks
The RowIndex property specifies the index of the row label where zero is the row label closest to the axis to ten, the
further most axis label.
Only custom labels can be used for the label rows beyond the first row.
If a custom label is used for the first row, labels for that entire axis will not be generated automatically; in this case, all
labels for the first row must then be custom labels.
CustomLabel.Text CustomLabel.Text
I n this Article
Gets or sets the custom label text.
[System.ComponentModel.Bindable(true)]
public string Text { get; set; }
member this.Text : string with get, set
Returns
String String
A string value that represents the label text.
Attributes BindableAttribute
Remarks
The Text property gets or sets the label text of the CustomLabel object.
Note that axis labels for the first label row are generated automatically, but can be overridden using CustomLabel
objects. If you specify a custom label along the first axis row, no axis labels will be automatically generated for the
entire first row.
CustomLabel.ToolTip CustomLabel.ToolTip
I n this Article
Gets or sets the custom label tooltip text.
[System.ComponentModel.Bindable(true)]
public string ToolTip { get; set; }
member this.ToolTip : string with get, set
Returns
String String
A string that represents the tooltip text.
Attributes BindableAttribute
CustomLabel.ToPosition CustomLabel.ToPosition
I n this Article
Gets or sets the starting position of the custom label, in axis coordinates.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.AxisLabe
lDateValueConverter))]
public double ToPosition { get; set; }
member this.ToPosition : double with get, set
Returns
Double Double
A double value that represents the starting position.
Attributes BindableAttribute TypeConverterAttribute
CustomLabelsCollection CustomLabelsCollection Class
Represents a collection of CustomLabel objects.
D eclaration
public class CustomLabelsCollection :
System.Windows.Forms.DataVisualization.Charting.ChartElementCollection<System.Windows.Forms.Data
Visualization.Charting.CustomLabel>
type CustomLabelsCollection = class
inherit ChartElementCollection<CustomLabel>
I nheritance H ierarchy
Object Object
Collection<T> Collection<T>
ChartElementCollection<T> ChartElementCollection<T>
Remarks
The CustomLabelsCollection class represents a collection of CustomLabel objects, which in turn represent the custom
labels that an Axis object can use. This class is exposed as the CustomLabels collection property of an Axis object.
Note
You can automatically populate the entire label row of an axis with custom DateTime labels using any Add method
definition that includes a DateTimeIntervalType argument.
The Count property indicates the total number of items in the collection and is commonly used to find the upper
bound of the collection.
Methods
Add(Double, DateTimeIntervalType)
Add(Double, DateTimeIntervalType)
Adds multiple CustomLabel objects of type DateTime to the collection. Populates the entire first row of an axis
with labels.
Adds a CustomLabel object to the collection, using the given axis range and text.
Adds multiple DateTimeCustomLabelsCollection objects to the collection. Populates the entire first row of an axis
with labels with the specified format.
Adds a custom label to the collection, using the given axis range, text, row index and marking style.
Adds multiple custom labels to the collection. The labels will be DateTime labels with the specified interval type,
text format, row index and marking style.
Adds a custom label to the collection, using the given axis range, text, row index, marking style and grid tick type.
Adds multiple custom labels to the collection. The labels will be DateTime labels with the specified interval type,
and will be generated for the axis range that is determined by the min and max arguments.
CustomLabelsCollection.Add CustomLabelsCollection.
Add
I n this Article
Overloads
Add(Double, DateTimeIntervalType) Add(Double, DateTime
IntervalType) Adds multiple CustomLabel objects of type DateTime to the
collection. Populates the entire first row of an axis with labels.
Parameters
labelsStep Double Double
A Double value that determines how often the custom labels will be drawn.
intervalType DateTimeIntervalType DateTimeIntervalType
A DateTimeIntervalType enumeration value that determines the interval type.
Remarks
The Add method creates and initializes CustomLabel objects for the entire first label row of an axis with DateTime
labels of the specified type.
The labelsStep parameter determines how often the custom labels will be drawn.
Note
The RecalculateAxesScale method must be called prior to calling this particular method definition.
Parameters
fromPosition Double Double
The minimum value of the axis range to which the label is applied.
toPosition Double Double
The maximum value of the axis range to which the label is applied.
text String String
The label text.
Returns
CustomLabel CustomLabel
The newly added CustomLabel object.
Remarks
Adds one custom label to the first label row of the relevant axis. No label mark is used.
If a custom label is used anywhere in the first label row, no labels are automatically generated for that first row.
Note
The RecalculateAxesScale method must be called prior to calling this particular method definition.
Parameters
labelsStep Double Double
A Double value that determines how often custom labels will be drawn.
The RecalculateAxesScale method must be called prior to calling this particular method definition.
Parameters
fromPosition Double Double
The minimum value of the axis range the label is applied to.
toPosition Double Double
The maximum value of the axis range the label is applied to.
text String String
The label text.
rowIndex Int32 Int32
The label row index.
markStyle LabelMarkStyle LabelMarkStyle
A LabelMarkStyle enumeration value that specifies mark style for the label.
Returns
CustomLabel CustomLabel
The newly added CustomLabel object.
Parameters
labelsStep Double Double
A Double value that determines how often custom labels will be drawn.
Parameters
fromPosition Double Double
The minimum value of the axis range the label is applied to.
toPosition Double Double
The maximum value of the axis range the label is applied to.
text String String
The label text.
rowIndex Int32 Int32
The label row index.
markStyle LabelMarkStyle LabelMarkStyle
A LabelMarkStyle enumeration value that specifies mark style for the label.
gridTick GridTickTypes GridTickTypes
A GridTickTypes enumeration value that specifies the grid tick for the label.
Returns
CustomLabel CustomLabel
The newly added CustomLabel object.
Parameters
labelsStep Double Double
A Double value that determines how often custom labels will be drawn.
D eclaration
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.Cust
omPropertiesTypeConverter))]
public class CustomProperties
type CustomProperties = class
I nheritance H ierarchy
Object Object
DataFormula DataFormula Class
Provides properties and methods to prepare series data for technical analysis, apply formulas on the series data and
prepare output data to be displayed as a chart. The actual calculations are performed in the StatisticFormula class.
D eclaration
public class DataFormula
type DataFormula = class
I nheritance H ierarchy
Object Object
Constructors
DataFormula()
DataFormula()
Properties
IsEmptyPointIgnored
IsEmptyPointIgnored
Gets or sets a flag that indicates whether empty points are ignored while performing calculations.
IsStartFromFirst
IsStartFromFirst
Gets or sets a flag that indicates whether to start formulas such as "rolling average" from zero.
Statistics
Statistics
Methods
CopySeriesValues(String, String)
CopySeriesValues(String, String)
FinancialFormula(FinancialFormula, String)
FinancialFormula(FinancialFormula, String)
Calls a method from a formula module with the specified formula name and input series.
FinancialFormula(FinancialFormula, Series)
FinancialFormula(FinancialFormula, Series)
Calls a method from a formula module with the specified formula name and input series.
Calls a method from a formula module with the specified formula name, and the names of the input and output
series.
Calls a method from a formula module with the specified formula name, input and output series.
Calls a method from a formula module with the specified formula name and parameters, and the names of the
input and output series.
Calls a method from a formula module with the specified formula name and parameters, using the specified input
and output series.
DataFormula.CopySeriesValues DataFormula.CopySeries
Values
I n this Article
Copies a series or the specific X or Y value.
Parameters
inputSeries String String
A comma-separated list of input data series names and optional X and Y value names.
outputSeries String String
A comma-separated list of output data series names and optional X and Y value names.
DataFormula
I n this Article
Initializes a new instance of the DataFormula class.
public DataFormula ();
DataFormula.FinancialFormula DataFormula.Financial
Formula
I n this Article
Overloads
FinancialFormula(FinancialFormula, String) FinancialFormula(
FinancialFormula, String) Calls a method from a formula module with the specified
formula name and input series.
FinancialFormula(FinancialFormula, String)
FinancialFormula(FinancialFormula, String)
Calls a method from a formula module with the specified formula name and input series.
public void FinancialFormula (System.Windows.Forms.DataVisualization.Charting.FinancialFormula
formulaName, string inputSeries);
member this.FinancialFormula : System.Windows.Forms.DataVisualization.Charting.FinancialFormula *
string -> unit
Parameters
formulaName FinancialFormula FinancialFormula
The name of the formula to call.
inputSeries String String
The input series in which calculation is performed.
FinancialFormula(FinancialFormula, Series)
FinancialFormula(FinancialFormula, Series)
Calls a method from a formula module with the specified formula name and input series.
public void FinancialFormula (System.Windows.Forms.DataVisualization.Charting.FinancialFormula
formulaName, System.Windows.Forms.DataVisualization.Charting.Series inputSeries);
member this.FinancialFormula : System.Windows.Forms.DataVisualization.Charting.FinancialFormula *
System.Windows.Forms.DataVisualization.Charting.Series -> unit
Parameters
formulaName FinancialFormula FinancialFormula
The name of the formula to call.
inputSeries Series Series
A comma-separated list of input series names and optional X and Y value names.
Parameters
formulaName FinancialFormula FinancialFormula
The name of the formula to call.
inputSeries String String
The input series in which calculation is performed.
outputSeries String String
The output series in which the result of the calculation is stored.
Parameters
formulaName FinancialFormula FinancialFormula
The name of the formula to call.
parameters String String
The parameters associated with the formula.
inputSeries String String
The input series in which calculation is performed.
outputSeries String String
The output series in which the result of the calculation is stored.
Parameters
formulaName FinancialFormula FinancialFormula
The name of the formula to call.
parameters String String
The parameters associated with the formula.
inputSeries Series Series
A comma-separated list of input series names and optional X and Y value names.
outputSeries Series Series
A comma-separated list of output series names and optional X and Y value names.
DataFormula.IsEmptyPointIgnored DataFormula.IsEmpty
PointIgnored
I n this Article
Gets or sets a flag that indicates whether empty points are ignored while performing calculations.
Returns
Boolean Boolean
true if empty points are ignored while performing calculations; false if empty points are treated as zeroes.
DataFormula.IsStartFromFirst DataFormula.IsStartFrom
First
I n this Article
Gets or sets a flag that indicates whether to start formulas such as "rolling average" from zero.
Returns
Boolean Boolean
true if formulas such as "rolling average" start from zero; otherwise, false .
DataFormula.Statistics DataFormula.Statistics
I n this Article
Gets a reference to the StatisticFormula class.
public System.Windows.Forms.DataVisualization.Charting.StatisticFormula Statistics { get; }
member this.Statistics : System.Windows.Forms.DataVisualization.Charting.StatisticFormula
Returns
StatisticFormula StatisticFormula
A reference to the StatisticFormula object.
DataManipulator DataManipulator Class
Provides method that performs data manipulation operations at run time. This class is exposed by the
DataManipulator property of the root Chart object.
D eclaration
public class DataManipulator : System.Windows.Forms.DataVisualization.Charting.DataFormula
type DataManipulator = class
inherit DataFormula
I nheritance H ierarchy
Object Object
DataFormula DataFormula
Constructors
DataManipulator()
DataManipulator()
Properties
FilterMatchedPoints
FilterMatchedPoints
Gets or sets a value that determines whether points are filtered if they match criteria specified in arguments in the
Filter methods of this class.
FilterSetEmptyPoints
FilterSetEmptyPoints
Gets or sets a flag that indicates whether points filtered by the Filter or FilterTopN methods will be removed
or marked as empty.
Methods
ExportSeriesValues()
ExportSeriesValues()
Exports the data for every series stored in the SeriesCollection to the DataSet object.
ExportSeriesValues(String)
ExportSeriesValues(String)
Exports the data from one or more series to the DataSet object.
ExportSeriesValues(Series)
ExportSeriesValues(Series)
Exports the data from the specified series to the DataSet object.
Filters the data points in a series by applying a filtering rule to the specified data point values for comparison.
Filters one or more series by applying a filtering rule to the specified data point values in the first series.
Filters the data points in a series, either by removing the specified points or by marking them as empty for the
specified date/time ranges.
Filters the data points of one or more series, either by removing the specified points or by marking them as empty
for the given date/time ranges.
Filters the data points in a series by applying a filtering rule to the first Y -value of each of the data points.
Filters one or more series by applying a filtering rule to the first Y -value of each of the data points in the first
series.
Filters the data points of one or more series, either by removing the specified points or by marking them as empty
for the given date/time ranges. The filtered Series objects are used to store the modified data.
Filters the data points in a series by applying a filtering rule to the first Y -value of each data point. The Series
object that is filtered also stores the modified data.
Filters one or more series by applying a filtering rule to the first Y -value of the data points in the first series. The
filtered Series objects are used to store the modified data.
Filter(IDataPointFilter, Series)
Filter(IDataPointFilter, Series)
Performs custom filtering on the data points in a series. The Series object that is filtered also stores the modified
data.
Filter(IDataPointFilter, String)
Filter(IDataPointFilter, String)
Performs custom filtering on the data points in one or more series, based on the points of the first series. The
filtered Series objects also store the modified data.
Performs custom filtering on the data points in one or more series, based on the points of the first series.
Filters all data points in one or more series except for a specified number of points. The points that are not filtered
correspond to points in the first input series that have the largest or smallest values.
FilterTopN(Int32, Series, Series, String, Boolean)
FilterTopN(Int32, Series, Series, String, Boolean)
Filters all data points in a series except for a specified number of points with the smallest or largest values.
Filters all data points in one or more series except for a specified number of points. The points that are not filtered
correspond to points in the first series that have the largest values.
Filters all data points in a series except for a specified number of points with the largest values.
Filters all data points in one or more series except for a specified number of points. The points that aren't filtered
correspond to points in the first series that have the largest first Y -values.
FilterTopN(Int32, Series)
FilterTopN(Int32, Series)
Filters all data points in a series except for a specified number of points with the largest first Y -values. The Series
object that is filtered is used to store the modified data.
FilterTopN(Int32, String)
FilterTopN(Int32, String)
Filters all data points in one or more series except for a specified number of points. The points that are not filtered
correspond to points in the first series that have the largest first Y -values. The Series objects that are filtered are
used to store the modified data.
Filters all data points in a series except for a specified number of points with the largest first Y -values.
Groups data points for one or more series, using one or more formulas. Series are cleared of their original data
and used to store the new data points.
Group(String, Double, IntervalType, Series)
Group(String, Double, IntervalType, Series)
Groups data points in a series using one or more formulas. The series that is grouped is cleared of its original data,
and used to store the new data points.
Groups data points for one or more series, using one or more formulas. Output series are used to store the
grouped data points.
Groups data points in a series using one or more formulas. An output series is used to store the grouped data
points.
Groups data points for one or more series, using one or more formulas. Series are cleared of their original data
and used to store the new data points.
Groups data points in a series using one or more formulas. The series that is grouped is cleared of its original data,
and used to store the new data points.
Groups data points for one or more series, using one or more formulas. Output series are used to store the
grouped data points, and an offset can be used for intervals.
Groups data points in a series using one or more formulas. An output series is used to store the grouped data
points, and an offset can be used for intervals.
Groups data points in a series by axis labels, using one or more formulas. An output series is used to store the
grouped data points.
Groups data points in one or more series by axis labels, using one or more formulas. Output series are used to
store the grouped data points.
GroupByAxisLabel(String, Series)
GroupByAxisLabel(String, Series)
Groups data points in a series by axis labels, using one or more formulas. Original data point values are cleared,
and the series then stores the new grouped data points.
GroupByAxisLabel(String, String)
GroupByAxisLabel(String, String)
Groups data points in one or more series by axis labels, using one or more formulas. Original data point values are
cleared, and each of the series then stores its new grouped data points.
Replaces the missing data points in one or more series with empty points. Each series is checked for a given
interval that is determined by the interval and intervalType arguments.
Replaces the missing data points in a series with empty points. The series is checked for a given interval that is
determined by the interval and intervalType arguments.
Replaces the missing data points in one or more series with empty points. Each series is checked for a given
interval that is determined by the interval , intervalOffset , intervalOffsetType and intervalType
arguments.
Replaces the missing data points in a series with empty points. The series is checked for a given interval that is
determined by the interval , intervalOffset , intervalOffsetType and intervalType arguments.
InsertEmptyPoints(Double, IntervalType, Double, IntervalType, Double, Double, String)
InsertEmptyPoints(Double, IntervalType, Double, IntervalType, Double, Double, String)
Replaces the missing data points in one or more series with empty points. Each series is checked for a given
interval that is determined by the interval , intervalOffset , intervalOffsetType and intervalType
arguments. The series range that is checked is determined by the toXValue and fromXValue arguments.
Replaces the missing data points in a series with empty points. The series is checked for a given interval that is
determined by the interval , intervalOffset , intervalOffsetType and intervalType arguments. The series
range that is checked is determined by the toXValue and fromXValue arguments.
Performs a sort on the data points in one or more series, using the specified order. The sort can be based on any
available data point value.
Sort(IComparer<DataPoint>, String)
Sort(IComparer<DataPoint>, String)
Sort(IComparer<DataPoint>, Series)
Sort(IComparer<DataPoint>, Series)
Sort(PointSortOrder, String)
Sort(PointSortOrder, String)
Performs a sort on the data points in one or more series, using the specified order. The sort is based on the first Y -
value of each of the data points.
Sort(PointSortOrder, Series)
Sort(PointSortOrder, Series)
Performs a sort on the data points in a series using the specified order. The sort is based on the first Y -value of
each of the data points.
Performs a sort on the data points in a series using the specified order. The sort can be based on any available data
point value.
DataManipulator
I n this Article
Initializes a new instance of the DataManipulator class.
public DataManipulator ();
DataManipulator.ExportSeriesValues DataManipulator.
ExportSeriesValues
I n this Article
Overloads
ExportSeriesValues() ExportSeriesValues()
Exports the data for every series stored in the SeriesCollection
to the DataSet object.
ExportSeriesValues(String) ExportSeriesValues(String)
Exports the data from one or more series to the DataSet
object.
ExportSeriesValues(Series) ExportSeriesValues(Series)
Exports the data from the specified series to the DataSet
object.
ExportSeriesValues() ExportSeriesValues()
Exports the data for every series stored in the SeriesCollection to the DataSet object.
public System.Data.DataSet ExportSeriesValues ();
member this.ExportSeriesValues : unit -> System.Data.DataSet
Returns
DataSet DataSet
A DataSet object that contains the exported series data.
ExportSeriesValues(String) ExportSeriesValues(String)
Exports the data from one or more series to the DataSet object.
public System.Data.DataSet ExportSeriesValues (string seriesNames);
member this.ExportSeriesValues : string -> System.Data.DataSet
Parameters
seriesNames String String
A comma-separated list of names of the Series to be exported.
Returns
DataSet DataSet
A DataSet object that contains the exported series data.
ExportSeriesValues(Series) ExportSeriesValues(Series)
Exports the data from the specified series to the DataSet object.
public System.Data.DataSet ExportSeriesValues
(System.Windows.Forms.DataVisualization.Charting.Series series);
member this.ExportSeriesValues : System.Windows.Forms.DataVisualization.Charting.Series ->
System.Data.DataSet
Parameters
series Series Series
The series to be exported.
Returns
DataSet DataSet
A DataSet object that contains the exported series data.
DataManipulator.Filter DataManipulator.Filter
I n this Article
Overloads
Filter(CompareMethod, Double, Series, Series, String) Filter(
CompareMethod, Double, Series, Series, String) Filters the data points in a series by applying a filtering rule to
the specified data point values for comparison.
Parameters
compareMethod CompareMethod CompareMethod
A CompareMethod enumeration value that determines the comparison method for the filtering rule. Can be LessThan,
EqualTo, and so forth.
compareValue Double Double
The value part of the filtering rule that is applied to the first Y -values of data points. For example, in the filtering rule "
<6", 6 is the value.
inputSeries Series Series
The Series object to be filtered.
outputSeries Series Series
A Series object that stores the filtered data. If the series does not exist, an exception will be thrown.
usingValue String String
The data point value that the filtering rule is applied to. Can be X, Y, Y2, Y3, and so forth.
Parameters
compareMethod CompareMethod CompareMethod
A CompareMethod enumeration value that determines the comparison method for the filtering rule. Can be LessThan,
EqualTo, and so forth.
compareValue Double Double
The value part of the filtering rule that is applied to the first Y -values of data points. For example, in the filtering rule "
<6", 6 is the value.
inputSeriesNames String String
A comma-separated list of names of the Series to be filtered.
outputSeriesNames String String
A comma-separated list of names of the Series that store the filtered data. The number of output series must equal the
number of input series, otherwise an exception will be thrown.
usingValue String String
The data point value that the filtering rule is applied to. Can be X, Y, Y2, Y3, and so forth.
Parameters
dateRange DateRangeType DateRangeType
A DateRangeType enumeration value that represents a date/time interval, such as days of the week, days of the month,
and so forth. Determines the range over which the given elements will be filtered.
rangeElements String String
Specifies the elements within the date/time range designated by the dateRange parameter that will be filtered. Can be
a single value, for example, "7"; comma-separated values, for example, "5,6"; a range of values, such as "9-11"; or any
variation thereof, such as "5,6,9-11".
inputSeries Series Series
The Series object to be filtered.
outputSeries Series Series
A Series object that stores the filtered data. If the series does not exist, an exception will be thrown.
Parameters
dateRange DateRangeType DateRangeType
A DateRangeType enumeration value that represents a date/time interval, such as days of the week, days of the month,
and so forth. Determines the range over which the given elements will be filtered.
rangeElements String String
Specifies the elements within the date/time range designated by the dateRange parameter that will be filtered. Can be
a single value, for example, "7"; comma-separated values, for example, "5,6"; a range of values, such as "9-11"; or any
variation thereof, such as "5,6,9-11".
inputSeriesNames String String
A comma-separated list of names of the Series to be filtered.
outputSeriesNames String String
A comma-separated list of names of the Series that store the filtered data. Make sure that the number of output series
matches the number of input series, otherwise an exception will be thrown.
Parameters
compareMethod CompareMethod CompareMethod
A CompareMethod enumeration value that determines the comparison method for the filtering rule. Can be LessThan,
EqualTo, and so forth.
compareValue Double Double
The value part of the filtering rule that is applied to the first Y -values of data points. For example, in the filtering rule "
<6", 6 is the value.
inputSeries Series Series
The Series object to be filtered.
outputSeries Series Series
A Series object that stores the filtered data. If the series does not exist, an exception will be thrown.
Parameters
compareMethod CompareMethod CompareMethod
A CompareMethod enumeration value that determines the comparison method for the filtering rule. Can be LessThan,
EqualTo, and so forth.
compareValue Double Double
The value part of the filtering rule that is applied to the first Y -values of data points. For example, in the filtering rule "
<6", 6 is the value.
inputSeriesNames String String
A comma-separated list of names of the Series to be filtered.
outputSeriesNames String String
A comma-separated list of names of the Series that store the filtered data. The number of output series must match the
number of input series, otherwise an exception will be thrown.
Parameters
filterInterface IDataPointFilter IDataPointFilter
An object that implements the IDataPointFilter interface.
inputSeries Series Series
The Series object to be filtered.
outputSeries Series Series
A Series object that stores the filtered data. If the series does not exist, an exception will be thrown.
Parameters
dateRange DateRangeType DateRangeType
A DateRangeType enumeration value that represents a date/time interval, such as days of the week, days of the month,
and so forth. Determines the range over which the given elements will be filtered.
rangeElements String String
Specifies the elements within the date/time range designated by the dateRange parameter that will be filtered. Can be
a single value, for example, "7"; comma-separated values, for example, "5,6"; a range of values, such as "9-11"; or any
variation thereof, such as "5,6,9-11".
inputSeries Series Series
The Series object to be filtered.
Parameters
dateRange DateRangeType DateRangeType
A DateRangeType enumeration value that represents a date/time interval, such as days of the week, days of the month,
and so forth. Determines the range over which the given elements will be filtered.
rangeElements String String
Specifies the elements within the date/time range designated by the dateRange parameter that will be filtered. Can be
a single value, for example, "7"; comma-separated values, for example, "5,6"; a range of values, such as "9-11"; or any
variation thereof, such as "5,6,9-11".
inputSeriesNames String String
A comma-separated list of names of the Series to be filtered.
Parameters
compareMethod CompareMethod CompareMethod
A CompareMethod enumeration value that determines the comparison method for the filtering rule. Can be LessThan,
EqualTo, and so forth.
compareValue Double Double
The value part of the filtering rule that is applied to the first Y -values of data points. For example, in the filtering rule "
<6", 6 is the value.
inputSeries Series Series
The Series object that is filtered.
Parameters
compareMethod CompareMethod CompareMethod
A CompareMethod enumeration value that determines the comparison method for the filtering rule. Can be LessThan,
EqualTo, and so forth.
compareValue Double Double
The value part of the filtering rule that is applied to the first Y -values of data points. For example, in the filtering rule "
<6", 6 is the value.
inputSeriesNames String String
A comma-separated list of names of the Series to be filtered.
Parameters
filterInterface IDataPointFilter IDataPointFilter
An object that implements the IDataPointFilter interface.
inputSeries Series Series
The Series object that is filtered.
Parameters
filterInterface IDataPointFilter IDataPointFilter
An object that implements the IDataPointFilter interface.
inputSeriesNames String String
A comma-separated list of names of the Series to be filtered.
Parameters
filterInterface IDataPointFilter IDataPointFilter
An object that implements the IDataPointFilter interface.
inputSeriesNames String String
A comma-separated list of names of the Series to be filtered.
outputSeriesNames String String
A comma-separated list of names of the Series that store the filtered data. Make sure that the number of output series
matches the number of input series, otherwise an exception will be thrown.
DataManipulator.FilterMatchedPoints DataManipulator.
FilterMatchedPoints
I n this Article
Gets or sets a value that determines whether points are filtered if they match criteria specified in arguments in the
Filter methods of this class.
Returns
Boolean Boolean
true if points that match specified criteria are filtered; false if points that do not match the criteria are filtered. The
default value is true .
DataManipulator.FilterSetEmptyPoints DataManipulator.
FilterSetEmptyPoints
I n this Article
Gets or sets a flag that indicates whether points filtered by the Filter or FilterTopN methods will be removed or
marked as empty.
public bool FilterSetEmptyPoints { get; set; }
member this.FilterSetEmptyPoints : bool with get, set
Returns
Boolean Boolean
true if filtered points will be marked as empty; false if they will be removed. The default value is false .
DataManipulator.FilterTopN DataManipulator.FilterTopN
I n this Article
Overloads
FilterTopN(Int32, String, String, String, Boolean) FilterTopN(
Int32, String, String, String, Boolean) Filters all data points in one or more series except for a
specified number of points. The points that are not filtered
correspond to points in the first input series that have the
largest or smallest values.
Parameters
pointCount Int32 Int32
The number of data points that the filtering operation will not remove.
inputSeriesNames String String
A comma-separated list of names of the Series to be filtered.
outputSeriesNames String String
A comma-separated list of names of the Series that store the filtered data. Make sure that the number of output series
matches the number of input series, otherwise an exception will be thrown.
usingValue String String
The data point value that the filtering rule is applied to. Can be X, Y, Y2, Y3, and so forth.
getTopValues Boolean Boolean
true if the largest values are kept; false if the smallest values are kept.
Parameters
pointCount Int32 Int32
The number of data points that the filtering operation will not remove.
inputSeries Series Series
The Series object to be filtered.
outputSeries Series Series
A Series object that stores the filtered data. If the series does not exist, an exception will be thrown.
usingValue String String
The data point value that the filtering rule is applied to. Can be X, Y, Y2, Y3, and so forth.
getTopValues Boolean Boolean
true if the largest values are kept; false if the smallest values are kept.
FilterTopN(Int32, String, String, String) FilterTopN(Int32, String,
String, String)
Filters all data points in one or more series except for a specified number of points. The points that are not filtered
correspond to points in the first series that have the largest values.
public void FilterTopN (int pointCount, string inputSeriesNames, string outputSeriesNames, string
usingValue);
member this.FilterTopN : int * string * string * string -> unit
Parameters
pointCount Int32 Int32
The number of data points that the filtering operation will not remove.
inputSeriesNames String String
A comma-separated list of names of the Series to be filtered.
outputSeriesNames String String
A comma-separated list of names of the Series that store the filtered data. Make sure that the number of output series
matches the number of input series, otherwise an exception will be thrown.
usingValue String String
The data point value that the filtering rule is applied to. Can be X, Y, Y2, Y3, and so forth.
Parameters
pointCount Int32 Int32
The number of data points that the filtering operation will not remove.
inputSeries Series Series
The Series object to be filtered.
outputSeries Series Series
A Series object that stores the filtered data. If the series does not exist, an exception will be thrown.
usingValue String String
The data point value that the filtering rule is applied to. Can be X, Y, Y2, Y3, and so forth.
FilterTopN(Int32, String, String) FilterTopN(Int32, String, String)
Filters all data points in one or more series except for a specified number of points. The points that aren't filtered
correspond to points in the first series that have the largest first Y -values.
public void FilterTopN (int pointCount, string inputSeriesNames, string outputSeriesNames);
member this.FilterTopN : int * string * string -> unit
Parameters
pointCount Int32 Int32
The number of data points that the filtering operation will not remove.
inputSeriesNames String String
A comma-separated list of names of the Series to be filtered.
outputSeriesNames String String
A comma-separated list of names of the Series that store the filtered data. Make sure that the number of output series
matches the number of input series, otherwise an exception will be thrown.
Parameters
pointCount Int32 Int32
The number of data points that the filtering operation will not remove.
inputSeries Series Series
The Series object to be filtered.
Parameters
pointCount Int32 Int32
The number of data points that the filtering operation will not remove.
inputSeriesNames String String
A comma-separated list of names of the Series to be filtered.
Parameters
pointCount Int32 Int32
The number of data points that the filtering operation will not remove.
inputSeries Series Series
The Series object to be filtered.
outputSeries Series Series
A Series object that stores the filtered data. If the series does not exist, an exception will be thrown.
DataManipulator.Group DataManipulator.Group
I n this Article
Overloads
Group(String, Double, IntervalType, String) Group(String,
Double, IntervalType, String) Groups data points for one or more series, using one or more
formulas. Series are cleared of their original data and used to
store the new data points.
Parameters
formula String String
A comma-separated list of one or more formulas to be used for calculating the grouped data point values.
interval Double Double
The size of the interval checked for missing data points.
intervalType IntervalType IntervalType
The unit of measurement for the interval parameter.
inputSeriesName String String
A comma-separated list of names of the Series to be grouped.
Parameters
formula String String
A comma-separated list of one or more formulas to be used for calculating the grouped data point values.
interval Double Double
The size of the interval checked for missing data points.
intervalType IntervalType IntervalType
The unit of measurement for the interval parameter.
inputSeries Series Series
The Series object to be grouped.
Parameters
formula String String
A comma-separated list of one or more formulas to be used for calculating the grouped data point values.
interval Double Double
The size of the interval checked for missing data points.
intervalType IntervalType IntervalType
The unit of measurement for the interval parameter.
inputSeriesName String String
A comma-separated list of names of the Series to be grouped.
outputSeriesName String String
A comma-separated list of names of the Series that will store the grouped data points. If a series does not exist, it will
be created; if it does exist, it will first be cleared of all data before storing grouped data points. The number of output
series must equal the number of input series, or an exception will be thrown.
Parameters
formula String String
A comma-separated list of one or more formulas to be used for calculating the grouped data point values.
interval Double Double
The size of the interval checked for missing data points.
intervalType IntervalType IntervalType
The unit of measurement for the interval parameter.
Parameters
formula String String
A comma-separated list of one or more formulas to be used for calculating the grouped data point values.
interval Double Double
The size of the interval checked for missing data points.
intervalType IntervalType IntervalType
The unit of measurement for the interval parameter.
Parameters
formula String String
A comma-separated list of one or more formulas to be used for calculating the grouped data point values.
interval Double Double
The size of the interval checked for missing data points.
intervalType IntervalType IntervalType
The unit of measurement for the interval parameter.
Parameters
formula String String
A comma-separated list of one or more formulas to be used for calculating the grouped data point values.
interval Double Double
The size of the interval checked for missing data points.
intervalType IntervalType IntervalType
The unit of measurement for the interval parameter.
Overloads
GroupByAxisLabel(String, Series, Series) GroupByAxisLabel(
String, Series, Series) Groups data points in a series by axis labels, using one or
more formulas. An output series is used to store the grouped
data points.
Parameters
formula String String
A comma-separated list of one or more formulas to be used for calculating the grouped data point values.
inputSeries Series Series
The input Series to be grouped.
outputSeries Series Series
The Series that will store the new data points created by the grouping operation. If it does not exist, an exception will be
thrown.
GroupByAxisLabel(String, String, String) GroupByAxisLabel(String,
String, String)
Groups data points in one or more series by axis labels, using one or more formulas. Output series are used to store
the grouped data points.
public void GroupByAxisLabel (string formula, string inputSeriesName, string outputSeriesName);
member this.GroupByAxisLabel : string * string * string -> unit
Parameters
formula String String
A comma-separated list of one or more formulas to be used for calculating the grouped data point values.
inputSeriesName String String
A comma-separated list of names of the input Series.
outputSeriesName String String
A comma-separated list of names of the Series that will store the grouped data points. If a series does not exist, it will
be created; if it does exist, it will first be cleared of all data before storing grouped data points. The number of output
series must equal the number of input series, or an exception will be thrown.
Parameters
formula String String
A comma-separated list of one or more formulas to be used for calculating the grouped data point values.
inputSeries Series Series
The input Series.
Parameters
formula String String
A comma-separated list of one or more formulas to be used for calculating the grouped data point values.
inputSeriesName String String
A comma-separated list of names of the input Series.
DataManipulator.InsertEmptyPoints DataManipulator.
InsertEmptyPoints
I n this Article
Overloads
InsertEmptyPoints(Double, IntervalType, String) InsertEmpty
Points(Double, IntervalType, String) Replaces the missing data points in one or more series with
empty points. Each series is checked for a given interval that is
determined by the interval and intervalType
arguments.
Parameters
interval Double Double
The size of the interval checked for missing data points.
intervalType IntervalType IntervalType
The unit of measurement for the interval parameter.
seriesName String String
A comma-separated list of names of the Series to be checked.
Parameters
interval Double Double
The size of the interval checked for missing data points.
intervalType IntervalType IntervalType
The unit of measurement for the interval parameter.
Parameters
interval Double Double
The size of the interval checked for missing data points.
intervalType IntervalType IntervalType
The unit of measurement for the interval parameter.
Parameters
interval Double Double
The size of the interval checked for missing data points.
intervalType IntervalType IntervalType
The unit of measurement for the interval parameter.
intervalOffset Double Double
The interval offset size.
intervalOffsetType IntervalType IntervalType
The unit of measurement for the interval offset.
series Series Series
The Series object in which to insert the empty points.
Parameters
interval Double Double
The size of the interval checked for missing data points.
intervalType IntervalType IntervalType
The unit of measurement for the interval parameter.
Parameters
interval Double Double
The size of the interval checked for missing data points.
intervalType IntervalType IntervalType
The unit of measurement for the interval parameter.
Overloads
Sort(PointSortOrder, String, String) Sort(PointSortOrder,
String, String) Performs a sort on the data points in one or more series,
using the specified order. The sort can be based on any
available data point value.
Parameters
pointSortOrder PointSortOrder PointSortOrder
A PointSortOrder enumeration value that determines if the sort is ascending or descending.
sortBy String String
A string value that represents the data point values to be sorted. Possible values are: "X", "Y", "Y2", "Y3", "AxisLabel",
and so forth.
seriesName String String
A comma-separated list of names of the Series to be sorted.
Remarks
This method performs an ascending or descending sort on data points in a series, and is based on the value that is set
in the sortBy parameter such as "X", "AxisLabel", "Y", "Y1", and so forth.
Note that if multiple series are sorted, the series must be aligned, otherwise an exception will be thrown.
Im p o rt a nt
All series will be sorted using the specified Y -value from the FIRST listed series; that is, all data points, regardless of the
series they belong to, are sorted based on the first series.
To sort points using a custom sort routine, use a different definition of this overloaded method.
Parameters
comparer IComparer<DataPoint>
An object that implements the IComparer interface and provides the custom sorting logic.
seriesName String String
A comma-separated list of names of the Series to be sorted.
Remarks
This method performs a custom sort on the data points in one or more series; the sort logic is defined by the comparer
parameter. Override and implement the Compare method of the IComparer interface, perform the comparison(s) and
then return true or false . The sort order is determined by the return value.
Note that if multiple series are sorted, the series must be aligned, otherwise an exception will be thrown.
The two object parameters of the Compare method must always be of type DataPoint.
Im p o rt a nt
All data points, regardless of the series they belong to, are sorted based on the first series; if the position of a data point
in the first series changes, all corresponding points in the other series change as well.
Parameters
comparer IComparer<DataPoint>
An object that implements the IComparer interface and provides the custom sorting logic.
series Series Series
The Series object to be sorted.
Remarks
This method performs a custom sort on the data points in a series; the sort logic is defined by the comparer parameter.
Override and implement the Compare method of the IComparer interface, perform the comparison(s) and then return
true or false . The sort order is determined by the return value.
The two object parameters of the Compare method must always be of type DataPoint.
To perform a custom sort for more than one series per function call, use the Sort method.
Parameters
pointSortOrder PointSortOrder PointSortOrder
A PointSortOrder enumeration value that determines if the sort is ascending or descending.
seriesName String String
A comma-separated list of names of the Series to be sorted.
Parameters
pointSortOrder PointSortOrder PointSortOrder
A PointSortOrder enumeration value that determines if the sort is ascending or descending.
series Series Series
The Series object to be sorted.
Parameters
pointSortOrder PointSortOrder PointSortOrder
A PointSortOrder enumeration value that determines if the sort is ascending or descending
sortBy String String
A string value that represents the data point values to be sorted. Possible values are: "X", "Y", "Y2", "Y3", "AxisLabel",
and so forth.
series Series Series
The Series object to be sorted.
DataPoint DataPoint Class
Represents a data point that is stored in the DataPointCollection class.
D eclaration
[System.ComponentModel.TypeConverter("System.Windows.Forms.Design.DataVisualization.Charting.Dat
aPointConverter, System.Windows.Forms.DataVisualization.Design, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35")]
public class DataPoint :
System.Windows.Forms.DataVisualization.Charting.DataPointCustomProperties
type DataPoint = class
inherit DataPointCustomProperties
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
DataPointCustomProperties DataPointCustomProperties
Remarks
The DataPoint class stores properties associated with data as well as data point values. For example, a data point has a
value, but it also has a color property, background image property, background gradient property, and so forth. For
more information about data point properties, see the DataPointCustomProperties class overview topic.
Each data point consists of an X-value and one or more Y -values. The X-value can be zero, or you can set this explicitly.
Only one Y -value per point is required for all chart types except bubble, candlestick and stock charts. These chart types
require more than one Y -value because one data point consists of multiple values. For example, to plot one stock chart
column, four values are required: high, low, open and close values.
Data can be added at either design time or run time; you can also use data-binding at run time.
Constructors
DataPoint()
DataPoint()
DataPoint(Series)
DataPoint(Series)
Initializes a new instance of the DataPoint class, and sets the Series that the data point belongs to.
DataPoint(Double, Double)
DataPoint(Double, Double)
Initializes a new instance of the DataPoint class with the specified X and Y -value.
DataPoint(Double, Double[])
DataPoint(Double, Double[])
Initializes a new instance of the DataPoint class with the specified X-value and an array of Y -values.
DataPoint(Double, String)
DataPoint(Double, String)
Initializes a new instance of the DataPoint class with the specified X-value and Y -values.
Properties
IsEmpty
IsEmpty
Gets or sets a flag that indicates whether a data point is marked as empty.
Name
Name
XValue
XValue
YValues
YValues
Methods
Clone()
Clone()
GetValueByName(String)
GetValueByName(String)
Returns a data point that is specified by its name. This is a helper function.
SetValueXY(Object, Object[])
SetValueXY(Object, Object[])
Sets the X-value and one or more Y -values of the data point.
SetValueY(Object[])
SetValueY(Object[])
Returns
DataPoint DataPoint
A cloned DataPoint object that is an exact copy of the data point.
Remarks
Use the Clone method to obtain an exact copy of the data point.
DataPoint DataPoint
I n this Article
Overloads
DataPoint()
Initializes a new instance of the DataPoint class.
DataPoint(Series) DataPoint(Series)
Initializes a new instance of the DataPoint class, and sets the
Series that the data point belongs to.
DataPoint()
Initializes a new instance of the DataPoint class.
public DataPoint ();
Remarks
This constructor can be used to create and initialize a new instance of the DataPoint class.
However, it is highly recommended that you instead add data points at run time, using the Points collection property.
DataPoint(Series) DataPoint(Series)
Initializes a new instance of the DataPoint class, and sets the Series that the data point belongs to.
public DataPoint (System.Windows.Forms.DataVisualization.Charting.Series series);
new System.Windows.Forms.DataVisualization.Charting.DataPoint :
System.Windows.Forms.DataVisualization.Charting.Series ->
System.Windows.Forms.DataVisualization.Charting.DataPoint
Parameters
series Series Series
The Series object that the data point belongs to.
Remarks
This constructor can be used to create and initialize a new instance of the DataPoint class.
However, it is highly recommended that you instead add data points at run time, using the Points collection property.
Parameters
xValue Double Double
The X-value of the data point.
yValue Double Double
The Y -value of the data point.
Remarks
This constructor can be used to create and initialize a new instance of the DataPoint class.
However, it is highly recommended that you instead add data points at run time, using the Points collection property.
Parameters
xValue Double Double
The X-value of the data point.
yValues Double[]
An array of Y -values of the data point.
Remarks
This constructor can be used to create and initialize a new instance of the DataPoint class.
However, it is highly recommended that you instead add data points at run time, using the Points collection property.
Parameters
xValue Double Double
The X-value of the data point.
yValues String String
A comma-separated string of Y -values of the data point.
Remarks
This constructor can be used to create and initialize a new instance of the DataPoint class.
However, it is highly recommended that you instead add data points at run time, using the Points collection property.
DataPoint.GetValueByName DataPoint.GetValueByName
I n this Article
Returns a data point that is specified by its name. This is a helper function.
public double GetValueByName (string valueName);
member this.GetValueByName : string -> double
Parameters
valueName String String
Point value names. X, Y, Y2...
Returns
Double Double
A string value that represents a data point.
DataPoint.IsEmpty DataPoint.IsEmpty
I n this Article
Gets or sets a flag that indicates whether a data point is marked as empty.
[System.ComponentModel.Bindable(true)]
public bool IsEmpty { get; set; }
member this.IsEmpty : bool with get, set
Returns
Boolean Boolean
true if the point is marked as an empty point; otherwise, false . The default value is false .
Attributes BindableAttribute
Remarks
Set this property to true to mark a data point as an empty point.
Alternatively one of the InsertEmptyPoints methods in the DataManipulator class can be used to mark missing data
as empty points.
The EmptyPointStyle property determines how empty points are displayed.
DataPoint.Name DataPoint.Name
I n this Article
Gets or sets the name of the data point.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
public override string Name { get; set; }
member this.Name : string with get, set
Returns
String String
A string value that represents the text name of the data point.
Attributes BindableAttribute BrowsableAttribute
DataPoint.SetValueXY DataPoint.SetValueXY
I n this Article
Sets the X-value and one or more Y -values of the data point.
public void SetValueXY (object xValue, params object[] yValue);
member this.SetValueXY : obj * obj[] -> unit
Parameters
xValue Object Object
The X-value of the data point.
yValue Object[]
A list of Y -values of the data point.
Remarks
Use the SetValueXY method to set the value(s) of a data point at run-time.
Note that if you set the X-value to a value other than zero (0), a scatter plot will be generated. For further details, see
the Remarks section of the XValue property.
Refer to the following table for a complete listing of valid .NET Framework types that can be used for the object type
parameter.
Parameters
yValue Object[]
The Y -value(s) of a DataPoint object in the collection. Formatted as one or more values separated by commas.
Remarks
The SetValueY property is used to set the Y -value(s) of a data point at run time.
Only one Y -value per point is required for all chart types except for bubble, candlestick and stock charts. These chart
types require more than one Y -value because one data point consists of multiple values. For example, to plot one stock
chart column, four values are required: high, low, open and close values.
This property returns an array of double values when used to retrieve multiple Y -values.
Im p o rt a nt
The YValuesPerPoint property determines the maximum number of Y -values that all data points in a Series can have. If
you specify more than the allowable number of Y -values, an exception will be raised.
Refer to the following table for a complete listing of valid .NET Framework types that can be used for the object type
parameter:
Returns
Double Double
A double that represents the X-value of a data point.
Attributes BindableAttribute TypeConverterAttribute
Remarks
All chart types can be displayed as either scatter plots or as non-scatter plots, because both X-values and Y -values can
be set. Setting an X-value will result in a scatter plot, whereas not setting this property - which is equivalent to setting it
to zero - will result in a non-scatter plot. For example, to draw a point chart type, add data points that have X-values of
zero. To display a traditional scatter chart, add data points that have X-values other than zero.
The X-values of data points are not required to be set. If they are not set, data points are plotted sequentially, using
their index values from the DataPointCollection.
DataPoint.YValues DataPoint.YValues
I n this Article
Gets or sets the Y -value(s) of a data point.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.DoubleAr
rayConverter))]
public double[] YValues { get; set; }
member this.YValues : double[] with get, set
Returns
Double[]
An array of double values that represent the Y -value(s) of a data point.
Attributes BindableAttribute TypeConverterAttribute
Remarks
The YValues property is used to set the Y -values of data points.
Only one Y -value per point is required for all chart types except bubble, candlestick and stock charts. These chart types
require more than one Y -value because one data point consists of multiple values. For example, to plot one stock chart
column, four values are required: high, low, open and close values.
The YValues property returns an array of double values when used to retrieve the Y -values.
Im p o rt a nt
The YValuesPerPoint property determines the maximum number of Y -values that all data points in a Series can have. If
you specify more than the allowable number of Y -values, an exception will be raised.
DataPointCollection DataPointCollection Class
Represents a collection of DataPoint objects.
D eclaration
public class DataPointCollection :
System.Windows.Forms.DataVisualization.Charting.ChartElementCollection<System.Windows.Forms.Data
Visualization.Charting.DataPoint>
type DataPointCollection = class
inherit ChartElementCollection<DataPoint>
I nheritance H ierarchy
Object Object
Collection<T> Collection<T>
ChartElementCollection<T> ChartElementCollection<T>
Remarks
The DataPointCollection class represents a collection of DataPoint objects, which in turn represent the data points that
are part of a Series object.
This collection class is implemented as the Points property of a Series object.
DataPoint objects can be appended or inserted into the collection with their X-value and Y -value(s) already specified as
parameters. Note that they are also added automatically when a series is bound to a data source using either the
DataBindY or DataBindXY method.
Data points are plotted in the order that they occur in this collection only if the series that the collection belongs to has
its IsXValueIndexed property set to true (the default value is false ), or if all X-values for all data points are zero.
Otherwise data points are plotted using their X-values.
Data points can be located, and manipulated, based on maximum, minimum or specified X or Y -values using the
overloaded FindMaxValue , FindMinValue or FindValue methods, respectively.
The Count property indicates the total number of items in the collection and is commonly used to find the upper
bound of the collection.
Methods
Add(Double[])
Add(Double[])
Adds a new DataPoint object to the collection and sets its Y value.
AddXY(Double, Double)
AddXY(Double, Double)
Adds a DataPoint object to the end of the collection, with the specified X-value and Y -value.
AddXY(Object, Object[])
AddXY(Object, Object[])
Adds a DataPoint object to the end of the collection, with the specified X-value and Y -value(s).
AddY(Double)
AddY(Double)
Adds a DataPoint object to the end of the collection, with the specified Y -value.
AddY(Object[])
AddY(Object[])
Adds a DataPoint object to the end of the collection, with the specified Y -value(s).
ClearItems()
ClearItems()
Data binds the X-value, Y -value(s) and property values of the data points, such as Tooltip or LabelStyle, to the data
source.
DataBindXY(IEnumerable, IEnumerable[])
DataBindXY(IEnumerable, IEnumerable[])
Data binds the X-value and Y -values of the collection's data points to the first columns of the specified data source.
Data binds the X-value and Y -values of the data points in the collection to the specified columns of the specified
data sources.
DataBindY(IEnumerable[])
DataBindY(IEnumerable[])
Data binds the Y -value(s) of the collection's data points to the first column of the specified data source(s).
DataBindY(IEnumerable, String)
DataBindY(IEnumerable, String)
Data binds the Y -value(s) of the data points to the specified column(s) of the specified data source.
FindAllByValue(Double, String, Int32)
FindAllByValue(Double, String, Int32)
Finds all the data points that are equal to the specified value, starting from the specified index location.
FindAllByValue(Double, String)
FindAllByValue(Double, String)
Finds all the data points that are equal to the specified value.
FindAllByValue(Double)
FindAllByValue(Double)
Finds all the data points that are equal to the specified value.
FindByValue(Double)
FindByValue(Double)
Finds the first data point that is equal to the specified value.
FindByValue(Double, String)
FindByValue(Double, String)
Finds the first data point that is equal to the specified value.
Finds the first data point that is equal to the specified value, starting from the specified index location.
FindMaxByValue()
FindMaxByValue()
FindMaxByValue(String)
FindMaxByValue(String)
FindMaxByValue(String, Int32)
FindMaxByValue(String, Int32)
Finds the data point with the maximum value, starting from the specified index location.
FindMinByValue()
FindMinByValue()
FindMinByValue(String)
FindMinByValue(String)
FindMinByValue(String, Int32)
FindMinByValue(String, Int32)
Finds the data point with the minimum value, starting from the specified index location.
Inserts a data point with the specified X value and one or more specified Y values.
InsertY(Int32, Object[])
InsertY(Int32, Object[])
Parameters
y Double[]
The Y -value of the data point.
Returns
DataPoint DataPoint
The newly added DataPoint object.
DataPointCollection.AddXY DataPointCollection.AddXY
I n this Article
Overloads
AddXY(Double, Double) AddXY(Double, Double)
Adds a DataPoint object to the end of the collection, with the
specified X-value and Y-value.
Parameters
xValue Double Double
The X-value of the data point.
yValue Double Double
The Y -value of the data point.
Returns
Int32 Int32
An integer that represents the zero-based index where the item was inserted into the data point collection.
Remarks
This method adds DataPoint object to the DataPointCollection; the object is always added to the end of the collection.
Use the AddXY method overload if your data points require more than one Y -value.
If your data points do not need an X-value - that is, if you are creating non-scatter plots - use the AddY method instead.
Parameters
xValue Object Object
The X value of the data point.
yValue Object[]
One or more comma-separated values that represent the Y -value(s) of the data point.
Returns
Int32 Int32
An integer value that represents the zero-based index where the item was inserted into the collection.
Remarks
This method adds one DataPoint object to the DataPointCollection; the data point is always added to the end of the
collection.
You must provide at least one (1) Y -value, otherwise an exception will be thrown. This method also checks the
YValueType property of the DataPointCollection object that this data belongs to; if too many Y -values are specified, an
exception will be thrown.
In order for DateTime formatting to have an effect, a value must be a DateTime object.
If your data points do not need an X-value - that is, if you are creating non-scatter plots - use the AddY method instead
DataPointCollection.AddY DataPointCollection.AddY
I n this Article
Overloads
AddY(Double) AddY(Double)
Adds a DataPoint object to the end of the collection, with the
specified Y-value.
AddY(Object[]) AddY(Object[])
Adds a DataPoint object to the end of the collection, with the
specified Y-value(s).
AddY(Double) AddY(Double)
Adds a DataPoint object to the end of the collection, with the specified Y -value.
public int AddY (double yValue);
member this.AddY : double -> int
Parameters
yValue Double Double
The Y -value of the data point.
Returns
Int32 Int32
An integer that represents the zero-based index where the item was inserted into the data point collection.
Remarks
This method adds one DataPoint object to the DataPointCollection; the data point is always added to the end of the
collection.
Use the method definition that allows for an array of Y -values if your data points require more than one Y -value.
If your data points need an X-value - that is, if you are creating scatter plots - use one of the AddXY methods instead.
AddY(Object[]) AddY(Object[])
Adds a DataPoint object to the end of the collection, with the specified Y -value(s).
public int AddY (params object[] yValue);
member this.AddY : obj[] -> int
Parameters
yValue Object[]
A comma-separated list of Y -value(s) of the DataPoint object added to the collection.
Returns
Int32 Int32
An integer that represents the location in zero-based index where the item was inserted into the collection.
Remarks
This method adds one DataPoint object to the DataPointCollection; the data point is always added to the end of the
collection.
You must provide at least one (1) Y -value, otherwise an exception will be thrown. This method also checks the
ChartType property of the DataPoint object this data belongs to; if too many Y -values are specified, an exception will be
thrown.
The X-value will always be set to zero (0), resulting in non-scatter plots. If you want the data points to use an X-value,
call one of the AddXY methods instead.
In order for DateTime formatting to have an effect, a value must be a DateTime object.
Refer to the following for a complete listing of valid .NET Framework types that can be used for the object type
parameters:
Parameters
dataSource IEnumerable IEnumerable
The data source to bind with X-value and Y -value(s).
xField String String
The name of the field for X-values.
yFields String String
A comma separated names of the fields for Y -values.
otherFields String String
Other data point properties with binding rules, in the format: PointProperty=Field[{Format}]
[,PointProperty=Field[{Format}]].
Remarks
The data source can be the Ole(SQL )DataReader, DataView, DataSet, DataTable or DataRow.
DataPointCollection.DataBindXY DataPointCollection.
DataBindXY
I n this Article
Overloads
DataBindXY(IEnumerable, IEnumerable[]) DataBindXY(
IEnumerable, IEnumerable[]) Data binds the X-value and Y-values of the collection's data
points to the first columns of the specified data source.
DataBindXY(IEnumerable, IEnumerable[])
DataBindXY(IEnumerable, IEnumerable[])
Data binds the X-value and Y -values of the collection's data points to the first columns of the specified data source.
public void DataBindXY (System.Collections.IEnumerable xValue, params
System.Collections.IEnumerable[] yValues);
member this.DataBindXY : System.Collections.IEnumerable * System.Collections.IEnumerable[] -> unit
Parameters
xValue IEnumerable IEnumerable
The data source that will supply the X-values for the data points.
yValues IEnumerable[]
A comma-separated list of the Y -value(s) of the DataPoint object added to the collection.
Remarks
This method binds all DataPoint objects in a Series, and uses separate data sources for the X and Y -value(s).
Note that the first available column in the data source will be used if data-binding to a table. To bind to a column other
than the first column, use the DataBindXY method.
You can bind to multiple Y -values by providing a comma-separated list of IEnumerable<T> objects for the yValues
parameter.
If Y -values are not provided by the data source, or if the wrong number of values are provided, an exception will be
thrown.
If you do not want to display scatter-type plots, in which both X and Y -values are used, use one of the DataBindY
methods instead.
The following is a list of objects that you can use as the data source parameter:
DataView
Data readers (SQL, OleDB )
Arrays
Lists
All other objects that use the IEnumerable<T> interface.
Parameters
xValue IEnumerable IEnumerable
The data source that will supply the X-values for the data points.
xField String String
The name of the column that will supply the X-values for the data points.
yValue IEnumerable IEnumerable
A comma-separated list of the Y -value(s) of the DataPoint object added to the collection.
yFields String String
A comma-separated list of column name(s) that will supply the Y -values for the data points. Note that a comma can be
embedded as part of a column name, by using a double comma.
Remarks
Data binds the X-value and Y -values of the data points in the collection to the specified data source's first columns.
You can bind to several Y -values by setting the yFields parameter to multiple column names. Separate the column
names with commas.
If Y -values are not provided by the data source, or if the wrong number of values are provided, an exception will be
thrown.
If you do not want to display scatter-type plots, in which both X and Y -values are used, use one of the DataBindY
methods instead.
The following is a list of objects that you can use as the data source parameter:
DataView
Data readers (SQL, OleDB )
Arrays
Lists
All other objects that use the IEnumerable<T> interface.
DataPointCollection.DataBindY DataPointCollection.Data
BindY
I n this Article
Overloads
DataBindY(IEnumerable[]) DataBindY(IEnumerable[])
Data binds the Y-value(s) of the collection's data points to the
first column of the specified data source(s).
DataBindY(IEnumerable[]) DataBindY(IEnumerable[])
Data binds the Y -value(s) of the collection's data points to the first column of the specified data source(s).
public void DataBindY (params System.Collections.IEnumerable[] yValue);
member this.DataBindY : System.Collections.IEnumerable[] -> unit
Parameters
yValue IEnumerable[]
One or more comma-separated IEnumerable<T> data sources.
Remarks
This method binds the Y -value(s) of the data points in the collection to the first column of the specified data source(s).
To bind Y -values to a data source column that is not the first available column, use the DataBindY method.
You can bind several Y -values by specifying multiple data sources, using the yValue parameter. Note that the first
available column in each data source will be used for each data point's successive Y -values. For example, the first
column of the first IEnumerable<T> data source will be bound to the first Y -value of data points, the first column of the
second IEnumerable<T> data source will be bound to the second Y -value of data points, and so forth.
If Y -values are not provided by the data source, or if the wrong number of values are provided, an exception will be
thrown.
The following is a list of objects that you can use as the data source parameter:
The following is a list of objects that you can use as the data source:
DataView
Data readers (SQL, OleDB )
Arrays
Lists
All other objects that use the IEnumerable<T> interface.
DataBindY(IEnumerable, String) DataBindY(IEnumerable, String)
Data binds the Y -value(s) of the data points to the specified column(s) of the specified data source.
public void DataBindY (System.Collections.IEnumerable yValue, string yFields);
member this.DataBindY : System.Collections.IEnumerable * string -> unit
Parameters
yValue IEnumerable IEnumerable
An IEnumerable<T> data source object that provides the Y -value(s).
yFields String String
The data source field(s) to which to bind data point(s). Note that a comma can be embedded as part of a column name,
by using a double comma.
Remarks
This method binds the Y -values of the data points in the collection to the specified fields(s) of the data source.
To bind only to the first field in a data source, use the DataBindY method.
You can bind to several fields by setting the yFields parameter to multiple field names that are comma-separated.
Note that the first field will be used for the data point's first Y -value, the second named field will be used for the data
point's second Y -value, and so forth.
If Y -values are not provided by the data source, or the wrong number of values are provided, an exception will be
thrown.
The following is a list of objects that you can use as the data source:
DataView
Data readers (SQL, OleDB )
Arrays
Lists
All other objects that use the IEnumerable<T> interface.
DataPointCollection.FindAllByValue DataPointCollection.
FindAllByValue
I n this Article
Overloads
FindAllByValue(Double, String, Int32) FindAllByValue(Double,
String, Int32) Finds all the data points that are equal to the specified value,
starting from the specified index location.
FindAllByValue(Double) FindAllByValue(Double)
Finds all the data points that are equal to the specified value.
Parameters
valueToFind Double Double
The data point value to find.
useValue String String
The data point value to use (X, Y1, Y2...).
startIndex Int32 Int32
The index location of the data point to start searching from.
Returns
IEnumerable<DataPoint>
An IEnumerable<T> interface that represents the enumerator of the matching data points.
Parameters
valueToFind Double Double
The data point value to find.
useValue String String
The data point value to use (X, Y1, Y2...).
Returns
IEnumerable<DataPoint>
An IEnumerable<T> interface that represents the enumerator of the matching data points.
FindAllByValue(Double) FindAllByValue(Double)
Finds all the data points that are equal to the specified value.
public
System.Collections.Generic.IEnumerable<System.Windows.Forms.DataVisualization.Charting.DataPoint>
FindAllByValue (double valueToFind);
member this.FindAllByValue : double ->
seq<System.Windows.Forms.DataVisualization.Charting.DataPoint>
Parameters
valueToFind Double Double
The data point value to find.
Returns
IEnumerable<DataPoint>
An IEnumerable<T> interface that represents the enumerator of the matching data points.
DataPointCollection.FindByValue DataPointCollection.
FindByValue
I n this Article
Overloads
FindByValue(Double) FindByValue(Double)
Finds the first data point that is equal to the specified value.
FindByValue(Double) FindByValue(Double)
Finds the first data point that is equal to the specified value.
public System.Windows.Forms.DataVisualization.Charting.DataPoint FindByValue (double valueToFind);
member this.FindByValue : double -> System.Windows.Forms.DataVisualization.Charting.DataPoint
Parameters
valueToFind Double Double
The data point value to find.
Returns
DataPoint DataPoint
The DataPoint that matches the specified value, or null if there is no match.
Parameters
valueToFind Double Double
The data point value to find.
useValue String String
The data point value to use (X, Y1, Y2...).
Returns
DataPoint DataPoint
The DataPoint that matches the specified value, or null if there is no match.
Parameters
valueToFind Double Double
The data point value to find.
useValue String String
The data point value to use (X, Y1, Y2...).
startIndex Int32 Int32
The index location of the data point to start searching from.
Returns
DataPoint DataPoint
The DataPoint that matches the specified value, or null if there is no match.
DataPointCollection.FindMaxByValue DataPoint
Collection.FindMaxByValue
I n this Article
Overloads
FindMaxByValue() FindMaxByValue()
Finds the data point with the maximum value.
FindMaxByValue(String) FindMaxByValue(String)
Finds the data point value with the maximum value.
FindMaxByValue() FindMaxByValue()
Finds the data point with the maximum value.
public System.Windows.Forms.DataVisualization.Charting.DataPoint FindMaxByValue ();
member this.FindMaxByValue : unit -> System.Windows.Forms.DataVisualization.Charting.DataPoint
Returns
DataPoint DataPoint
The DataPoint object with the maximum value.
FindMaxByValue(String) FindMaxByValue(String)
Finds the data point value with the maximum value.
public System.Windows.Forms.DataVisualization.Charting.DataPoint FindMaxByValue (string useValue);
member this.FindMaxByValue : string -> System.Windows.Forms.DataVisualization.Charting.DataPoint
Parameters
useValue String String
The data point value to use (X, Y1, Y2...).
Returns
DataPoint DataPoint
The DataPoint object with the maximum value.
Parameters
useValue String String
The data point value to use (X, Y1, Y2...).
startIndex Int32 Int32
The index location of the data point to start searching from.
Returns
DataPoint DataPoint
The DataPoint object with the maximum value.
DataPointCollection.FindMinByValue DataPoint
Collection.FindMinByValue
I n this Article
Overloads
FindMinByValue() FindMinByValue()
Finds the data point with the minimum value.
FindMinByValue(String) FindMinByValue(String)
Finds the data point with the minimum value.
FindMinByValue() FindMinByValue()
Finds the data point with the minimum value.
public System.Windows.Forms.DataVisualization.Charting.DataPoint FindMinByValue ();
member this.FindMinByValue : unit -> System.Windows.Forms.DataVisualization.Charting.DataPoint
Returns
DataPoint DataPoint
The DataPoint object with the minimum value.
FindMinByValue(String) FindMinByValue(String)
Finds the data point with the minimum value.
public System.Windows.Forms.DataVisualization.Charting.DataPoint FindMinByValue (string useValue);
member this.FindMinByValue : string -> System.Windows.Forms.DataVisualization.Charting.DataPoint
Parameters
useValue String String
The data point value to use (X, Y1, Y2...).
Returns
DataPoint DataPoint
A DataPoint object with the minimum value.
Parameters
useValue String String
The data point value to use (X, Y1, Y2...).
startIndex Int32 Int32
The index location of the data point to start searching from.
Returns
DataPoint DataPoint
The DataPoint object with the minimum value.
DataPointCollection.InsertXY DataPointCollection.Insert
XY
I n this Article
Inserts a data point with the specified X value and one or more specified Y values.
public void InsertXY (int index, object xValue, params object[] yValue);
member this.InsertXY : int * obj * obj[] -> unit
Parameters
index Int32 Int32
The index at which the data point will be inserted.
xValue Object Object
The X value of the data point.
yValue Object[]
A comma-separated list of Y values of the data point.
DataPointCollection.InsertY DataPointCollection.InsertY
I n this Article
Inserts a data point with one or more specified Y values.
public void InsertY (int index, params object[] yValue);
member this.InsertY : int * obj[] -> unit
Parameters
index Int32 Int32
The index at which the data point will be inserted.
yValue Object[]
A comma-separated list of Y values of the data point.
DataPointComparer DataPointComparer Class
Compares data points.
D eclaration
public class DataPointComparer :
System.Collections.Generic.IComparer<System.Windows.Forms.DataVisualization.Charting.DataPoint>
type DataPointComparer = class
interface IComparer<DataPoint>
I nheritance H ierarchy
Object Object
Constructors
DataPointComparer(Series, PointSortOrder, String)
DataPointComparer(Series, PointSortOrder, String)
Initializes a new instance of the DataPointComparer class with the specified data series, sort order and sort value.
Methods
Compare(DataPoint, DataPoint)
Compare(DataPoint, DataPoint)
Parameters
x DataPoint DataPoint
First data point.
y DataPoint DataPoint
Second data point.
Returns
Int32 Int32
An integer value. Returns zero (0) if the two values are equal. Returns a positive integer if the value of x is greater
than the value of y ; otherwise, returns a negative integer.
DataPointComparer DataPointComparer
I n this Article
Initializes a new instance of the DataPointComparer class with the specified data series, sort order and sort value.
public DataPointComparer (System.Windows.Forms.DataVisualization.Charting.Series series,
System.Windows.Forms.DataVisualization.Charting.PointSortOrder sortOrder, string sortBy);
new System.Windows.Forms.DataVisualization.Charting.DataPointComparer :
System.Windows.Forms.DataVisualization.Charting.Series *
System.Windows.Forms.DataVisualization.Charting.PointSortOrder * string ->
System.Windows.Forms.DataVisualization.Charting.DataPointComparer
Parameters
series Series Series
Data series.
sortOrder PointSortOrder PointSortOrder
Sort order.
sortBy String String
Value used for the sort, for example, "X", "Y or Y1", "Y2", and so forth.
DataPointCustomProperties DataPointCustomProperties
Class
Defines custom properties that are common to data points, series and empty points.
D eclaration
[System.ComponentModel.TypeConverter("System.Windows.Forms.Design.DataVisualization.Charting.Dat
aPointCustomPropertiesConverter, System.Windows.Forms.DataVisualization.Design, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35")]
public class DataPointCustomProperties :
System.Windows.Forms.DataVisualization.Charting.ChartNamedElement
type DataPointCustomProperties = class
inherit ChartNamedElement
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
Remarks
This class defines custom properties such as colors, the use of background images, hatching, and so forth.
The Series class, DataPoint class and the EmptyPointStyle property are all derived from this class.
Constructors
DataPointCustomProperties()
DataPointCustomProperties()
DataPointCustomProperties(Series, Boolean)
DataPointCustomProperties(Series, Boolean)
Initializes a new instance of the DataPointCustomProperties class with the specified series and custom properties
flag.
Properties
AxisLabel
AxisLabel
Gets or sets the text of the X-axis label for the data point, series or an empty point. This property is only used if a
custom label has not been specified for the relevant Axis object.
BackGradientStyle
BackGradientStyle
Gets or sets the background gradient style.
BackHatchStyle
BackHatchStyle
BackImage
BackImage
BackImageAlignment
BackImageAlignment
Gets or sets the alignment of the background image, which is used with the Unscaled drawing mode.
BackImageTransparentColor
BackImageTransparentColor
Gets or sets a color that will be replaced with a transparent color when the background image is drawn.
BackImageWrapMode
BackImageWrapMode
BackSecondaryColor
BackSecondaryColor
BorderColor
BorderColor
BorderDashStyle
BorderDashStyle
BorderWidth
BorderWidth
Color
Color
CustomProperties
CustomProperties
Gets or sets the custom properties of the data point. Custom properties can be specified in the following format:
AttrName1=Value1, AttrName2=Value2 ...
CustomPropertiesExtended
CustomPropertiesExtended
Gets or sets the extended custom properties of the data point. Extended custom properties can be specified in the
following format: AttrName1=Value1, AttrName2=Value2...
Font
Font
IsValueShownAsLabel
IsValueShownAsLabel
Gets or sets a flag that indicates whether to show the value of the data point on the label.
IsVisibleInLegend
IsVisibleInLegend
Gets or sets a flag that indicates whether the item is shown in the legend.
Item[String]
Item[String]
Item[Int32]
Item[Int32]
LabelAngle
LabelAngle
LabelBackColor
LabelBackColor
LabelBorderColor
LabelBorderColor
LabelBorderDashStyle
LabelBorderDashStyle
LabelBorderWidth
LabelBorderWidth
LabelForeColor
LabelForeColor
LabelFormat
LabelFormat
LabelToolTip
LabelToolTip
LegendToolTip
LegendToolTip
MarkerBorderColor
MarkerBorderColor
MarkerBorderWidth
MarkerBorderWidth
MarkerColor
MarkerColor
MarkerImage
MarkerImage
MarkerImageTransparentColor
MarkerImageTransparentColor
Gets or sets the color that will be replaced with a transparent color when the marker image is drawn.
MarkerSize
MarkerSize
MarkerStyle
MarkerStyle
Methods
DeleteCustomProperty(String)
DeleteCustomProperty(String)
Deletes the data point custom property with the specified name.
GetCustomProperty(String)
GetCustomProperty(String)
Returns the data point custom property with the specified name.
IsCustomPropertySet(String)
IsCustomPropertySet(String)
Determines whether a custom property with the specified name was set.
ResetIsValueShownAsLabel()
ResetIsValueShownAsLabel()
ResetIsVisibleInLegend()
ResetIsVisibleInLegend()
SetCustomProperty(String, String)
SetCustomProperty(String, String)
SetDefault(Boolean)
SetDefault(Boolean)
Sets the default properties of the data point. Indicates whether the previous property values must be cleared.
DataPointCustomProperties.AxisLabel DataPointCustom
Properties.AxisLabel
I n this Article
Gets or sets the text of the X-axis label for the data point, series or an empty point. This property is only used if a
custom label has not been specified for the relevant Axis object.
[System.ComponentModel.Bindable(true)]
public virtual string AxisLabel { get; set; }
member this.AxisLabel : string with get, set
Returns
String String
A string value that represents the text of the X-axis label.
Attributes BindableAttribute
Remarks
This property sets the axis label for a data point, series or an empty point.
This property can only be set at run time for a Series object. If you set this property or a Series object, all of its data
points will use this label.
If the AxisLabel property is not set and a custom label has not been specified, an axis label will be generated
automatically using the axis scale.
Empty point labels are set using the EmptyPointStyle property.
DataPointCustomProperties.BackGradientStyle DataPoint
CustomProperties.BackGradientStyle
I n this Article
Gets or sets the background gradient style.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.GradientStyle BackGradientStyle { get; set; }
member this.BackGradientStyle : System.Windows.Forms.DataVisualization.Charting.GradientStyle with
get, set
Returns
GradientStyle GradientStyle
A GradientStyle enumeration value that is used to draw the background gradient style.
Attributes BindableAttribute
DataPointCustomProperties.BackHatchStyle DataPoint
CustomProperties.BackHatchStyle
I n this Article
Gets or sets the background hatching style.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle BackHatchStyle { get; set; }
member this.BackHatchStyle : System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle with
get, set
Returns
ChartHatchStyle ChartHatchStyle
A ChartHatchStyle enumeration value that is used to draw the background hatching style.
Attributes BindableAttribute
DataPointCustomProperties.BackImage DataPointCustom
Properties.BackImage
I n this Article
Gets or sets the background image of the data point.
[System.ComponentModel.Bindable(true)]
public string BackImage { get; set; }
member this.BackImage : string with get, set
Returns
String String
A string value that represents the name of the background image file.
Attributes BindableAttribute
DataPointCustomProperties.BackImageAlignment Data
PointCustomProperties.BackImageAlignment
I n this Article
Gets or sets the alignment of the background image, which is used with the Unscaled drawing mode.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartImageAlignmentStyle BackImageAlignment {
get; set; }
member this.BackImageAlignment :
System.Windows.Forms.DataVisualization.Charting.ChartImageAlignmentStyle with get, set
Returns
ChartImageAlignmentStyle ChartImageAlignmentStyle
A ChartImageAlignmentStyle enumeration value that specifies the alignment of the background image.
Attributes BindableAttribute
DataPointCustomProperties.BackImageTransparentColor
DataPointCustomProperties.BackImageTransparentColor
I n this Article
Gets or sets a color that will be replaced with a transparent color when the background image is drawn.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BackImageTransparentColor { get; set; }
member this.BackImageTransparentColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that will be replaced with a transparent color when the image is drawn.
Attributes BindableAttribute TypeConverterAttribute
DataPointCustomProperties.BackImageWrapMode Data
PointCustomProperties.BackImageWrapMode
I n this Article
Gets or sets the drawing mode of the background image.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartImageWrapMode BackImageWrapMode { get;
set; }
member this.BackImageWrapMode : System.Windows.Forms.DataVisualization.Charting.ChartImageWrapMode
with get, set
Returns
ChartImageWrapMode ChartImageWrapMode
A ChartImageWrapMode enumeration value that defines the drawing mode of the image.
Attributes BindableAttribute
DataPointCustomProperties.BackSecondaryColor Data
PointCustomProperties.BackSecondaryColor
I n this Article
Gets or sets the secondary background color.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BackSecondaryColor { get; set; }
member this.BackSecondaryColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that specifies the secondary background color.
Attributes BindableAttribute TypeConverterAttribute
DataPointCustomProperties.BorderColor DataPoint
CustomProperties.BorderColor
I n this Article
Gets or sets the border color of the data point.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BorderColor { get; set; }
member this.BorderColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that specifies the border color of the data point.
Attributes BindableAttribute TypeConverterAttribute
DataPointCustomProperties.BorderDashStyle DataPoint
CustomProperties.BorderDashStyle
I n this Article
Gets or sets the border style of the data point.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartDashStyle BorderDashStyle { get; set; }
member this.BorderDashStyle : System.Windows.Forms.DataVisualization.Charting.ChartDashStyle with
get, set
Returns
ChartDashStyle ChartDashStyle
A ChartDashStyle enumeration value that specifies the border style of the data point.
Attributes BindableAttribute
DataPointCustomProperties.BorderWidth DataPoint
CustomProperties.BorderWidth
I n this Article
Gets or sets the border width of the data point.
[System.ComponentModel.Bindable(true)]
public int BorderWidth { get; set; }
member this.BorderWidth : int with get, set
Returns
Int32 Int32
An integer value that specifies the border width of the data point.
Attributes BindableAttribute
DataPointCustomProperties.Color DataPointCustom
Properties.Color
I n this Article
Gets or sets the color of the data point.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color Color { get; set; }
member this.Color : System.Drawing.Color with get, set
Returns
Color Color
A Color value that is used to draw the color of the data point.
Attributes BindableAttribute TypeConverterAttribute
DataPointCustomProperties.CustomProperties DataPoint
CustomProperties.CustomProperties
I n this Article
Gets or sets the custom properties of the data point. Custom properties can be specified in the following format:
AttrName1=Value1, AttrName2=Value2 ...
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
public string CustomProperties { get; set; }
member this.CustomProperties : string with get, set
Returns
String String
A string value that represents the custom properties of the data point.
Attributes BindableAttribute BrowsableAttribute
DataPointCustomProperties.CustomPropertiesExtended
DataPointCustomProperties.CustomPropertiesExtended
I n this Article
Gets or sets the extended custom properties of the data point. Extended custom properties can be specified in the
following format: AttrName1=Value1, AttrName2=Value2...
[System.ComponentModel.Bindable(false)]
public System.Windows.Forms.DataVisualization.Charting.CustomProperties CustomPropertiesExtended {
get; set; }
member this.CustomPropertiesExtended :
System.Windows.Forms.DataVisualization.Charting.CustomProperties with get, set
Returns
CustomProperties CustomProperties
A CustomProperties object that represents the extended custom properties of the data point.
Attributes BindableAttribute
DataPointCustomProperties DataPointCustomProperties
I n this Article
Overloads
DataPointCustomProperties()
Initializes a new instance of the DataPointCustomProperties
class.
DataPointCustomProperties()
Initializes a new instance of the DataPointCustomProperties class.
public DataPointCustomProperties ();
DataPointCustomProperties(Series, Boolean)
DataPointCustomProperties(Series, Boolean)
Initializes a new instance of the DataPointCustomProperties class with the specified series and custom properties flag.
public DataPointCustomProperties (System.Windows.Forms.DataVisualization.Charting.Series series,
bool pointProperties);
new System.Windows.Forms.DataVisualization.Charting.DataPointCustomProperties :
System.Windows.Forms.DataVisualization.Charting.Series * bool ->
System.Windows.Forms.DataVisualization.Charting.DataPointCustomProperties
Parameters
series Series Series
The series that the data point belongs to.
pointProperties Boolean Boolean
A flag that indicates whether this is a data point custom property.
DataPointCustomProperties.DeleteCustomProperty Data
PointCustomProperties.DeleteCustomProperty
I n this Article
Deletes the data point custom property with the specified name.
Parameters
name String String
The name of the property to delete.
DataPointCustomProperties.Font DataPointCustom
Properties.Font
I n this Article
Gets or sets the font of the data point.
[System.ComponentModel.Bindable(true)]
public System.Drawing.Font Font { get; set; }
member this.Font : System.Drawing.Font with get, set
Returns
Font Font
A Font value that represents the font of the data point.
Attributes BindableAttribute
DataPointCustomProperties.GetCustomProperty Data
PointCustomProperties.GetCustomProperty
I n this Article
Returns the data point custom property with the specified name.
Parameters
name String String
The name of the property to return.
Returns
String String
A string value that represents the data point custom property with the specified name. If the requested property is
not set, the default custom property of the data series will be returned.
DataPointCustomProperties.IsCustomPropertySet Data
PointCustomProperties.IsCustomPropertySet
I n this Article
Determines whether a custom property with the specified name was set.
Parameters
name String String
The name of the custom property to check.
Returns
Boolean Boolean
true if the custom property was set; otherwise, false .
DataPointCustomProperties.IsValueShownAsLabel Data
PointCustomProperties.IsValueShownAsLabel
I n this Article
Gets or sets a flag that indicates whether to show the value of the data point on the label.
[System.ComponentModel.Bindable(true)]
public bool IsValueShownAsLabel { get; set; }
member this.IsValueShownAsLabel : bool with get, set
Returns
Boolean Boolean
true if the value of the data point is shown on the label; otherwise, false .
Attributes BindableAttribute
DataPointCustomProperties.IsVisibleInLegend DataPoint
CustomProperties.IsVisibleInLegend
I n this Article
Gets or sets a flag that indicates whether the item is shown in the legend.
[System.ComponentModel.Bindable(true)]
public bool IsVisibleInLegend { get; set; }
member this.IsVisibleInLegend : bool with get, set
Returns
Boolean Boolean
true if the item is shown in the legend; otherwise, false .
Attributes BindableAttribute
DataPointCustomProperties.Item[Int32] DataPoint
CustomProperties.Item[Int32]
I n this Article
Overloads
Item[String] Item[String]
Gets or sets the DataPointCustomProperties object by name.
Item[Int32] Item[Int32]
Gets the DataPointCustomProperties object by its position in
the index.
Item[String] Item[String]
Gets or sets the DataPointCustomProperties object by name.
public string this[string name] { get; set; }
member this.Item(string) : string with get, set
Parameters
name String String
The name of the custom property.
Returns
String String
A string value that represents the custom properties of the data point.
Item[Int32] Item[Int32]
Gets the DataPointCustomProperties object by its position in the index.
public string this[int index] { get; }
member this.Item(int) : string
Parameters
index Int32 Int32
The index of the custom property.
Returns
String String
A string value that represents the custom properties of the data point.
DataPointCustomProperties.Label DataPointCustom
Properties.Label
I n this Article
Gets or sets the text of the data point label.
[System.ComponentModel.Bindable(true)]
public virtual string Label { get; set; }
member this.Label : string with get, set
Returns
String String
A string value that represents the text of the data point label.
Attributes BindableAttribute
DataPointCustomProperties.LabelAngle DataPoint
CustomProperties.LabelAngle
I n this Article
Gets or sets the angle of the data point label.
[System.ComponentModel.Bindable(true)]
public int LabelAngle { get; set; }
member this.LabelAngle : int with get, set
Returns
Int32 Int32
An integer value that represents the angle of the label.
Attributes BindableAttribute
DataPointCustomProperties.LabelBackColor DataPoint
CustomProperties.LabelBackColor
I n this Article
Gets or sets the background color of the data point label.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color LabelBackColor { get; set; }
member this.LabelBackColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that represents the background color of the data point label.
Attributes BindableAttribute TypeConverterAttribute
DataPointCustomProperties.LabelBorderColor DataPoint
CustomProperties.LabelBorderColor
I n this Article
Gets or sets the border color of the data point label.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color LabelBorderColor { get; set; }
member this.LabelBorderColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that represents the border color of the data point label.
Attributes BindableAttribute TypeConverterAttribute
DataPointCustomProperties.LabelBorderDashStyle Data
PointCustomProperties.LabelBorderDashStyle
I n this Article
Gets or sets the border style of the label.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartDashStyle LabelBorderDashStyle { get;
set; }
member this.LabelBorderDashStyle : System.Windows.Forms.DataVisualization.Charting.ChartDashStyle
with get, set
Returns
ChartDashStyle ChartDashStyle
A ChartDashStyle enumeration value that specifies the border style of the label.
Attributes BindableAttribute
DataPointCustomProperties.LabelBorderWidth DataPoint
CustomProperties.LabelBorderWidth
I n this Article
Gets or sets the border width of the label.
[System.ComponentModel.Bindable(true)]
public int LabelBorderWidth { get; set; }
member this.LabelBorderWidth : int with get, set
Returns
Int32 Int32
An integer value that represents the width of the border.
Attributes BindableAttribute
DataPointCustomProperties.LabelForeColor DataPoint
CustomProperties.LabelForeColor
I n this Article
Gets or sets the text color of the label.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color LabelForeColor { get; set; }
member this.LabelForeColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that represents the text color of the label.
Attributes BindableAttribute TypeConverterAttribute
DataPointCustomProperties.LabelFormat DataPoint
CustomProperties.LabelFormat
I n this Article
Gets or sets the format of the data point label.
[System.ComponentModel.Bindable(true)]
public string LabelFormat { get; set; }
member this.LabelFormat : string with get, set
Returns
String String
A string value that represents the format of the label.
Attributes BindableAttribute
DataPointCustomProperties.LabelToolTip DataPoint
CustomProperties.LabelToolTip
I n this Article
Gets or sets the tooltip for the data point label.
[System.ComponentModel.Bindable(true)]
public string LabelToolTip { get; set; }
member this.LabelToolTip : string with get, set
Returns
String String
A string value that represents the tooltip for the data point label.
Attributes BindableAttribute
DataPointCustomProperties.LegendText DataPoint
CustomProperties.LegendText
I n this Article
Gets or sets the text of the item in the legend.
[System.ComponentModel.Bindable(true)]
public string LegendText { get; set; }
member this.LegendText : string with get, set
Returns
String String
A string value that represents the text of the item in the legend.
Attributes BindableAttribute
DataPointCustomProperties.LegendToolTip DataPoint
CustomProperties.LegendToolTip
I n this Article
Gets or sets the tooltip of the item in the legend.
[System.ComponentModel.Bindable(true)]
public string LegendToolTip { get; set; }
member this.LegendToolTip : string with get, set
Returns
String String
A string value that represents the tooltip of the item in the legend.
Attributes BindableAttribute
DataPointCustomProperties.MarkerBorderColor Data
PointCustomProperties.MarkerBorderColor
I n this Article
Gets or sets the border color of the marker.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color MarkerBorderColor { get; set; }
member this.MarkerBorderColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that represents the border color of the marker.
Attributes BindableAttribute TypeConverterAttribute
DataPointCustomProperties.MarkerBorderWidth Data
PointCustomProperties.MarkerBorderWidth
I n this Article
Gets or sets the border width of the marker.
[System.ComponentModel.Bindable(true)]
public int MarkerBorderWidth { get; set; }
member this.MarkerBorderWidth : int with get, set
Returns
Int32 Int32
An integer value that specifies the border width of the marker.
Attributes BindableAttribute
DataPointCustomProperties.MarkerColor DataPoint
CustomProperties.MarkerColor
I n this Article
Gets or sets the marker color.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color MarkerColor { get; set; }
member this.MarkerColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that is used to draw the marker color.
Attributes BindableAttribute TypeConverterAttribute
DataPointCustomProperties.MarkerImage DataPoint
CustomProperties.MarkerImage
I n this Article
Gets or sets the marker image.
[System.ComponentModel.Bindable(true)]
public string MarkerImage { get; set; }
member this.MarkerImage : string with get, set
Returns
String String
A string value that represents the name of the marker image file.
Attributes BindableAttribute
DataPointCustomProperties.MarkerImageTransparent
Color DataPointCustomProperties.MarkerImage
TransparentColor
I n this Article
Gets or sets the color that will be replaced with a transparent color when the marker image is drawn.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color MarkerImageTransparentColor { get; set; }
member this.MarkerImageTransparentColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that specifies the color that will be replaced with a transparent color when the marker image is drawn.
Attributes BindableAttribute TypeConverterAttribute
DataPointCustomProperties.MarkerSize DataPoint
CustomProperties.MarkerSize
I n this Article
Gets or sets the size of the marker.
[System.ComponentModel.Bindable(true)]
public int MarkerSize { get; set; }
member this.MarkerSize : int with get, set
Returns
Int32 Int32
An integer value that specifies the size of the marker.
Attributes BindableAttribute
DataPointCustomProperties.MarkerStyle DataPoint
CustomProperties.MarkerStyle
I n this Article
Gets or sets the marker style.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.MarkerStyle MarkerStyle { get; set; }
member this.MarkerStyle : System.Windows.Forms.DataVisualization.Charting.MarkerStyle with get, set
Returns
MarkerStyle MarkerStyle
A MarkerStyle enumeration value that specifies the marker style.
Attributes BindableAttribute
DataPointCustomProperties.ResetIsValueShownAsLabel
DataPointCustomProperties.ResetIsValueShownAsLabel
I n this Article
Resets a custom property to its default value.
Parameters
name String String
The name of the property to set.
propertyValue String String
The value of the property to set.
DataPointCustomProperties.SetDefault DataPointCustom
Properties.SetDefault
I n this Article
Sets the default properties of the data point. Indicates whether the previous property values must be cleared.
Parameters
clearAll Boolean Boolean
A flag that indicates whether to clear previous property values.
Remarks
If the clearAll parameter is set to true , all previous property values are cleared, otherwise they are not.
DataPointCustomProperties.ToolTip DataPointCustom
Properties.ToolTip
I n this Article
Gets or sets the tooltip.
[System.ComponentModel.Bindable(true)]
public string ToolTip { get; set; }
member this.ToolTip : string with get, set
Returns
String String
A string value that represents the tooltip.
Attributes BindableAttribute
DateRangeType DateRangeType Enum
Specifies a date/time interval that determines the ranges that will be filtered when you invoke one of the Filter
method definitionsfound in the DataManipulator class.
D eclaration
public enum DateRangeType
type DateRangeType =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The DateRangeType enumeration is passed in the DateRange parameter of some Filter methods, which combined
with the rangeElements parameter determines the date/time ranges that are filtered.
Fields
DayOfMonth DayOfMonth Date/time interval is days of the month.
D eclaration
public enum DateTimeIntervalType
type DateTimeIntervalType =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The DateTimeIntervalType enumeration represents date and time interval types.
Note that if you use the NotSet value, properties other than IntervalType or IntervalOffsetType will treat NotSet as an
Auto value.
The DateTimeIntervalType values are applicable to the LabelStyle, Grid, TickMark and StripLine classes.
Fields
Auto Auto Automatically determined by the Chart control.
NotSet The IntervalType or IntervalOffsetType property is not set. This value is used for grid lines, tick marks, strip
NotSet lines and axis labels, and indicates that the interval type is being obtained from the Axis object to which the
element belongs. Setting this value for an Axis object will have no effect.
D eclaration
public enum Docking
type Docking =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The Docking enumeration represents the docking location on the Chart control that an chart element should be
docked.
Set the IsDockedInsideChartArea property of the relevant chart element to specify whether that element will be
docked to the entire chart image or to a ChartArea object. The chart area is specified in the DockedToChartArea
property of the chart element.
Fields
Bottom Bottom Docked to the bottom of either the chart image or a ChartArea object.
Left Left Docked to the left of either the chart image or a ChartArea object.
Right Right Docked to the right of either the chart image or a ChartArea object.
Top Top Docked to the top of either the chart image or a ChartArea object.
ElementPosition ElementPosition Class
Represents the base class for many visual elements of the chart such as the legend, title, and chart areas. Defines the
position of the chart element in relative coordinates, which range from (0,0) to (100,100).
D eclaration
public class ElementPosition : System.Windows.Forms.DataVisualization.Charting.ChartElement
type ElementPosition = class
inherit ChartElement
I nheritance H ierarchy
Object Object
ChartElement ChartElement
Remarks
The ElementPosition class is used to define the position of a chart element, and represents one rectangle using the X, Y,
Width and Height properties.
The ElementPosition class is always exposed as a Position property, such as Position, Position, and so forth. It is also
exposed in the PrePaint and PostPaint events of the Chart control as a property of the ChartPaintEventArgs object.
The position of the applicable chart elements can be set automatically by setting the Auto property to true ; chart
elements can also be positioned at design time in the Design View.
There are two major differences between this class and a RectangleF structure:
This class can use automatic positioning.
This class only uses coordinates ranging from 0 to 100, otherwise an exception is thrown.
The position of chart elements is described using relative coordinates, with the top-left corner of an element having
coordinates of (0,0) and the bottom-right corner of an element having coordinates of (100,100).
Elements that are plotted within a chart area use coordinates that are relative to the chart area, whereas elements
outside a chart area use coordinates that are relative to the chart image.
Constructors
ElementPosition()
ElementPosition()
Initializes a new instance of the ElementPosition class with the specified x , y , width and height parameters.
Properties
Auto
Auto
Gets or sets a value that indicates whether an applicable chart element will be positioned automatically by the
Chart control.
Bottom
Bottom
Height
Height
Right
Right
Gets the position of the right side of a chart element, in relative coordinates.
Size
Size
Width
Width
X
X
Gets or sets the relative X-coordinate of the top-left corner of an applicable chart element.
Y
Y
Gets or sets the relative Y -coordinate of the top-left corner of an applicable chart element.
Methods
FromRectangleF(RectangleF)
FromRectangleF(RectangleF)
Initializes an ElementPosition object from a RectangleF structure.
ToRectangleF()
ToRectangleF()
[System.ComponentModel.Bindable(true)]
public bool Auto { get; set; }
member this.Auto : bool with get, set
Returns
Boolean Boolean
true if an applicable chart element will be positioned automatically by the chart control; otherwise, false .
Attributes BindableAttribute
Remarks
Use this property to automatically position a chart element. For example, to position the legend automatically, set the
Position property to Auto.
ElementPosition.Bottom ElementPosition.Bottom
I n this Article
Gets the bottom position of a chart element, in relative coordinates.
[System.ComponentModel.Browsable(false)]
public float Bottom { get; }
member this.Bottom : single
Returns
Single Single
A float value that represents the relative position of the bottom of a chart element.
Attributes BrowsableAttribute
Remarks
The bottom of the chart element is always expressed in relative coordinates, and is either relative to a ChartArea object
if plotted within a chart area, or relative to the entire chart image if plotted outside of a chart area element.
Chart coordinates use (0,0) for a top-left corner, and (100,100) for a bottom-right corner.
ElementPosition ElementPosition
I n this Article
Overloads
ElementPosition()
Initializes a new instance of the ElementPosition class.
ElementPosition()
Initializes a new instance of the ElementPosition class.
public ElementPosition ();
Parameters
x Single Single
The X position of the top-left corner of the chart control.
y Single Single
The Y position of the top-left corner of the chart control.
width Single Single
The width of the chart element.
height Single Single
The height of the chart element.
ElementPosition.FromRectangleF ElementPosition.From
RectangleF
I n this Article
Initializes an ElementPosition object from a RectangleF structure.
Parameters
rect RectangleF RectangleF
A RectangleF structure used to initialize the element position object.
ElementPosition.Height ElementPosition.Height
I n this Article
Gets or sets the height of a chart element.
[System.ComponentModel.Bindable(true)]
public float Height { get; set; }
member this.Height : single with get, set
Returns
Single Single
A float value that represents the height of the chart element.
Attributes BindableAttribute
Remarks
Always uses relative coordinates. If you set a value outside of the 0-100 pixel range, an exception will be thrown.
ElementPosition.Right ElementPosition.Right
I n this Article
Gets the position of the right side of a chart element, in relative coordinates.
[System.ComponentModel.Browsable(false)]
public float Right { get; }
member this.Right : single
Returns
Single Single
A float value that represents the relative position of the right side of a chart element.
Attributes BrowsableAttribute
Remarks
Returns a value that represents the relative position of the right side of an applicable chart element.
The right side position is always expressed in relative coordinates, and is either relative to a ChartArea object if plotted
within a chart area, or relative to the entire chart image if plotted outside of a chart area element.
Chart coordinates use (0,0) for a top-left corner, and (100,100) for a bottom-right corner.
ElementPosition.Size ElementPosition.Size
I n this Article
Gets the size of a chart element.
[System.ComponentModel.Browsable(false)]
public System.Drawing.SizeF Size { get; }
member this.Size : System.Drawing.SizeF
Returns
SizeF SizeF
A SizeF value that represents the size of a chart element.
Attributes BrowsableAttribute
ElementPosition.ToRectangleF ElementPosition.To
RectangleF
I n this Article
Returns a RectangleF object that uses the coordinates of an ElementPosition object.
Returns
RectangleF RectangleF
A RectangleF structure that represents the coordinates of an element position object.
Remarks
This method converts the position of an element to a RectangleF structure.
ElementPosition.Width ElementPosition.Width
I n this Article
Gets or sets the width of a chart element.
[System.ComponentModel.Bindable(true)]
public float Width { get; set; }
member this.Width : single with get, set
Returns
Single Single
A float value that represents the width of a chart element.
Attributes BindableAttribute
Remarks
This property always uses relative coordinates; if you set a value outside the 0-100 pixel range, an exception will be
thrown.
ElementPosition.X ElementPosition.X
I n this Article
Gets or sets the relative X-coordinate of the top-left corner of an applicable chart element.
[System.ComponentModel.Bindable(true)]
public float X { get; set; }
member this.X : single with get, set
Returns
Single Single
A float value that represents the X-coordinate of the top-left corner of an applicable chart element.
Attributes BindableAttribute
Remarks
The X property is always expressed in relative coordinates, and is either relative to a ChartArea object if plotted within
a chart area, or relative to the entire chart image if plotted outside of a chart area element.
This property always uses relative coordinates; if you set a value outside the 0-100 pixel range, an exception will be
thrown.
ElementPosition.Y ElementPosition.Y
I n this Article
Gets or sets the relative Y -coordinate of the top-left corner of an applicable chart element.
[System.ComponentModel.Bindable(true)]
public float Y { get; set; }
member this.Y : single with get, set
Returns
Single Single
A float value that represents the Y -coordinate of the top-left corner of an applicable chart element.
Attributes BindableAttribute
Remarks
The Y property is always expressed in relative coordinates, and is either relative to a ChartArea object if plotted within
a chart area, or relative to the entire chart image if plotted outside of a chart area element.
This property always uses relative coordinates; if you set a value outside the 0-100 pixel range, an exception will be
thrown.
EllipseAnnotation EllipseAnnotation Class
Represents an ellipse annotation.
D eclaration
public class EllipseAnnotation :
System.Windows.Forms.DataVisualization.Charting.RectangleAnnotation
type EllipseAnnotation = class
inherit RectangleAnnotation
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
Annotation Annotation
TextAnnotation TextAnnotation
RectangleAnnotation RectangleAnnotation
Remarks
An ellipse annotation can display text inside the ellipse, in addition to being displayed as an ellipse only. You can
therefore annotate using an ellipse or an ellipse with text inside it.
Constructors
EllipseAnnotation()
EllipseAnnotation()
Properties
AnnotationType
AnnotationType
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
public override string AnnotationType { get; }
member this.AnnotationType : string
Returns
String String
The annotation type.
Attributes BindableAttribute BrowsableAttribute
Remarks
This abstract property is used to get the name of each annotation type, such as a LineAnnotation, RectangleAnnotation,
or EllipseAnnotation.
This property is for internal use and should not be used.
EllipseAnnotation
I n this Article
Initializes a new instance of the EllipseAnnotation class.
public EllipseAnnotation ();
FinancialFormula FinancialFormula Enum
Specifies a financial formula.
D eclaration
public enum FinancialFormula
type FinancialFormula =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The FinancialFormula enumeration is used in calls to the FinancialFormula methods that are contained in the
DataFormula class, and specifies the type of financial formula to be used.
Fields
AccumulationDistribution Accumulation Distribution formula uses a relationship between volume and
AccumulationDistribution prices to estimate the strength of price movements; if volume is increased, there
is a high probability that prices will go up.
AverageTrueRange AverageTrueRange Average True Range indicator measures commitment and compares the range
between the High, Low and Close prices.
BollingerBands BollingerBands Bollinger Bands indicators are plotted at standard deviation levels above and
below a simple moving average.
CommodityChannelIndex Commodity Channel Index compares prices with their moving averages.
CommodityChannelIndex
EaseOfMovement EaseOfMovement Ease of Movement deals with the relationship between volume and price
change, and uses volume to indicate how strong a trend is for prices.
Envelopes Envelopes Envelopes are plotted above and below a moving average using a specified
percentage as the shift.
MassIndex MassIndex The Mass Index is used to predict trend reversal by comparing the difference
and range between High and Low prices.
MedianPrice MedianPrice Median prices are mid-point values of daily prices and can be used as a filter for
trend indicators.
MoneyFlow MoneyFlow The Money Flow indicator compares upward changes and downward changes of
volume-weighted typical prices.
MovingAverage MovingAverage A Simple Moving Average is an average of data calculated over a period of time.
The moving average is the most popular price indicator used in technical
analysis, and can be used with any price, for example, Hi, Low, Open and Close,
or can be applied to other indicators.
NegativeVolumeIndex The Negative Volume Index should be used with the Positive Volume index; the
NegativeVolumeIndex Negative Volume Index only changes if the volume decreases from the previous
day.
OnBalanceVolume OnBalanceVolume The On Balance Volume indicator measures positive and negative volume flow.
Performance Performance The Performance indicator compares a current closing price or any other price
with the first closing value from the first time period.
PositiveVolumeIndex The Positive Volume Index should be used with the Negative Volume index. The
PositiveVolumeIndex Positive volume index only changes if the volume decreases from the previous
day.
PriceVolumeTrend PriceVolumeTrend The Price Volume Trend is a cumulative volume total that is calculated using
relative changes of the closing price, and should be used with other indicators.
RateOfChange RateOfChange The Rate of Change indicator compares a specified closing price with the current
price.
RelativeStrengthIndex The Relative Strength Index is a momentum oscillator that compares upward
RelativeStrengthIndex movements of the closing price with downward movements, and results in
values that range from 0 to 100.
StandardDeviation Standard Deviation is used to indicate volatility, and measures the difference
StandardDeviation between values, for example, closing price, and their moving average.
StochasticIndicator The Stochastic Indicator helps to find trend reversal by searching in a period for
StochasticIndicator when the closing prices are close to low prices in an upward trending market
and when the closing prices are close to high prices in a downward trending
market.
TripleExponentialMovingAverage The Triple Exponential Moving Average is based on a triple moving average of
TripleExponentialMovingAverage the closing price. Its purpose is to eliminate short cycles. This indicator keeps
the closing price in trends that are shorter than the specified period.
TypicalPrice TypicalPrice Typical Price is the average value of daily prices, and can be used as a filter for
trend indicators.
VolatilityChaikins The Volatility Chaikins indicator measures the difference between High and Low
VolatilityChaikins prices, and is used to indicate tops or bottoms of the market.
VolumeOscillator VolumeOscillator The Volume Oscillator attempts to identify trends in volume by comparing two
moving averages: one with a short period and another with a longer period.
WeightedClose WeightedClose The Weighted Close formula calculates the average value of daily prices. The
only difference between Typical Price and the Weighted Close is that the closing
price has extra weight, and is considered the most important price.
WeightedMovingAverage Weighted Moving Average is an average of data that is calculated over a period
WeightedMovingAverage of time, where greater weight is attached to the most recent data.
WilliamsR WilliamsR Williams %R is a momentum indicator, and is used to measure overbought and
oversold levels.
FormatNumberEventArgs FormatNumberEventArgs
Class
Represents the event arguments of the localized number-formatting event.
D eclaration
public class FormatNumberEventArgs : EventArgs
type FormatNumberEventArgs = class
inherit EventArgs
I nheritance H ierarchy
Object Object
EventArgs EventArgs
Properties
ElementType
ElementType
Format
Format
LocalizedValue
LocalizedValue
SenderTag
SenderTag
Value
Value
ValueType
ValueType
Returns
ChartElementType ChartElementType
A ChartElementType enumeration value.
FormatNumberEventArgs.Format FormatNumberEvent
Args.Format
I n this Article
Gets or sets the format string.
Returns
String String
A string value that represents the format.
FormatNumberEventArgs.LocalizedValue FormatNumber
EventArgs.LocalizedValue
I n this Article
Gets or sets the localized text.
Returns
String String
A string value that represents the localized text.
FormatNumberEventArgs.SenderTag FormatNumber
EventArgs.SenderTag
I n this Article
Gets the sender object of the event.
Returns
Object Object
The sender object of the event.
FormatNumberEventArgs.Value FormatNumberEvent
Args.Value
I n this Article
Gets the value to be formatted.
Returns
Double Double
A double value.
FormatNumberEventArgs.ValueType FormatNumber
EventArgs.ValueType
I n this Article
Gets the value type.
Returns
ChartValueType ChartValueType
A ChartValueType enumeration value.
FTestResult FTestResult Class
Stores results of the FTest statistical methods.
D eclaration
public class FTestResult
type FTestResult = class
I nheritance H ierarchy
Object Object
Constructors
FTestResult()
FTestResult()
Properties
FCriticalValueOneTail
FCriticalValueOneTail
FirstSeriesMean
FirstSeriesMean
FirstSeriesVariance
FirstSeriesVariance
FValue
FValue
ProbabilityFOneTail
ProbabilityFOneTail
SecondSeriesVariance
SecondSeriesVariance
Returns
Double Double
A double value.
FTestResult.FirstSeriesMean FTestResult.FirstSeriesMean
I n this Article
Gets the first series mean.
public double FirstSeriesMean { get; }
member this.FirstSeriesMean : double
Returns
Double Double
A double value.
FTestResult.FirstSeriesVariance FTestResult.FirstSeries
Variance
I n this Article
Gets the first series variance.
Returns
Double Double
A double value.
FTestResult
I n this Article
Initializes a new instance of the FTestResult class.
public FTestResult ();
FTestResult.FValue FTestResult.FValue
I n this Article
Gets the F value.
public double FValue { get; }
member this.FValue : double
Returns
Double Double
A double value.
FTestResult.ProbabilityFOneTail FTestResult.Probability
FOneTail
I n this Article
Gets the Probability F one tail.
Returns
Double Double
A double value.
FTestResult.SecondSeriesMean FTestResult.SecondSeries
Mean
I n this Article
Gets the second series mean.
Returns
Double Double
A double value.
FTestResult.SecondSeriesVariance FTestResult.Second
SeriesVariance
I n this Article
Gets the second series variance.
Returns
Double Double
A double value.
GradientStyle GradientStyle Enum
Specifies a gradient style to be used for a chart element.
D eclaration
public enum GradientStyle
type GradientStyle =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The GradientStyle enumeration represents a gradient style, and is used with the BackGradientStyle property of the
Chart.
Fields
Center Center Gradient is applied from the center outwards.
D eclaration
public class Grid
type Grid = class
I nheritance H ierarchy
Object Object
Remarks
This class provides the functionality for the grids on the chart, and is exposed using the MajorGrid and MinorGrid
properties of each Axis object.
Major grid lines by default do not have their Interval, IntervalOffset, IntervalType, and IntervalOffsetType properties
set. When these properties for major grid lines are not set, the Chart control determines the appropriate values for grid
lines automatically.
The axis and its minor grid lines by default have their Interval, IntervalOffset, IntervalType, and IntervalOffsetType
properties set to Auto (0). If axis labels or minor grid lines are enabled and these properties are not modified, the
Chart control automatically determines how often to draw the minor grid lines.
Axis grids:
Can be enabled or disabled.
Have a starting point that determines where they are first drawn.
Display lines that can be set for style, width and color.
Can have either automatic intervals, or intervals that are set manually.
Constructors
Grid()
Grid()
Properties
Enabled
Enabled
Gets or sets a flag that determines whether major or minor grid lines are enabled.
Interval
Interval
IntervalOffsetType
IntervalOffsetType
Gets or sets the interval offset type of major and minor grid lines.
IntervalType
IntervalType
Gets or sets the interval type for major or minor grid lines.
LineColor
LineColor
LineDashStyle
LineDashStyle
LineWidth
LineWidth
Gets or sets the line width of major and minor grid lines.
Grid.Enabled Grid.Enabled
I n this Article
Gets or sets a flag that determines whether major or minor grid lines are enabled.
[System.ComponentModel.Bindable(true)]
public bool Enabled { get; set; }
member this.Enabled : bool with get, set
Returns
Boolean Boolean
true if enabled, false if disabled. The default is true for major grid objects and false for minor grid objects.
Attributes BindableAttribute
Remarks
Major and minor grids are visible when enabled, and not visible when disabled.
Tick marks will not be displayed if disabled.
You can disable tick marks by setting the TickMarkStyle property to None.
Grid
I n this Article
Initializes a new instance of the Grid class.
public Grid ();
Grid.Interval Grid.Interval
I n this Article
Gets or sets the interval between major or minor grid lines.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.AxisElem
entIntervalValueConverter))]
public double Interval { get; set; }
member this.Interval : double with get, set
Returns
Double Double
A double value that represents the interval between grid lines. By default, the value is not set ( NaN ) for major grid
lines. For minor grid lines, the default value is zero (0).
Attributes BindableAttribute TypeConverterAttribute
Remarks
By default this property is not set for axis labels, major tick marks and major grid lines. If it is not set - either by default,
by explicitly using NotSet at design time, or by assigning a value of NaN at run time - the actual value of this property
is determined by the Interval property of the Axis object to which the chart element, such as a grid line or tick mark,
belongs.
The interval of minor tick marks and grid lines is never affected by the Interval property value.
The interval is measured in axis units, and determines how often an applicable chart element is drawn. For example,
suppose a column chart has an X axis step of 1 (that is, 1, 2, 3, 4, and so forth); if you set the Interval property for the X
axis to 2, an axis label will be displayed for every other column.
The same holds true for all applicable chart elements. In other words, if in the previous example strip lines were being
used, with an IntervalOffset of 0.5, and their Interval property was 2, a strip line would be displayed at 0.5, 2.5, 4.5, and
so on.
If you set a chart element Interval property to zero, an interval will be automatically determined by the Chart control.
Grid.IntervalOffset Grid.IntervalOffset
I n this Article
Gets or sets the offset of grid lines.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.AxisElem
entIntervalValueConverter))]
public double IntervalOffset { get; set; }
member this.IntervalOffset : double with get, set
Returns
Double Double
A double value that represents the interval offset.
Attributes BindableAttribute TypeConverterAttribute
Remarks
By default this property is not set for axis labels, major tick marks and major grid lines. If it is not set - either by default,
by explicitly specifying "Not Set"at design time, or by assigning it a value of NotSet at run time - the actual value of this
property is determined by the IntervalOffset property of the Axis object that the chart element, such as a grid line or a
tick mark, belongs to.
The interval offset of minor tick marks and grid lines is never affected by the value of the IntervalOffset property of the
Axis object.
The IntervalOffsetType property setting defines the units of measurement of the offset.
The IntervalOffset can be a negative value.
Grid.IntervalOffsetType Grid.IntervalOffsetType
I n this Article
Gets or sets the interval offset type of major and minor grid lines.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType IntervalOffsetType {
get; set; }
member this.IntervalOffsetType :
System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType with get, set
Returns
DateTimeIntervalType DateTimeIntervalType
A DateTimeIntervalType enumeration value that indicates the interval type. By default it is not set for major grid lines.
The default value for minor grid lines is Auto.
Attributes BindableAttribute
Remarks
By default this property is not set for axis labels, major tick marks and major grid lines. If it is not set - either by default,
by explicitly specifying "Not Set" at design time, or by assigning it a value of NotSet at run time - the actual value of
this property is determined by the IntervalOffsetType property of the Axis object that the chart element - a grid line or
tick mark, for example - belongs to.
The interval offset type of minor tick marks and grid lines is never affected by the IntervalOffsetType property value.
If this interval offset type is set to Auto, the IntervalType property will be used.
Grid.IntervalType Grid.IntervalType
I n this Article
Gets or sets the interval type for major or minor grid lines.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType IntervalType { get; set;
}
member this.IntervalType : System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType with
get, set
Returns
DateTimeIntervalType DateTimeIntervalType
A DateTimeIntervalType enumeration value that indicates the interval type. By default it is not set for axis labels, major
tick marks and major grid lines, by using the NotSet enumeration value. The default value for minor tick marks and
grid lines is Auto.
Attributes BindableAttribute
Remarks
By default this property is not set for axis labels, major tick marks and major grid lines. If it is not set - either by default,
by explicitly using "Not Set" at design time, or by assigning it a value of NotSet at run time - the actual value of this
property is determined by the IntervalOffsetType property of the Axis object that the chart element - a grid line or tick
mark, for example - belongs to.
The interval type of minor tick marks and grid lines is never affected by the value of the IntervalType property.
Interval types can be set to Auto; the type of interval then depends on either the X-values or Y -values of the plotted
DataPoint objects, depending on which axis the applicable elements belong to.
Setting the IntervalType property for a value axis will only have an effect if the values of the data points are DateTime
or double values. Also, the XValueType or YValueType property of the plotted Series must be set to Auto or DateTime.
Setting the IntervalType property for a categorical axis will only have an effect if the XValueType property (or
YValueType property, depending on the axis in question) of the plotted Series object is either Auto or DateTime.
Note
Returns
Color Color
A Color object. The default value is Black.
Attributes BindableAttribute TypeConverterAttribute
Remarks
The LineColor property is used to specify the color of major and minor tick marks or grids.
Grid.LineDashStyle Grid.LineDashStyle
I n this Article
Gets or sets the line style of a grid.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartDashStyle LineDashStyle { get; set; }
member this.LineDashStyle : System.Windows.Forms.DataVisualization.Charting.ChartDashStyle with get,
set
Returns
ChartDashStyle ChartDashStyle
A ChartDashStyle enumeration value. The default is Solid.
Attributes BindableAttribute
Remarks
The LineDashStyle property can be used to specify the line style of major and minor tick marks or grids. The line can
be solid, dotted, and so forth.
Grid.LineWidth Grid.LineWidth
I n this Article
Gets or sets the line width of major and minor grid lines.
[System.ComponentModel.Bindable(true)]
public int LineWidth { get; set; }
member this.LineWidth : int with get, set
Returns
Int32 Int32
An integer that represents the line width in pixels. The default value is one (1).
Attributes BindableAttribute
Remarks
The LineWidth property can be used to specify the line width, in pixels, of major and minor tick marks or grids.
GridTickTypes GridTickTypes Enum
Specifies the options for displaying a grid line or a tick mark for a custom label.
D eclaration
[System.Flags]
public enum GridTickTypes
type GridTickTypes =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The GridTickTypes enumeration is used in conjunction with the GridTicks property to display a grid line and/or a tick
mark for a custom label.
Fields
All All A tick mark and a grid line are shown.
D eclaration
public class HitTestResult
type HitTestResult = class
I nheritance H ierarchy
Object Object
Remarks
The HitTestResult class represents the results of a hit test, and is exposed as the return object from a HitTest method
call.
A hit test checks a specified point in the chart to determine if a chart element is located at that point. If a chart element
is detected, the HitTestResult class is used to obtain information about that chart element.
If a chart element is found, the Object property returns a reference to the chart element; the only exception to this
being DataPoint objects, in which case the return value of this property is null .
If a data point is located, you can use the PointIndex property to get the index of that data point; that is, the zero-based
index of the point in the DataPointCollection. Use the Series property to get the associated Series object for that data
point.
The ChartArea and Axis properties are used to get the associated chart area and axis of the chart element - if any -
returned by the hit test. Note that these properties may be null if the returned chart element does not have an
associated chart area or axis.
Use the ChartElementType property to determine the type of the chart element returned by a hit test.
Constructors
HitTestResult()
HitTestResult()
Properties
Axis
Axis
Gets or sets the Axis object that may be associated with a chart element returned by a hit test. The presence of an
associated Axis object depends on whether a chart element was detected at the given location, and the type of
chart element returned.
ChartArea
ChartArea
Gets or sets the ChartArea object that may be associated with a chart element returned by a hit test. The presence
of a ChartArea object depends on whether a chart element was detected at the given location, and the type of
chart element returned.
ChartElementType
ChartElementType
Gets or sets the type of chart element, if any, returned by a hit test.
Object
Object
PointIndex
PointIndex
Gets or sets the index of a data point, if any, returned by a hit test.
Series
Series
Gets or sets the associated series of a data point, if any, returned by a hit test.
SubObject
SubObject
Returns
Axis Axis
An Axis object, otherwise null . The default value is null .
Remarks
If the chart object returned by the hit test is an object that is associated with an axis - for example, a scrollbar element,
tick mark, grid line or strip line - the Axis property will reference the Axis object with which the returned chart object is
associated. Otherwise this property will be null .
Note that the HitTest method can be called explicitly, in which case a chart element may or may not be at the specified
location.
HitTestResult.ChartArea HitTestResult.ChartArea
I n this Article
Gets or sets the ChartArea object that may be associated with a chart element returned by a hit test. The presence of a
ChartArea object depends on whether a chart element was detected at the given location, and the type of chart
element returned.
Returns
ChartArea ChartArea
A ChartArea object, otherwise null . The default value is null .
Remarks
If a Chart object is returned by the hit test, the ChartArea property will reference the ChartArea object that is
associated with the returned chart element.
If no chart element is returned by the hit test, the value of this property will be null .
Note The HitTest method can be called explicitly, in which case a chart element may or may not be at the specified
location.
HitTestResult.ChartElementType HitTestResult.Chart
ElementType
I n this Article
Gets or sets the type of chart element, if any, returned by a hit test.
Returns
ChartElementType ChartElementType
A ChartElementType enumeration value that indicates the type of chart element returned by a hit test. Defaults to
Nothing.
Remarks
Use this property to determine the type of chart element, if any, returned by a hit test.
HitTestResult
I n this Article
Initializes a new instance of the HitTestResult class.
public HitTestResult ();
HitTestResult.Object HitTestResult.Object
I n this Article
Gets or sets the object, if any, returned by a hit test.
public object Object { get; set; }
member this.Object : obj with get, set
Returns
Object Object
An object of type Object, otherwise null .
Remarks
If a chart element is located at the point that is checked by the hit test, this property will reference that chart element,
otherwise the value of this property will be null .
Note
If a data point is returned by the hit test, this property will still return a null . To obtain information about the data
point, use the PointIndex and Series properties instead.
HitTestResult.PointIndex HitTestResult.PointIndex
I n this Article
Gets or sets the index of a data point, if any, returned by a hit test.
public int PointIndex { get; set; }
member this.PointIndex : int with get, set
Returns
Int32 Int32
An integer value that represents the index of a data point returned by a hit test. The default value is negative one (-1).
Remarks
If a data point is at the location that is checked by a hit test, the PointIndex property will return the zero-based index of
that data point, otherwise it will return a negative one (-1).
All data points are stored in a DataPointCollection, which is exposed as the Points collection property of a Series object;
the index of the DataPointCollection is zero-based.
Use the Series property to determine the series to which the data point belongs.
HitTestResult.Series HitTestResult.Series
I n this Article
Gets or sets the associated series of a data point, if any, returned by a hit test.
public System.Windows.Forms.DataVisualization.Charting.Series Series { get; set; }
member this.Series : System.Windows.Forms.DataVisualization.Charting.Series with get, set
Returns
Series Series
The Series that a data point returned by a hit test belongs to. The default value is null .
Remarks
If a data point is at the location checked by a hit test, this property will reference the Series object that the data point
belongs to. If no data point is returned by the hit test, the value of this property will be null .
To determine the index of a returned data point, use the PointIndex property.
HitTestResult.SubObject HitTestResult.SubObject
I n this Article
Gets the sub-object, if any, returned by a hit test.
public object SubObject { get; set; }
member this.SubObject : obj with get, set
Returns
Object Object
A sub-object of type Object, otherwise null .
Remarks
An example of a sub-object is an Axis object that is displayed inside a ChartArea object.
HorizontalLineAnnotation HorizontalLineAnnotation
Class
Represents a horizontal line annotation.
D eclaration
public class HorizontalLineAnnotation :
System.Windows.Forms.DataVisualization.Charting.LineAnnotation
type HorizontalLineAnnotation = class
inherit LineAnnotation
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
Annotation Annotation
LineAnnotation LineAnnotation
Constructors
HorizontalLineAnnotation()
HorizontalLineAnnotation()
Properties
AnnotationType
AnnotationType
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
public override string AnnotationType { get; }
member this.AnnotationType : string
Returns
String String
The annotation type.
Attributes BindableAttribute BrowsableAttribute
Remarks
This abstract property is used to get the name of each annotation type, for example, LineAnnotation,
RectangleAnnotation, EllipseAnnotation, and so forth.
This property is for internal use.
HorizontalLineAnnotation
I n this Article
Initializes a new instance of the HorizontalLineAnnotation class.
public HorizontalLineAnnotation ();
IDataPointFilter IDataPointFilter Interface
Exposes the FilterDataPoint(DataPoint, Series, Int32) method, which allows Series data to be custom filtered.
D eclaration
public interface IDataPointFilter
type IDataPointFilter = interface
I nheritance H ierarchy
None
Remarks
The IDataPointFilter interface exposes the FilterDataPoint method, which takes a specific data point within a series and
returns a Boolean value that determines whether that data point will be filtered.
To perform custom filtering:
Derive a new or existing class from this interface.
Override the FilterDataPoint method to provide the custom filtering logic.
To initiate the filtering operation, call one of the Filter methods in the DataManipulator class that takes an
IDataPointFilter object as its first parameter.
For sample source code, see the FilterDataPoint method.
Methods
FilterDataPoint(DataPoint, Series, Int32)
FilterDataPoint(DataPoint, Series, Int32)
Parameters
point DataPoint DataPoint
The DataPoint object to be filtered.
series Series Series
The Series object that the data point belongs to.
pointIndex Int32 Int32
The index of the data point, which determines its position in the series.
Returns
Boolean Boolean
true if the data point is removed; otherwise, false .
Remarks
This method should be called for each data point in a series, and returns a Boolean value indicating whether a data
point should be filtered.
To provide custom filtering, derive a new or existing class from the IDataPointFilter interface and then implement this
method. Provide custom criteria matching logic, then return true or false to mark the data points to be filtered. After
this method has been implemented, use one of the Filter method definitions in the DataManipulator class that takes
an IDataPointFilter object as a parameter to perform the filtering.
Filtered points, by default, are removed from a series. They can also be displayed as empty points by setting the value
of the FilterSetEmptyPoints property to true .
Filtered points can also be marked as filtered if they do not match filtering criteria, as determined by the
FilterMatchedPoints value.
ImageAnnotation ImageAnnotation Class
Represents an image annotation.
D eclaration
public class ImageAnnotation : System.Windows.Forms.DataVisualization.Charting.Annotation
type ImageAnnotation = class
inherit Annotation
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
Annotation Annotation
Constructors
ImageAnnotation()
ImageAnnotation()
Properties
Alignment
Alignment
AnnotationType
AnnotationType
BackColor
BackColor
BackGradientStyle
BackGradientStyle
BackHatchStyle
BackHatchStyle
This property is not applicable to the image annotation type.
BackSecondaryColor
BackSecondaryColor
Font
Font
ForeColor
ForeColor
Image
Image
ImageTransparentColor
ImageTransparentColor
Gets or sets a color that will be replaced with a transparent color when the image is drawn.
ImageWrapMode
ImageWrapMode
LineColor
LineColor
LineDashStyle
LineDashStyle
LineWidth
LineWidth
TextStyle
TextStyle
Returns
ContentAlignment ContentAlignment
A ContentAlignment value that represents the alignment of the annotation image.
Remarks
This property is used to align a non-scaled image.
ImageAnnotation.AnnotationType ImageAnnotation.
AnnotationType
I n this Article
Gets the annotation type name.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
public override string AnnotationType { get; }
member this.AnnotationType : string
Returns
String String
The annotation type.
Attributes BindableAttribute BrowsableAttribute
Remarks
This abstract property is used to get the name of each annotation type such as LineAnnotation, RectangleAnnotation,
EllipseAnnotation, and so forth.
This property is for internal use.
ImageAnnotation.BackColor ImageAnnotation.BackColor
I n this Article
This property is not applicable to the image annotation type.
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color BackColor { get; set; }
member this.BackColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value.
Attributes BrowsableAttribute TypeConverterAttribute
Remarks
This property is not applicable to the image annotation type.
ImageAnnotation.BackGradientStyle ImageAnnotation.
BackGradientStyle
I n this Article
This property is not applicable to the image annotation type.
[System.ComponentModel.Browsable(false)]
public override System.Windows.Forms.DataVisualization.Charting.GradientStyle BackGradientStyle {
get; set; }
member this.BackGradientStyle : System.Windows.Forms.DataVisualization.Charting.GradientStyle with
get, set
Returns
GradientStyle GradientStyle
A GradientStyle enumeration value.
Attributes BrowsableAttribute
Remarks
This property is not applicable to the image annotation type.
ImageAnnotation.BackHatchStyle ImageAnnotation.Back
HatchStyle
I n this Article
This property is not applicable to the image annotation type.
[System.ComponentModel.Browsable(false)]
public override System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle BackHatchStyle {
get; set; }
member this.BackHatchStyle : System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle with
get, set
Returns
ChartHatchStyle ChartHatchStyle
A ChartHatchStyle enumeration value.
Attributes BrowsableAttribute
Remarks
This property is not applicable to the image annotation type.
ImageAnnotation.BackSecondaryColor Image
Annotation.BackSecondaryColor
I n this Article
This property is not applicable to the image annotation type.
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color BackSecondaryColor { get; set; }
member this.BackSecondaryColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value.
Attributes BrowsableAttribute TypeConverterAttribute
Remarks
This property is not applicable to the image annotation type.
ImageAnnotation.Font ImageAnnotation.Font
I n this Article
This property is not applicable to the image annotation type.
[System.ComponentModel.Browsable(false)]
public override System.Drawing.Font Font { get; set; }
member this.Font : System.Drawing.Font with get, set
Returns
Font Font
A Font object.
Attributes BrowsableAttribute
Remarks
This property is not applicable to the image annotation type.
ImageAnnotation.ForeColor ImageAnnotation.ForeColor
I n this Article
This property is not applicable to the image annotation type.
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color ForeColor { get; set; }
member this.ForeColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value.
Attributes BrowsableAttribute TypeConverterAttribute
Remarks
This property is not applicable to the image annotation type.
ImageAnnotation.Image ImageAnnotation.Image
I n this Article
Gets or sets the name of the annotation image.
[System.ComponentModel.Bindable(true)]
public virtual string Image { get; set; }
member this.Image : string with get, set
Returns
String String
A string value that represents the name of the annotation image.
Attributes BindableAttribute
Remarks
The image name can be a file name, a URL or a named image - that is, its name component - from the
NamedImagesCollection class.
ImageAnnotation
I n this Article
Initializes a new instance of the ImageAnnotation class.
public ImageAnnotation ();
ImageAnnotation.ImageTransparentColor Image
Annotation.ImageTransparentColor
I n this Article
Gets or sets a color that will be replaced with a transparent color when the image is drawn.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color ImageTransparentColor { get; set; }
member this.ImageTransparentColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that will be replaced with a transparent color when he image is drawn.
Attributes BindableAttribute TypeConverterAttribute
ImageAnnotation.ImageWrapMode ImageAnnotation.
ImageWrapMode
I n this Article
Gets or sets the drawing mode of the image.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartImageWrapMode ImageWrapMode { get; set;
}
member this.ImageWrapMode : System.Windows.Forms.DataVisualization.Charting.ChartImageWrapMode with
get, set
Returns
ChartImageWrapMode ChartImageWrapMode
A ChartImageWrapMode enumeration value that defines the drawing mode of the image.
Attributes BindableAttribute
ImageAnnotation.LineColor ImageAnnotation.LineColor
I n this Article
This property is not applicable to the image annotation type.
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color LineColor { get; set; }
member this.LineColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value.
Attributes BrowsableAttribute TypeConverterAttribute
Remarks
This property is not applicable to the image annotation type.
ImageAnnotation.LineDashStyle ImageAnnotation.Line
DashStyle
I n this Article
This property is not applicable to the image annotation type.
[System.ComponentModel.Browsable(false)]
public override System.Windows.Forms.DataVisualization.Charting.ChartDashStyle LineDashStyle { get;
set; }
member this.LineDashStyle : System.Windows.Forms.DataVisualization.Charting.ChartDashStyle with get,
set
Returns
ChartDashStyle ChartDashStyle
A ChartDashStyle enumeration value.
Attributes BrowsableAttribute
Remarks
This property is not applicable to the image annotation type.
ImageAnnotation.LineWidth ImageAnnotation.LineWidth
I n this Article
This property is not applicable to the image annotation type.
[System.ComponentModel.Browsable(false)]
public override int LineWidth { get; set; }
member this.LineWidth : int with get, set
Returns
Int32 Int32
An integer value.
Attributes BrowsableAttribute
Remarks
This property is not applicable to the image annotation type.
ImageAnnotation.TextStyle ImageAnnotation.TextStyle
I n this Article
Gets or sets the text style of the annotation.
[System.ComponentModel.Browsable(false)]
public override System.Windows.Forms.DataVisualization.Charting.TextStyle TextStyle { get; set; }
member this.TextStyle : System.Windows.Forms.DataVisualization.Charting.TextStyle with get, set
Returns
TextStyle TextStyle
A TextStyle enumeration value that represents the style used to draw the annotation text.
Attributes BrowsableAttribute
IntervalAutoMode IntervalAutoMode Enum
Specifies the automatic axis interval mode.
D eclaration
public enum IntervalAutoMode
type IntervalAutoMode =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Fields
FixedCount FixedCount A fixed number of intervals are always created on the axis.
VariableCount VariableCount The number of axis intervals depends on the axis length.
IntervalType IntervalType Enum
Specifies an interval type.
D eclaration
public enum IntervalType
type IntervalType =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The IntervalType enumeration represents the type of interval and interval offset used for some definitions of the
Group and InsertEmptyPoints methods of the DataManipulator class.
Fields
Days Days An interval of days.
D eclaration
[System.Flags]
public enum LabelAlignmentStyles
type LabelAlignmentStyles =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The LabelAlignmentStyles enumeration represents the alignment of a label; it is set by the MovingDirection property.
Fields
Bottom Bottom Label is aligned to the bottom of the data point.
TopLeft TopLeft Label is aligned to the top-left corner of the data point.
TopRight TopRight Label is aligned to the top-right corner of the data point.
LabelAutoFitStyles LabelAutoFitStyles Enum
Specifies style changes that can automatically be made to a label when the LabelAutoFitStyle property is used.
D eclaration
[System.Flags]
public enum LabelAutoFitStyles
type LabelAutoFitStyles =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The LabelAutoFitStyles enumeration represents the changes to the font or orientation of labels that can be
automatically made to enable labels to fit along the axis.
Fields
DecreaseFont DecreaseFont Label font can be decreased.
LabelsAngleStep30 LabelsAngleStep30 Labels can be angled in 30 degree steps: 0, 30, 60 and 90.
LabelsAngleStep45 LabelsAngleStep45 Labels can be angled in 45 degree steps: 0, 45, and 90.
D eclaration
public enum LabelCalloutStyle
type LabelCalloutStyle =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The LabelCalloutStyle enumeration represents the type of leader line that should be drawn from the point to the label.
It is used in conjunction with the CalloutStyle property of the SmartLabelStyle object.
Fields
Box Box Line will terminate at a box drawn around the label text.
None None Line will terminate at the label without any added style.
Underlined Underlined Line will terminate with a horizontal line beneath the label text.
LabelMarkStyle LabelMarkStyle Enum
Specifies a mark for custom labels.
D eclaration
public enum LabelMarkStyle
type LabelMarkStyle =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The LabelMarkStyle enumeration represents mark(s) for custom labels that are displayed along the second axis label
row. This row can only be generated from custom labels. This enumeration is used in conjunction with the LabelMark
property of the CustomLabel class.
Fields
Box Box Draws a box around the label. The box always starts at the axis position.
D eclaration
public enum LabelOutsidePlotAreaStyle
type LabelOutsidePlotAreaStyle =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The LabelOutsidePlotAreaStyle enumeration represents the degree to which a label is allowed to leave a plotting area.
It is used in conjunction with the AllowOutsidePlotArea property of the SmartLabelStyle object.
If you specify the Partial value, no more than 50% of the label can be drawn outside the plotting area.
Fields
No No Labels cannot de drawn outside the plotting area.
Partial Partial Labels can be drawn partially outside the plotting area.
D eclaration
public class LabelStyle : System.Windows.Forms.DataVisualization.Charting.ChartElement
type LabelStyle = class
inherit ChartElement
I nheritance H ierarchy
Object Object
ChartElement ChartElement
Remarks
Members of this class are also used to calculate the intervals and positions of the axis labels, and to draw them.
Constructors
LabelStyle()
LabelStyle()
Properties
Angle
Angle
Gets or sets a value that represents the angle at which the font is drawn.
Enabled
Enabled
Font
Font
ForeColor
ForeColor
Interval
Interval
IntervalOffset
IntervalOffset
IntervalOffsetType
IntervalOffsetType
IntervalType
IntervalType
Gets or sets the unit of measurement for the size of a label interval.
IsEndLabelVisible
IsEndLabelVisible
Gets or sets a flag that determines whether the labels are shown at axis ends.
IsStaggered
IsStaggered
Gets or sets a flag that determines whether the labels are shown with an offset.
TruncatedLabels
TruncatedLabels
Gets or sets a flag that determines whether the labels can be truncated.
Methods
Dispose(Boolean)
Dispose(Boolean)
Returns
Int32 Int32
An integer value.
Attributes BindableAttribute
LabelStyle.Dispose LabelStyle.Dispose
I n this Article
Releases the resources used by the LabelStyle.
protected override void Dispose (bool disposing);
override this.Dispose : bool -> unit
Parameters
disposing Boolean Boolean
true to release both managed and unmanaged resources; false to release only unmanaged resources.
LabelStyle.Enabled LabelStyle.Enabled
I n this Article
Gets or sets a flag that indicates whether the label is enabled.
[System.ComponentModel.Bindable(true)]
public bool Enabled { get; set; }
member this.Enabled : bool with get, set
Returns
Boolean Boolean
true if the label is enabled; otherwise, false .
Attributes BindableAttribute
LabelStyle.Font LabelStyle.Font
I n this Article
Gets or sets the font of the label.
[System.ComponentModel.Bindable(true)]
public System.Drawing.Font Font { get; set; }
member this.Font : System.Drawing.Font with get, set
Returns
Font Font
A Font object.
Attributes BindableAttribute
LabelStyle.ForeColor LabelStyle.ForeColor
I n this Article
Gets or sets the color of the label.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color ForeColor { get; set; }
member this.ForeColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value.
Attributes BindableAttribute TypeConverterAttribute
LabelStyle.Format LabelStyle.Format
I n this Article
Gets or sets the formatting string for the label text.
[System.ComponentModel.Bindable(true)]
public string Format { get; set; }
member this.Format : string with get, set
Returns
String String
A string value.
Attributes BindableAttribute
LabelStyle.Interval LabelStyle.Interval
I n this Article
Gets or sets the size of the label interval.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.AxisElem
entIntervalValueConverter))]
public double Interval { get; set; }
member this.Interval : double with get, set
Returns
Double Double
A double value.
Attributes BindableAttribute TypeConverterAttribute
Remarks
This property is not set by default.
LabelStyle.IntervalOffset LabelStyle.IntervalOffset
I n this Article
Gets or sets the offset of the label interval.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.AxisElem
entIntervalValueConverter))]
public double IntervalOffset { get; set; }
member this.IntervalOffset : double with get, set
Returns
Double Double
A double value.
Attributes BindableAttribute TypeConverterAttribute
Remarks
This property is not set by default.
LabelStyle.IntervalOffsetType LabelStyle.IntervalOffset
Type
I n this Article
Gets or sets the unit of measurement of the label interval offset.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType IntervalOffsetType {
get; set; }
member this.IntervalOffsetType :
System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType with get, set
Returns
DateTimeIntervalType DateTimeIntervalType
A DateTimeIntervalType enumeration value.
Attributes BindableAttribute
Remarks
This property is not set by default.
LabelStyle.IntervalType LabelStyle.IntervalType
I n this Article
Gets or sets the unit of measurement for the size of a label interval.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType IntervalType { get; set;
}
member this.IntervalType : System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType with
get, set
Returns
DateTimeIntervalType DateTimeIntervalType
A DateTimeIntervalType enumeration value.
Attributes BindableAttribute
Remarks
This property is not set by default.
LabelStyle.IsEndLabelVisible LabelStyle.IsEndLabelVisible
I n this Article
Gets or sets a flag that determines whether the labels are shown at axis ends.
[System.ComponentModel.Bindable(true)]
public bool IsEndLabelVisible { get; set; }
member this.IsEndLabelVisible : bool with get, set
Returns
Boolean Boolean
true if the labels are shown at axis ends; otherwise, false .
Attributes BindableAttribute
LabelStyle.IsStaggered LabelStyle.IsStaggered
I n this Article
Gets or sets a flag that determines whether the labels are shown with an offset.
[System.ComponentModel.Bindable(true)]
public bool IsStaggered { get; set; }
member this.IsStaggered : bool with get, set
Returns
Boolean Boolean
true if the labels are shown with an offset; otherwise, false .
Attributes BindableAttribute
LabelStyle
I n this Article
Initializes a new instance of the LabelStyle class.
public LabelStyle ();
LabelStyle.TruncatedLabels LabelStyle.TruncatedLabels
I n this Article
Gets or sets a flag that determines whether the labels can be truncated.
[System.ComponentModel.Bindable(true)]
public bool TruncatedLabels { get; set; }
member this.TruncatedLabels : bool with get, set
Returns
Boolean Boolean
true if the labels can be truncated; otherwise, false .
Attributes BindableAttribute
Legend Legend Class
Represents the legend for the chart image.
D eclaration
public class Legend : System.Windows.Forms.DataVisualization.Charting.ChartNamedElement
type Legend = class
inherit ChartNamedElement
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
Remarks
The Legend class encapsulates all the functionality of the Chart control's legend, and is exposed using the Legends
collection property of the root Chart object.
There can be any number of legends for a chart image.
Legends can:
Be docked and aligned.
Be displayed inside or outside the plotted chart areas.
Automatically fit their contents.
Use a predefined style, such as row, column or table.
Use hatching, gradient colors and background images.
Be sized and positioned anywhere within the chart image.
Legend items are represented by the LegendItem object, and are either default or custom items. Custom items are not
associated with data, and can be added, deleted and modified using the CustomItems property.
Default items are by default automatically added to the legend, and are the names of the plotted data points for
doughnut and pie charts.
For all other chart types, the default items are the names of the plotted data series. Each series has a Legend property
that defines the name of the legend that will be used. A legend item will not be created for a series if the
IsVisibleInLegend property is set to false . The text for these default items can be changed using the LegendText
property. This property will allow you to specify predefined keywords that will be replaced by their appropriate values
at run-time.
If you have a pie chart and you set the Label property, it will also set the legend text to the value you set for the labels.
If you want to set the text to a different value, you can set the LegendText property. In most cases, you would want to
set the LegendText property to "#AXISLABEL" or "#VALX".
Legend series symbols are rectangles, dots or lines. The symbol type is set automatically by the chart and depends on
the plotted chart type.
Legend text by default is automatically sized. You can disable automatic sizing of legend text by disabling the
IsTextAutoFit property. When this property is set to false , the size of the legend text is determined by the Size
property of the legend Font. If the IsTextAutoFit property is enabled, the AutoFitMinFontSize property determines the
minimum font size that a legend item can have when resizing.
The TextWrapThreshold property defines a limit on the number of characters that can be shown on one line before text
is wrapped to another line. If you do not wish to wrap text in the legend, set the value of the TextWrapThreshold
property to zero. By default, when the entire legend text does not fit in the legend, the text will be truncated. You can set
the TextWrapThreshold on the legend to get the text to wrap instead of being truncated.
If the contents of the legend cannot fit into the given space, legend entries are truncated. An ellipsis is shown to
indicate that there are more entries than the legend has space for. To prevent the legend items from being truncated,
set the position and size of the legend using the Position property. When setting the legend position or size, the chart
can no longer automatically position the elements in the chart. In some cases, you many need to manually position
other chart elements to achieve the desired appearance.
Another option would be to define your own cell columns instead of using the default legend settings.
The Legend object has a CellColumn Collection; each CellColumn object represents a column in the Legend. A cell
column has MaximumWidth and MinimumWidth properties that can be used to adjust the size of the columns.
When the legend contains many entries, InterlacedRows can be used to improve readability. When this property is set
to True, it will display a back color that you can set using the InterlacedRowsColor property.
By default, the legend is positioned in the top-right corner of the chart. This position can be modified by using the
Docking and Alignment properties of the legend. The legend can also be associated with a chart area by use of the
DockedToChartArea property. This property specifies the name of the chart area for which the legend should be
docked. In addition, the IsDockedInsideChartArea property can be used to display the legend inside a chart area.
When IsDockedInsideChartArea is set to False, the MaximumAutoSize property defines the maximum size, in percent,
of the legend within the available chart when the legend is automatically positioned. This property should be set if you
wish to adjust the width or height of the legend after the docking properties have been set.
The legend can be modified using the CustomizeLegend event.
Constructors
Legend()
Legend()
Legend(String)
Legend(String)
Initializes a new instance of the AnnotationPathPoint class with the specified legend name.
Properties
Alignment
Alignment
Gets or sets the minimum font size that can be used by the autofitting algorithm for the legend text.
BackColor
BackColor
BackGradientStyle
BackGradientStyle
Gets or sets the orientation for the background gradient of a legend. Also determines whether a gradient is used.
BackHatchStyle
BackHatchStyle
BackImage
BackImage
BackImageAlignment
BackImageAlignment
Gets or sets the background image alignment used for the Unscaled drawing mode.
BackImageTransparentColor
BackImageTransparentColor
Gets or sets a color that will be replaced with a transparent color when the background image is drawn.
BackImageWrapMode
BackImageWrapMode
BackSecondaryColor
BackSecondaryColor
BorderDashStyle
BorderDashStyle
BorderWidth
BorderWidth
CellColumns
CellColumns
Gets the LegendCellColumnCollection object that contains the collection of cell columns for a legend.
CustomItems
CustomItems
DockedToChartArea
DockedToChartArea
Gets or sets the name of the ChartArea where the legend will be docked.
Docking
Docking
Enabled
Enabled
Font
Font
Gets or sets a Font object, which is used to set font properties of the legend.
ForeColor
ForeColor
HeaderSeparator
HeaderSeparator
Gets or sets the visual separator type for the legend header.
HeaderSeparatorColor
HeaderSeparatorColor
Gets or sets the color of the separator for the legend header.
InsideChartArea
InsideChartArea
Gets or sets the name of the chart area in which the legend is drawn.
InterlacedRows
InterlacedRows
Gets or sets a flag that indicates whether legend rows will be drawn with interlaced background color.
InterlacedRowsColor
InterlacedRowsColor
IsDockedInsideChartArea
IsDockedInsideChartArea
Gets or sets a flag that indicates whether the legend is docked inside or outside the chart area.
IsEquallySpacedItems
IsEquallySpacedItems
Gets or sets a flag that indicates whether all legend items are equally spaced.
IsTextAutoFit
IsTextAutoFit
Gets or sets a flag that indicates whether the legend text is automatically sized.
ItemColumnSeparator
ItemColumnSeparator
Gets or sets the visual separator type for the legend table columns.
ItemColumnSeparatorColor
ItemColumnSeparatorColor
ItemColumnSpacing
ItemColumnSpacing
LegendItemOrder
LegendItemOrder
Gets or sets a value that specifies the order in which legend items are displayed. This property only affects legend
items automatically added for the chart series; it has no effect on custom legend items.
LegendStyle
LegendStyle
MaximumAutoSize
MaximumAutoSize
Gets or sets the maximum size of the legend, measured as a percentage of the chart area. This value is used by the
automatic layout algorithm.
Name
Name
Position
Position
Gets or sets an ElementPosition object, which can be used to get or set the position of the legend.
ShadowColor
ShadowColor
TableStyle
TableStyle
TextWrapThreshold
TextWrapThreshold
Gets or sets the number of characters that can be sequentially displayed in the legend before the text is wrapped.
Title
Title
TitleAlignment
TitleAlignment
TitleBackColor
TitleBackColor
TitleFont
TitleFont
TitleForeColor
TitleForeColor
TitleSeparator
TitleSeparator
Gets or sets the visual separator type for the legend title.
TitleSeparatorColor
TitleSeparatorColor
Methods
Dispose(Boolean)
Dispose(Boolean)
Releases the unmanaged resources used by the Legend and optionally releases the managed resources.
Legend.Alignment Legend.Alignment
I n this Article
Gets or sets the alignment of the legend.
[System.ComponentModel.Bindable(true)]
public System.Drawing.StringAlignment Alignment { get; set; }
member this.Alignment : System.Drawing.StringAlignment with get, set
Returns
StringAlignment StringAlignment
A .NET Framework StringAlignment enumeration value that represents the alignment of the legend. The default value
is Near.
Attributes BindableAttribute
Remarks
The legend can be aligned so that it is Near, Center or Far; its alignment is also affected by the Docking property
setting.
If the legend is docked to the top or bottom, Near is to the left; if it is docked to the left or right, Near is at the top. The
Far property setting is just the opposite, and aligns the legend to the right or the bottom, depending on where it is
docked.
Center always centers the legend, either vertically or horizontally.
Setting the Alignment property will have no effect if the Position property is not set to Auto.
Legend.AutoFitMinFontSize Legend.AutoFitMinFontSize
I n this Article
Gets or sets the minimum font size that can be used by the autofitting algorithm for the legend text.
public int AutoFitMinFontSize { get; set; }
member this.AutoFitMinFontSize : int with get, set
Returns
Int32 Int32
An integer value that represents the minimum font size that can be used by the autofitting algorithm for the legend
text.
Legend.BackColor Legend.BackColor
I n this Article
Gets or sets the background color of a legend.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BackColor { get; set; }
member this.BackColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the background color of a legend. The default color is White.
Attributes BindableAttribute TypeConverterAttribute
Remarks
You can set this property to any valid ARGB (alpha, red, green, blue) value.
The BackColor value will be the first color used if you have specified gradient colors for the background.
The alpha value controls the opacity of a color. If you set this color to "transparent" - that is, if you use an alpha value of
0 - no color will be assigned to the background of the legend. As a result, the background will be transparent.
Legend.BackGradientStyle Legend.BackGradientStyle
I n this Article
Gets or sets the orientation for the background gradient of a legend. Also determines whether a gradient is used.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.GradientStyle BackGradientStyle { get; set; }
member this.BackGradientStyle : System.Windows.Forms.DataVisualization.Charting.GradientStyle with
get, set
Returns
GradientStyle GradientStyle
A GradientStyle enumeration that specifies the orientation for the background gradient of a legend. The default value is
None.
Attributes BindableAttribute
Remarks
Use the BackGradientStyle property to determine whether a legend will display a gradient, and to determine the
orientation of the gradient if one is used.
For a listing of available patterns, refer to the GradientStyle enumeration.
To use gradient colors:
Set the primary color of the legend background with the BackColor property.
Set the secondary color of the legend background with the BackSecondaryColor property.
Set this BackGradientStyle property to the desired gradient style.
Legend.BackHatchStyle Legend.BackHatchStyle
I n this Article
Gets or sets the hatching style of a legend.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle BackHatchStyle { get; set; }
member this.BackHatchStyle : System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle with
get, set
Returns
ChartHatchStyle ChartHatchStyle
A ChartHatchStyle enumeration that specifies the hatching style of a legend. The default value is None.
Attributes BindableAttribute
Remarks
The ChartHatchStyle enumeration specifies the hatch pattern used by a brush of type HatchBrush. The hatch pattern
consists of a solid background color and lines drawn over the background.
For a listing of available hatching styles, refer to the ChartHatchStyle enumeration.
Note The color of hatching lines is determined by the BackSecondaryColor property.
Legend.BackImage Legend.BackImage
I n this Article
Gets or sets the background image of a legend.
[System.ComponentModel.Bindable(true)]
public string BackImage { get; set; }
member this.BackImage : string with get, set
Returns
String String
A string value that represents the URL of an image file. The default value is an empty string.
Attributes BindableAttribute
Remarks
This property defines a path to a background image for a Chart legend, and can be an absolute or relative URL.
To position the image, use the BackImageAlignment and BackImageWrapMode properties.
You can also specify one of the colors displayed by the image as "transparent", by setting the
BackImageTransparentColor property.
An image can originate from any valid graphics file supported by .NET Framework, including icons.
Background images take precedence over other background properties such as gradient color.
Legend.BackImageAlignment Legend.BackImage
Alignment
I n this Article
Gets or sets the background image alignment used for the Unscaled drawing mode.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartImageAlignmentStyle BackImageAlignment {
get; set; }
member this.BackImageAlignment :
System.Windows.Forms.DataVisualization.Charting.ChartImageAlignmentStyle with get, set
Returns
ChartImageAlignmentStyle ChartImageAlignmentStyle
A ChartImageAlignmentStyle enumeration value that specifies the background image alignment. The default value is
TopLeft.
Attributes BindableAttribute
Remarks
This property determines the alignment of the background image for the legend; it is only applied when the
BackImageWrapMode property is set to Unscaled.
Legend.BackImageTransparentColor Legend.BackImage
TransparentColor
I n this Article
Gets or sets a color that will be replaced with a transparent color when the background image is drawn.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BackImageTransparentColor { get; set; }
member this.BackImageTransparentColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that will be displayed as transparent color when the background image is drawn. The default value is
Empty.
Attributes BindableAttribute TypeConverterAttribute
Legend.BackImageWrapMode Legend.BackImageWrap
Mode
I n this Article
Gets or sets the legend background image drawing mode.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartImageWrapMode BackImageWrapMode { get;
set; }
member this.BackImageWrapMode : System.Windows.Forms.DataVisualization.Charting.ChartImageWrapMode
with get, set
Returns
ChartImageWrapMode ChartImageWrapMode
A ChartImageWrapMode enumeration value that specifies the legend background image drawing mode. The default
value is Tile.
Attributes BindableAttribute
Remarks
The BackImageWrapMode property determines how the image is displayed; the image can be tiled, scaled, and so
forth.
If an image is scaled, it will be stretched to fit within the bounds of the legend. If the image is tiled, it is repeatedly
drawn, starting from the top-left corner of the legend.
For more information about the available wrapping modes, see the ChartImageWrapMode enumeration topic.
If the BackImageWrapMode property is set to Unscaled, the location where the image is drawn is determined by the
BackImageAlignment property setting.
Legend.BackSecondaryColor Legend.BackSecondary
Color
I n this Article
Gets or sets the secondary color of a legend background.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BackSecondaryColor { get; set; }
member this.BackSecondaryColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used for the secondary color of background with hatching or gradient fill. The default value is Empty.
Attributes BindableAttribute TypeConverterAttribute
Remarks
The BackSecondaryColor property determines the secondary background color of many Chart objects, and is used
when gradient colors are being applied.
You can set BackSecondaryColor to any valid ARGB (alpha, red, green, blue) value.
If hatching is used, the BackSecondaryColor property determines the color of the hatching lines for the legend.
To use gradient colors for the background of a legend:
Set the primary color with the BackColor property.
Set the secondary color with the BackSecondaryColor property.
Set the BackGradientStyle property to the desired gradient style.
Legend.BorderColor Legend.BorderColor
I n this Article
Gets or sets the border color of a legend.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BorderColor { get; set; }
member this.BorderColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the border color of a legend. The default color is Empty.
Attributes BindableAttribute TypeConverterAttribute
Remarks
You can set this property to any valid ARGB (alpha, red, green, blue) value.
Legend.BorderDashStyle Legend.BorderDashStyle
I n this Article
Gets or sets the border style of a legend.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartDashStyle BorderDashStyle { get; set; }
member this.BorderDashStyle : System.Windows.Forms.DataVisualization.Charting.ChartDashStyle with
get, set
Returns
ChartDashStyle ChartDashStyle
A ChartDashStyle enumeration value that determines the border style of the chart element.
Attributes BindableAttribute
Remarks
The BorderDashStyle property determines the line style to use for a border. The line can be solid, dotted, and so forth.
For other border styles, see the ChartDashStyle enumeration topic.
Legend.BorderWidth Legend.BorderWidth
I n this Article
Gets or sets the border width of a legend.
[System.ComponentModel.Bindable(true)]
public int BorderWidth { get; set; }
member this.BorderWidth : int with get, set
Returns
Int32 Int32
An integer value that determines the border width, in pixels, of the legend.
Attributes BindableAttribute
Remarks
Note that BorderWidth property can also set the width of lines in such elements as line charts, custom legend items
displayed with a "line" style, and so forth.
Legend.CellColumns Legend.CellColumns
I n this Article
Gets the LegendCellColumnCollection object that contains the collection of cell columns for a legend.
public System.Windows.Forms.DataVisualization.Charting.LegendCellColumnCollection CellColumns { get;
}
member this.CellColumns : System.Windows.Forms.DataVisualization.Charting.LegendCellColumnCollection
Returns
LegendCellColumnCollection LegendCellColumnCollection
A LegendCellColumnCollection object that contains the collection of cell columns for a legend.
Legend.CustomItems Legend.CustomItems
I n this Article
Gets a LegendItemsCollection object used for custom legend items.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.LegendItemsCollection CustomItems { get; }
member this.CustomItems : System.Windows.Forms.DataVisualization.Charting.LegendItemsCollection
Returns
LegendItemsCollection LegendItemsCollection
A LegendItemsCollection object.
Attributes BindableAttribute
Remarks
This collection property can be used to add, delete or modify custom legend items.
Custom legend items, unlike default legend items, do not have associated series or data points.
To modify legend items, use the CustomizeLegend event.
Legend.Dispose Legend.Dispose
I n this Article
Releases the unmanaged resources used by the Legend and optionally releases the managed resources.
protected override void Dispose (bool disposing);
override this.Dispose : bool -> unit
Parameters
disposing Boolean Boolean
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Legend.DockedToChartArea Legend.DockedToChartArea
I n this Article
Gets or sets the name of the ChartArea where the legend will be docked.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.LegendAr
eaNameConverter))]
public string DockedToChartArea { get; set; }
member this.DockedToChartArea : string with get, set
Returns
String String
A string value that represents the name of the ChartArea where this legend will be docked. The default value is the
empty string.
Attributes BindableAttribute TypeConverterAttribute
Legend.Docking Legend.Docking
I n this Article
Gets or sets a value that determines whether the legend is docked.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.Docking Docking { get; set; }
member this.Docking : System.Windows.Forms.DataVisualization.Charting.Docking with get, set
Returns
Docking Docking
A Docking enumeration value that determines whether the legend is docked. The default value is Right.
Attributes BindableAttribute
Remarks
The Legend can be docked to the top, left, bottom or right of either the entire chart image, or the inside or outside of a
chart area. If the IsDockedInsideChartArea property is set to false , docking applies to the entire chart image. If the
IsDockedInsideChartArea property is set to true , docking applies to the ChartArea object specified by the
DockedToChartArea property
This property has no effect if the Position property is not set to Auto.
Legend.Enabled Legend.Enabled
I n this Article
Gets or sets a value that indicates whether the legend is enabled.
[System.ComponentModel.Bindable(true)]
public bool Enabled { get; set; }
member this.Enabled : bool with get, set
Returns
Boolean Boolean
true if the legend is enabled; otherwise, false . The default value is true .
Attributes BindableAttribute
Remarks
To hide a legend, set this property to false .
Legend.Font Legend.Font
I n this Article
Gets or sets a Font object, which is used to set font properties of the legend.
[System.ComponentModel.Bindable(true)]
public System.Drawing.Font Font { get; set; }
member this.Font : System.Drawing.Font with get, set
Returns
Font Font
A Font object which is used to set font properties of the legend.
Attributes BindableAttribute
Remarks
If you attempt to change the properties of this Font object at run time, a compilation error will occur. To set font
properties at run time, you must create a new Font object.
Note
If you set the Legend.Font.Size property, the IsTextAutoFit property will be set to false. Also, if you set the IsTextAutoFit
property to true, this property will be reset to its default, which is 8 points.
Legend.ForeColor Legend.ForeColor
I n this Article
Gets or sets the color of the legend text.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color ForeColor { get; set; }
member this.ForeColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that specifies the color of the legend text.
Attributes BindableAttribute TypeConverterAttribute
Remarks
The ForeColor property is used to set the legend text color.
Legend.HeaderSeparator Legend.HeaderSeparator
I n this Article
Gets or sets the visual separator type for the legend header.
public System.Windows.Forms.DataVisualization.Charting.LegendSeparatorStyle HeaderSeparator { get;
set; }
member this.HeaderSeparator : System.Windows.Forms.DataVisualization.Charting.LegendSeparatorStyle
with get, set
Returns
LegendSeparatorStyle LegendSeparatorStyle
A LegendSeparatorStyle enumeration value that specifies the visual separator type for the legend header.
Legend.HeaderSeparatorColor Legend.HeaderSeparator
Color
I n this Article
Gets or sets the color of the separator for the legend header.
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color HeaderSeparatorColor { get; set; }
member this.HeaderSeparatorColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that specifies the color of the separator for the legend header.
Attributes TypeConverterAttribute
Legend.InsideChartArea Legend.InsideChartArea
I n this Article
Gets or sets the name of the chart area in which the legend is drawn.
[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.LegendAr
eaNameConverter))]
public string InsideChartArea { get; set; }
member this.InsideChartArea : string with get, set
Returns
String String
A string value that represents the name of the chart area.
Attributes BindableAttribute BrowsableAttribute TypeConverterAttribute
Legend.InterlacedRows Legend.InterlacedRows
I n this Article
Gets or sets a flag that indicates whether legend rows will be drawn with interlaced background color.
public bool InterlacedRows { get; set; }
member this.InterlacedRows : bool with get, set
Returns
Boolean Boolean
true if legend rows will be drawn with interlaced background color; otherwise, false .
Remarks
When the legend contains many entries, the InterlacedRows property can be used to improve readability. When this
property is set to true , the legend will display a background color for the rows that are interlaced, which can be set
using the InterlacedRowsColor property.
Legend.InterlacedRowsColor Legend.InterlacedRows
Color
I n this Article
Gets or sets the background color of the legend's interlaced rows.
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color InterlacedRowsColor { get; set; }
member this.InterlacedRowsColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that specifies the background color of the legend's interlaced rows.
Attributes TypeConverterAttribute
Remarks
This property is only applicable if interlaced rows are used.
Legend.IsDockedInsideChartArea Legend.IsDockedInside
ChartArea
I n this Article
Gets or sets a flag that indicates whether the legend is docked inside or outside the chart area.
[System.ComponentModel.Bindable(true)]
public bool IsDockedInsideChartArea { get; set; }
member this.IsDockedInsideChartArea : bool with get, set
Returns
Boolean Boolean
true is the legend is docked inside the chart area; false if it is docked outside the chart area. The default value is
false .
Attributes BindableAttribute
Remarks
This property will only have an effect if the DockedToChartArea property is set to the name of a ChartArea object.
Note
If the Position property is set to any value other than Auto, the IsDockedInsideChartArea property also has no effect.
This is because the position of the legend is determined by the Position property setting.
Legend.IsEquallySpacedItems Legend.IsEquallySpaced
Items
I n this Article
Gets or sets a flag that indicates whether all legend items are equally spaced.
[System.ComponentModel.Bindable(true)]
public bool IsEquallySpacedItems { get; set; }
member this.IsEquallySpacedItems : bool with get, set
Returns
Boolean Boolean
true if legend items are equally spaced; otherwise, false . The default value is false .
Attributes BindableAttribute
Legend.IsTextAutoFit Legend.IsTextAutoFit
I n this Article
Gets or sets a flag that indicates whether the legend text is automatically sized.
[System.ComponentModel.Bindable(true)]
public bool IsTextAutoFit { get; set; }
member this.IsTextAutoFit : bool with get, set
Returns
Boolean Boolean
true if the legend text is automatically sized; otherwise, false .
Attributes BindableAttribute
Legend.ItemColumnSeparator Legend.ItemColumn
Separator
I n this Article
Gets or sets the visual separator type for the legend table columns.
Returns
LegendSeparatorStyle LegendSeparatorStyle
A LegendSeparatorStyle enumeration value that specifies the visual separator type for the legend table columns.
Legend.ItemColumnSeparatorColor Legend.ItemColumn
SeparatorColor
I n this Article
Gets or sets the color of the legend table column separator.
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color ItemColumnSeparatorColor { get; set; }
member this.ItemColumnSeparatorColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the color of the legend table column separator.
Attributes TypeConverterAttribute
Legend.ItemColumnSpacing Legend.ItemColumnSpacing
I n this Article
Gets or sets the legend table column spacing.
public int ItemColumnSpacing { get; set; }
member this.ItemColumnSpacing : int with get, set
Returns
Int32 Int32
An integer value that represents the table column spacing.
Remarks
The ItemColumnSpacing property value is calculated as a percentage of the legend text font.
Legend Legend
I n this Article
Overloads
Legend()
Initializes a new instance of the Legend class.
Legend(String) Legend(String)
Initializes a new instance of the AnnotationPathPoint class
with the specified legend name.
Legend()
Initializes a new instance of the Legend class.
public Legend ();
Legend(String) Legend(String)
Initializes a new instance of the AnnotationPathPoint class with the specified legend name.
public Legend (string name);
new System.Windows.Forms.DataVisualization.Charting.Legend : string ->
System.Windows.Forms.DataVisualization.Charting.Legend
Parameters
name String String
The name of the Legend object.
Legend.LegendItemOrder Legend.LegendItemOrder
I n this Article
Gets or sets a value that specifies the order in which legend items are displayed. This property only affects legend
items automatically added for the chart series; it has no effect on custom legend items.
Returns
LegendItemOrder LegendItemOrder
A LegendItemOrder enumeration value that specifies the order in which legend items are displayed.
Remarks
If the LegendItemOrder property is set to Auto, the legend will automatically be reversed if StackedColumn,
StackedColumn100, StackedArea or StackedArea100 chart types are used.
Legend.LegendStyle Legend.LegendStyle
I n this Article
Gets or sets the style of the legend.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.LegendStyle LegendStyle { get; set; }
member this.LegendStyle : System.Windows.Forms.DataVisualization.Charting.LegendStyle with get, set
Returns
LegendStyle LegendStyle
A LegendStyle enumeration value that determines the legend style. The default value is Table.
Attributes BindableAttribute
Remarks
By default, the legend is displayed as a series of items in a table. You can specify whether to expand items in the table
width-wise or height-wise by setting the TableStyle property. When the TableStyle property is set to Auto, the Chart
control will determine whether to draw a wide table or a tall table, depending on the alignment and positioning of the
chart. This may cause the legend to be drawn using multiple legend item columns.
There are three possible styles for a legend: Column, Row and Table. Refer to the table below for a summary of these
styles:
S T YLE D ES CR IPTIO N
Column Legend items are displayed in one column, with multiple rows.
Most commonly used when the legend is docked to the left or
right of the chart.
Row Legend items are displayed in one row, with multiple columns.
Most commonly used when the legend is docked to the top or
bottom of the chart.
Table Legend items are displayed using multiple columns and rows.
Legend.MaximumAutoSize Legend.MaximumAutoSize
I n this Article
Gets or sets the maximum size of the legend, measured as a percentage of the chart area. This value is used by the
automatic layout algorithm.
Returns
Single Single
A float value that represents the maximum size of the legend.
Remarks
If the legend is docked to the left or right of the chart area, this property determines the maximum width of the legend,
which is measured as a percentage of the chart area. If the legend is docked to the top or bottom, this property
determines the maximum height of the legend, which is also measured as a percentage.
Legend.Name Legend.Name
I n this Article
Gets or sets the name of the legend.
[System.ComponentModel.Bindable(true)]
public override string Name { get; set; }
member this.Name : string with get, set
Returns
String String
A string value that represents the name of the legend.
Attributes BindableAttribute
Legend.Position Legend.Position
I n this Article
Gets or sets an ElementPosition object, which can be used to get or set the position of the legend.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.ElementP
ositionConverter))]
public System.Windows.Forms.DataVisualization.Charting.ElementPosition Position { get; set; }
member this.Position : System.Windows.Forms.DataVisualization.Charting.ElementPosition with get, set
Returns
ElementPosition ElementPosition
If the Position property is automatic (that is, Legend.Position.Auto = true ) the legend position is calculated
automatically by the Chart control, taking into account the Docking, Alignment and IsDockedInsideChartArea property
settings.
If it is not automatic, the Docking, DockedToChartArea and IsDockedInsideChartArea properties are ignored, and the
legend position is solely determined by the value of the returned ElementPosition object.
Attributes BindableAttribute TypeConverterAttribute
Legend.ShadowColor Legend.ShadowColor
I n this Article
Gets or sets the shadow color of the legend.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color ShadowColor { get; set; }
member this.ShadowColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that specifies the shadow color of the legend. The default color is Black.
Attributes BindableAttribute TypeConverterAttribute
Remarks
This property can be set to any valid ARGB (alpha, red, green, blue) value.
The alpha value can be used to achieve a "realistic" shadowing effect; try a color value of "128,0,0,0" for shadows.
To implement a shadow, set the ShadowOffset property to a value other than zero (0).
Legend.ShadowOffset Legend.ShadowOffset
I n this Article
Gets or sets the shadow offset, in pixels, of the legend.
[System.ComponentModel.Bindable(true)]
public int ShadowOffset { get; set; }
member this.ShadowOffset : int with get, set
Returns
Int32 Int32
An integer value that represents the shadow offset, in pixels, of the legend.
Attributes BindableAttribute
Remarks
To implement shadowing, set this property to a value other than zero (0). A positive value will result in a shadow that
shifts down and to the right; a negative value will result in a shadow that shifts up and to the left.
Legend.TableStyle Legend.TableStyle
I n this Article
Gets or sets the legend table style.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.LegendTableStyle TableStyle { get; set; }
member this.TableStyle : System.Windows.Forms.DataVisualization.Charting.LegendTableStyle with get,
set
Returns
LegendTableStyle LegendTableStyle
A LegendTableStyle enumeration value that specifies the legend table style.
Attributes BindableAttribute
Remarks
This property is only applicable if the LegendStyle property is set to Table.
Legend.TextWrapThreshold Legend.TextWrapThreshold
I n this Article
Gets or sets the number of characters that can be sequentially displayed in the legend before the text is wrapped.
public int TextWrapThreshold { get; set; }
member this.TextWrapThreshold : int with get, set
Returns
Int32 Int32
An integer value that represents the number of characters that can be placed in the legend sequentially before the
text is wrapped. The default value is 25.
Remarks
When the legend text exceeds the value specified by this property, text will be automatically wrapped when the next
white-space character is encountered. Text will not be wrapped if there are no white-space characters in the text.
Set the TextWrapThreshold property to zero to disable the feature.
Legend.Title Legend.Title
I n this Article
Gets or sets the text of the legend title.
public string Title { get; set; }
member this.Title : string with get, set
Returns
String String
A string value that represents the legend title text. The default value is a zero-length string.
Legend.TitleAlignment Legend.TitleAlignment
I n this Article
Gets or sets the alignment of the legend title.
public System.Drawing.StringAlignment TitleAlignment { get; set; }
member this.TitleAlignment : System.Drawing.StringAlignment with get, set
Returns
StringAlignment StringAlignment
A StringAlignment enumeration value that represents the alignment of the legend title. The default value is Center.
Legend.TitleBackColor Legend.TitleBackColor
I n this Article
Gets or sets the background color of the legend title.
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color TitleBackColor { get; set; }
member this.TitleBackColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the background of the legend title. The default value is Empty.
Attributes TypeConverterAttribute
Legend.TitleFont Legend.TitleFont
I n this Article
Gets or sets the font for the legend title.
public System.Drawing.Font TitleFont { get; set; }
member this.TitleFont : System.Drawing.Font with get, set
Returns
Font Font
A Font object that represents the font for the legend title. The default value is "Microsoft Sans Serif, 8pt, Bold".
Remarks
This property can be used to set font properties of the legend title.
If you attempt to change the properties of this Font object at run time, a compilation error will occur. To set font
properties at run time, you must create a new Font object.
Legend.TitleForeColor Legend.TitleForeColor
I n this Article
Gets or sets the text color of the legend title.
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color TitleForeColor { get; set; }
member this.TitleForeColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the title text color. The default value is Black.
Attributes TypeConverterAttribute
Legend.TitleSeparator Legend.TitleSeparator
I n this Article
Gets or sets the visual separator type for the legend title.
public System.Windows.Forms.DataVisualization.Charting.LegendSeparatorStyle TitleSeparator { get;
set; }
member this.TitleSeparator : System.Windows.Forms.DataVisualization.Charting.LegendSeparatorStyle
with get, set
Returns
LegendSeparatorStyle LegendSeparatorStyle
A LegendSeparatorStyle value that represents the type of separator that will be drawn below the title. The default value
is None.
Legend.TitleSeparatorColor Legend.TitleSeparatorColor
I n this Article
Gets or sets the color of the legend title separator.
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color TitleSeparatorColor { get; set; }
member this.TitleSeparatorColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the color of the legend title separator. The default value is Black.
Attributes TypeConverterAttribute
LegendCell LegendCell Class
Represents a legend cell in a legend item.
D eclaration
public class LegendCell : System.Windows.Forms.DataVisualization.Charting.ChartNamedElement
type LegendCell = class
inherit ChartNamedElement
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
Remarks
A legend is populated with legend items, which are represented by the LegendItemsCollection. These legend items
consist of individual legend cells, which are in turn represented by the LegendCellCollection.
Constructors
LegendCell()
LegendCell()
LegendCell(String)
LegendCell(String)
Initializes a new instance of the LegendCell class with a text parameter that specifies the cell text or image name.
LegendCell(LegendCellType, String)
LegendCell(LegendCellType, String)
Initializes a new instance of the LegendCell class with the specified cell type and a text parameter that specifies
the cell text or image name.
Initializes a new instance of the LegendCell class with the specified cell type, content alignment, and a text
parameter that specifies the cell text or image name.
Properties
Alignment
Alignment
Gets or sets the alignment of the legend cell contents.
BackColor
BackColor
CellSpan
CellSpan
Gets or sets the number of horizontal cells used to draw the contents of the legend cell.
CellType
CellType
Gets or sets the legend cell type that is used to define the contents of the legend cell.
Font
Font
ForeColor
ForeColor
Image
Image
ImageSize
ImageSize
ImageTransparentColor
ImageTransparentColor
Gets or sets a color which will be replaced with a transparent color when the image is drawn.
Legend
Legend
LegendItem
LegendItem
Margins
Margins
Name
Name
SeriesSymbolSize
SeriesSymbolSize
Gets or sets the size of the series symbol that is displayed in the legend cell.
Text
Text
ToolTip
ToolTip
Methods
Dispose(Boolean)
Dispose(Boolean)
Releases the unmanaged resources used by the LegendCell and optionally releases the managed resources.
LegendCell.Alignment LegendCell.Alignment
I n this Article
Gets or sets the alignment of the legend cell contents.
public virtual System.Drawing.ContentAlignment Alignment { get; set; }
member this.Alignment : System.Drawing.ContentAlignment with get, set
Returns
ContentAlignment ContentAlignment
A ContentAlignment value that represents the alignment of the legend cell contents. The default value is MiddleCenter.
Remarks
The Alignment property is used to align text, series symbols or images within the legend cell.
LegendCell.BackColor LegendCell.BackColor
I n this Article
Gets or sets the background color of the legend cell.
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public virtual System.Drawing.Color BackColor { get; set; }
member this.BackColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the legend cell's background.
Attributes TypeConverterAttribute
Remarks
The BackColor property has the highest priority when setting the background color of any entity in the legend.
LegendCell.CellSpan LegendCell.CellSpan
I n this Article
Gets or sets the number of horizontal cells used to draw the contents of the legend cell.
public virtual int CellSpan { get; set; }
member this.CellSpan : int with get, set
Returns
Int32 Int32
An integer value that represents the number of horizontal cells used to draw the legend cell contents. The default
value is 1.
Remarks
If the cell contents must extend beyond the cell width, you can set the CellSpan property to the number of cells
required to fit the contents. This property is most often used if you wish to add an extended header or title to the
legend.
When this property is set to a value larger than 1, empty legend cells must be added in order to accommodate the
contents of the extended legend cell.
LegendCell.CellType LegendCell.CellType
I n this Article
Gets or sets the legend cell type that is used to define the contents of the legend cell.
public virtual System.Windows.Forms.DataVisualization.Charting.LegendCellType CellType { get; set; }
member this.CellType : System.Windows.Forms.DataVisualization.Charting.LegendCellType with get, set
Returns
LegendCellType LegendCellType
A LegendCellType enumeration value that represents the type that is used to define the contents of the legend cell. The
default value is Text.
Remarks
The CellType property determines the type of content that will be displayed in each individual legend cell. One of the
following cell types must be specified:
Text: A string is specified using the Text property, and will be displayed in the legend cell.
SeriesSymbol: A series symbol is defined by the ImageStyle property in the LegendItem class. It will be displayed for
the legend cell. Recall that a series symbol is a visual indicator - a line, rectangle or marker. When ImageStyle is set to
Marker, all marker attributes of the custom item apply to the cell.
Image: An image is defined using the Image property and will be displayed in the legend cell.
LegendCell.Dispose LegendCell.Dispose
I n this Article
Releases the unmanaged resources used by the LegendCell and optionally releases the managed resources.
protected override void Dispose (bool disposing);
override this.Dispose : bool -> unit
Parameters
disposing Boolean Boolean
true to release both managed and unmanaged resources; false to release only unmanaged resources.
LegendCell.Font LegendCell.Font
I n this Article
Gets or sets the font for the legend cell.
public virtual System.Drawing.Font Font { get; set; }
member this.Font : System.Drawing.Font with get, set
Returns
Font Font
A Font object that represents the font for the legend cell. The default value is "Microsoft Sans Serif, 8pt".
Remarks
The Font property can be used to set font properties of the legend cell.
If you attempt to change the properties of this Font object at run time, a compilation error will occur. To set font
properties at run time, you must create a new Font object.
LegendCell.ForeColor LegendCell.ForeColor
I n this Article
Gets or sets the text color of the legend cell.
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public virtual System.Drawing.Color ForeColor { get; set; }
member this.ForeColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the legend cell text. The default value is Empty.
Attributes TypeConverterAttribute
Remarks
This property is only applicable if the CellType property is set to Text.
LegendCell.Image LegendCell.Image
I n this Article
Gets or sets the name of the image in a legend cell.
public virtual string Image { get; set; }
member this.Image : string with get, set
Returns
String String
A string value that represents the name of the image to be used in the legend cell.
Remarks
The image name should be a URL.
This property is only applicable if the CellType property is set to Image.
LegendCell.ImageSize LegendCell.ImageSize
I n this Article
Gets or sets the size of the image in a legend cell.
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.SizeEmpt
yValueConverter))]
public virtual System.Drawing.Size ImageSize { get; set; }
member this.ImageSize : System.Drawing.Size with get, set
Returns
Size Size
A Size value that represents the size of the image. The default value is (0,0), which means the original size of the image
will be used.
Attributes TypeConverterAttribute
Remarks
The ImageSize property is used to explicitly set the width and height of the legend cell image.
This property is only applicable if the CellType property is set to Image.
LegendCell.ImageTransparentColor LegendCell.Image
TransparentColor
I n this Article
Gets or sets a color which will be replaced with a transparent color when the image is drawn.
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public virtual System.Drawing.Color ImageTransparentColor { get; set; }
member this.ImageTransparentColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that is used as a transparent color in a legend cell image.
Attributes TypeConverterAttribute
Remarks
The ImageTransparentColor property is only applicable if the CellType property is set to Image.
LegendCell.Legend LegendCell.Legend
I n this Article
Gets the legend in which this cell belongs.
[System.ComponentModel.Browsable(false)]
public virtual System.Windows.Forms.DataVisualization.Charting.Legend Legend { get; }
member this.Legend : System.Windows.Forms.DataVisualization.Charting.Legend
Returns
Legend Legend
A Legend object that represents the legend in which this cell belongs.
Attributes BrowsableAttribute
LegendCell LegendCell
I n this Article
Overloads
LegendCell()
Initializes a new instance of the LegendCell class.
LegendCell(String) LegendCell(String)
Initializes a new instance of the LegendCell class with a text
parameter that specifies the cell text or image name.
LegendCell()
Initializes a new instance of the LegendCell class.
public LegendCell ();
LegendCell(String) LegendCell(String)
Initializes a new instance of the LegendCell class with a text parameter that specifies the cell text or image name.
Parameters
text String String
A string value that represent the cell text or image name, depending on the type of cell.
Parameters
cellType LegendCellType LegendCellType
A LegendCellType value that represents the legend cell type to be used.
text String String
A string value that represents the cell text or image name, depending on the type of cell.
Parameters
cellType LegendCellType LegendCellType
A LegendCellType value that represents the legend cell type to be used.
text String String
A string value representing the cell text or image name, depending on the type of cell.
alignment ContentAlignment ContentAlignment
A ContentAlignment value that represents the alignment of the legend cell contents.
LegendCell.LegendItem LegendCell.LegendItem
I n this Article
Gets the legend item in which this cell belongs.
[System.ComponentModel.Browsable(false)]
public virtual System.Windows.Forms.DataVisualization.Charting.LegendItem LegendItem { get; }
member this.LegendItem : System.Windows.Forms.DataVisualization.Charting.LegendItem
Returns
LegendItem LegendItem
A LegendItem object that represents the legend item in which this cell belongs.
Attributes BrowsableAttribute
LegendCell.Margins LegendCell.Margins
I n this Article
Gets or sets the margins of the legend cell.
public virtual System.Windows.Forms.DataVisualization.Charting.Margins Margins { get; set; }
member this.Margins : System.Windows.Forms.DataVisualization.Charting.Margins with get, set
Returns
Margins Margins
A Margins object that represents the top, bottom, left, and right values of the legend cell margins. The default values
for top, bottom, left and right are "0,0,15,15".
Remarks
Margins are measured as a percentage of the font size for the legend cell.
LegendCell.Name LegendCell.Name
I n this Article
Gets or sets the name of the legend cell.
public override string Name { get; set; }
member this.Name : string with get, set
Returns
String String
A string value that represents the text name of the legend cell.
Remarks
The name of the legend cell must be unique; otherwise an exception will be thrown.
The Name property can be used as the indexer when retrieving a LegendCell object from the LegendCellCollection.
If you set this property to a zero-length string, an exception will be thrown.
LegendCell.SeriesSymbolSize LegendCell.SeriesSymbol
Size
I n this Article
Gets or sets the size of the series symbol that is displayed in the legend cell.
Returns
Size Size
A Size object that represents the size of the series symbol. The default values for the width and height of the symbol
are 200 and 70, respectively.
Remarks
The size of the series symbol is measured as a percentage of the legend font size.
The SeriesSymbolSize property is only applicable if the CellType property is set to SeriesSymbol.
LegendCell.Text LegendCell.Text
I n this Article
Gets or sets the legend cell text.
public virtual string Text { get; set; }
member this.Text : string with get, set
Returns
String String
A string value that represents the text for the legend cell. The default value is a zero-length string.
Remarks
The Text property is only applicable if the CellType property is set to Text.
LegendCell.ToolTip LegendCell.ToolTip
I n this Article
Gets or sets the tooltip text for the legend cell.
public virtual string ToolTip { get; set; }
member this.ToolTip : string with get, set
Returns
String String
A string value that represents the tooltip for the legend cell. The default value is a zero-length string.
Remarks
If the ToolTip property is set for both a legend item and a legend cell, the legend cell property has precedence.
This ToolTip property allows you to set special keywords to display different types of chart-related data.
LegendCellCollection LegendCellCollection Class
Stores legend cells in a LegendCellCollection object.
D eclaration
public class LegendCellCollection :
System.Windows.Forms.DataVisualization.Charting.ChartNamedElementCollection<System.Windows.Forms
.DataVisualization.Charting.LegendCell>
type LegendCellCollection = class
inherit ChartNamedElementCollection<LegendCell>
I nheritance H ierarchy
Object Object
Collection<T> Collection<T>
ChartElementCollection<T> ChartElementCollection<T>
ChartNamedElementCollection<T> ChartNamedElementCollection<T>
Methods
Add(LegendCellType, String, ContentAlignment)
Add(LegendCellType, String, ContentAlignment)
Adds a legend cell with the specified cell type, text and alignment to the end of the collection.
Inserts a legend cell with the specified cell type, text and alignment into the collection at a given location.
LegendCellCollection.Add LegendCellCollection.Add
I n this Article
Adds a legend cell with the specified cell type, text and alignment to the end of the collection.
public int Add (System.Windows.Forms.DataVisualization.Charting.LegendCellType cellType, string
text, System.Drawing.ContentAlignment alignment);
override this.Add : System.Windows.Forms.DataVisualization.Charting.LegendCellType * string *
System.Drawing.ContentAlignment -> int
Parameters
cellType LegendCellType LegendCellType
A LegendCellType value representing the cell type.
text String String
A string value that represents either the cell text or its image name, depending on the value of the cellType
parameter.
alignment ContentAlignment ContentAlignment
A ContentAlignment value that represents the cell content alignment.
Returns
Int32 Int32
An integer value that represents the index of the newly added legend cell in the collection. The index is zero-based.
LegendCellCollection.Insert LegendCellCollection.Insert
I n this Article
Inserts a legend cell with the specified cell type, text and alignment into the collection at a given location.
public void Insert (int index, System.Windows.Forms.DataVisualization.Charting.LegendCellType
cellType, string text, System.Drawing.ContentAlignment alignment);
override this.Insert : int * System.Windows.Forms.DataVisualization.Charting.LegendCellType * string
* System.Drawing.ContentAlignment -> unit
Parameters
index Int32 Int32
Index of the location to insert the object.
cellType LegendCellType LegendCellType
A LegendCellType value that represents the cell type.
text String String
A string value that represents either the cell text or its image name, depending on the value of the cellType
parameter.
alignment ContentAlignment ContentAlignment
A ContentAlignment enumeration value that represents the alignment of the legend cell content.
LegendCellColumn LegendCellColumn Class
Represents a cell column in a legend, which is used to extend the functionality of the default legend.
D eclaration
public class LegendCellColumn :
System.Windows.Forms.DataVisualization.Charting.ChartNamedElement
type LegendCellColumn = class
inherit ChartNamedElement
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
Remarks
Any number of cell columns can be placed in any order, which gives you the flexibility to extend the abilities of the
default legend entries.
The legend cell columns are only applicable to items that are automatically generated from series or data points.
Constructors
LegendCellColumn()
LegendCellColumn()
Initializes a new instance of the LegendCellColumn class with the specified header text, column type and column
cell text.
Initializes a new instance of the LegendCellColumn class with the specified header text, column type, column cell
text and content alignment.
Properties
Alignment
Alignment
ColumnType
ColumnType
Font
Font
ForeColor
ForeColor
HeaderAlignment
HeaderAlignment
Gets or sets the horizontal text alignment of the legend cell column header.
HeaderBackColor
HeaderBackColor
Gets or sets the background color for the legend cell column header.
HeaderFont
HeaderFont
HeaderForeColor
HeaderForeColor
Gets or sets the color of the legend column header text (HeaderText property).
HeaderText
HeaderText
Gets or sets the text for the legend cell column header.
Legend
Legend
Margins
Margins
MaximumWidth
MaximumWidth
MinimumWidth
MinimumWidth
Name
Name
SeriesSymbolSize
SeriesSymbolSize
Gets or sets the size of the series symbol displayed in a legend cell column.
Text
Text
ToolTip
ToolTip
Gets or sets the tooltip text for the legend cell column.
Methods
Dispose(Boolean)
Dispose(Boolean)
Releases the unmanaged resources used by the LegendCellColumn and optionally releases the managed
resources.
ShouldSerializeMargins()
ShouldSerializeMargins()
Returns
ContentAlignment ContentAlignment
A ContentAlignment value that represents the alignment of the legend cell contents. The default value is MiddleCenter.
Remarks
This property is used to align text or series symbols within the legend cell column.
LegendCellColumn.BackColor LegendCellColumn.Back
Color
I n this Article
Gets or sets the background color of the legend cell column.
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public virtual System.Drawing.Color BackColor { get; set; }
member this.BackColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the legend cell column background.
The default value is Empty.
Attributes TypeConverterAttribute
Remarks
This property overrides the BackColor property of the legend that the legend cell column belongs to. It also overrides
the InterlacedRows property of the legend.
LegendCellColumn.ColumnType LegendCellColumn.
ColumnType
I n this Article
Gets or sets the legend cell column type.
Returns
LegendCellColumnType LegendCellColumnType
A LegendCellColumnType enumeration value that represents the legend cell column type. This value represents the
type that will be used to define the legend cell column contents. The default value is Text.
Remarks
This property determines the type of content that will be displayed in each individual legend cell column. There are two
possible values:
Text: By default, the #LEGENDTEXT keyword is used to place the LegendText value in each cell column. However, you
can use the Text property to set any keyword(s) that will be replaced by a value of the corresponding series.
SeriesSymbol: The legend cell will contain a series symbol, such as a rectangle, line, line with marker, or marker, of the
same fill color as its corresponding series.
LegendCellColumn.Dispose LegendCellColumn.Dispose
I n this Article
Releases the unmanaged resources used by the LegendCellColumn and optionally releases the managed resources.
protected override void Dispose (bool disposing);
override this.Dispose : bool -> unit
Parameters
disposing Boolean Boolean
true to release both managed and unmanaged resources; false to release only unmanaged resources.
LegendCellColumn.Font LegendCellColumn.Font
I n this Article
Gets or sets the font for the legend column text.
public virtual System.Drawing.Font Font { get; set; }
member this.Font : System.Drawing.Font with get, set
Returns
Font Font
A Font object that specifies the font for the legend column text. The default value is null .
Remarks
This property is only applicable when the LegendCellColumnType is set to Text, and a string value is defined for the
Text property. You can use the Font property to set font properties of the legend cell column.
If you attempt to change the properties of this Font object at run time, a compilation error will occur. To set font
properties at run time, you must create a new Font object.
LegendCellColumn.ForeColor LegendCellColumn.Fore
Color
I n this Article
Gets or sets the text color of the legend cell column.
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public virtual System.Drawing.Color ForeColor { get; set; }
member this.ForeColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the legend cell column text. The default value is Empty.
Attributes TypeConverterAttribute
Remarks
This property is only applicable if the LegendCellColumnType is set to Text.
LegendCellColumn.HeaderAlignment LegendCell
Column.HeaderAlignment
I n this Article
Gets or sets the horizontal text alignment of the legend cell column header.
Returns
StringAlignment StringAlignment
A StringAlignment enumeration value that specifies the horizontal text alignment of the legend cell column header.
LegendCellColumn.HeaderBackColor LegendCell
Column.HeaderBackColor
I n this Article
Gets or sets the background color for the legend cell column header.
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public virtual System.Drawing.Color HeaderBackColor { get; set; }
member this.HeaderBackColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the background of the legend cell column header. The default value is Empty.
Attributes TypeConverterAttribute
LegendCellColumn.HeaderFont LegendCellColumn.
HeaderFont
I n this Article
Gets or sets the font used in the legend column header.
Returns
Font Font
A Font object that represents the font used in the legend column header. The default value is "Microsoft Sans Serif, 8pt,
Bold".
Remarks
This property can be used to set font properties of the legend cell column header.
If you attempt to change the properties of this Font object at run time, a compilation error will occur. To set font
properties at run time, you must create a new Font object.
LegendCellColumn.HeaderForeColor LegendCellColumn.
HeaderForeColor
I n this Article
Gets or sets the color of the legend column header text (HeaderText property).
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public virtual System.Drawing.Color HeaderForeColor { get; set; }
member this.HeaderForeColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that specifies the color of the legend column header text.
Attributes TypeConverterAttribute
LegendCellColumn.HeaderText LegendCellColumn.
HeaderText
I n this Article
Gets or sets the text for the legend cell column header.
Returns
String String
A string value that represents the legend cell column header text. The default value is a zero-length string.
LegendCellColumn.Legend LegendCellColumn.Legend
I n this Article
Gets the legend in which this legend cell column belongs.
[System.ComponentModel.Browsable(false)]
public virtual System.Windows.Forms.DataVisualization.Charting.Legend Legend { get; }
member this.Legend : System.Windows.Forms.DataVisualization.Charting.Legend
Returns
Legend Legend
A Legend object that represents the legend which this legend cell column belongs to.
Attributes BrowsableAttribute
LegendCellColumn LegendCellColumn
I n this Article
Overloads
LegendCellColumn()
Initializes a new instance of the LegendCellColumn class.
LegendCellColumn()
Initializes a new instance of the LegendCellColumn class.
public LegendCellColumn ();
Parameters
headerText String String
The text for the legend cell column header.
columnType LegendCellColumnType LegendCellColumnType
A LegendCellColumnType enumeration value that represents the legend cell column type.
text String String
The text for the legend cell column.
Parameters
headerText String String
The text for the legend cell column header.
columnType LegendCellColumnType LegendCellColumnType
A LegendCellColumnType enumeration value that represents the legend cell column type.
text String String
The text for the legend cell column.
alignment ContentAlignment ContentAlignment
The legend column content alignment.
LegendCellColumn.Margins LegendCellColumn.Margins
I n this Article
Gets or sets the margins of the legend cell column.
public virtual System.Windows.Forms.DataVisualization.Charting.Margins Margins { get; set; }
member this.Margins : System.Windows.Forms.DataVisualization.Charting.Margins with get, set
Returns
Margins Margins
A Margins object that represents the top, bottom, left, and right values of the legend cell margins. The default values
for top, bottom, left and right are "0,0,15,15".
Remarks
This property is measured as a percentage of the legend font size.
LegendCellColumn.MaximumWidth LegendCellColumn.
MaximumWidth
I n this Article
Gets or sets the maximum width of the legend cell column.
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.IntNanVa
lueConverter))]
public virtual int MaximumWidth { get; set; }
member this.MaximumWidth : int with get, set
Returns
Int32 Int32
An integer value that represents the maximum width of the legend cell column. The default value is minus one (-1),
which means that the maximum width is automatically calculated.
Attributes TypeConverterAttribute
LegendCellColumn.MinimumWidth LegendCellColumn.
MinimumWidth
I n this Article
Gets or sets the minimum width of the legend cell column.
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.IntNanVa
lueConverter))]
public virtual int MinimumWidth { get; set; }
member this.MinimumWidth : int with get, set
Returns
Int32 Int32
An integer value that represents the minimum width of the legend cell column. The default value is minus one (-1),
which means that the minimum width is automatically calculated.
Attributes TypeConverterAttribute
LegendCellColumn.Name LegendCellColumn.Name
I n this Article
Gets or sets the name of the legend cell column.
public override string Name { get; set; }
member this.Name : string with get, set
Returns
String String
A string value that represents the text name of the legend cell column.
Remarks
The name of the legend cell must be unique; otherwise an exception will be thrown.
The Name property can be used as the indexer when retrieving a LegendCellColumn object from the
LegendCellColumnCollection.
If you set this property to a zero-length string, an exception will be thrown.
LegendCellColumn.SeriesSymbolSize LegendCell
Column.SeriesSymbolSize
I n this Article
Gets or sets the size of the series symbol displayed in a legend cell column.
Returns
Size Size
A Size object that represents the size of the series symbol. The default values for the width and height of the symbol
are 200 and 70, respectively.
Remarks
The size of the series symbol is measured as a percentage of the legend font size.
This property is only applicable if the LegendCellColumnType property is set to SeriesSymbol.
LegendCellColumn.ShouldSerializeMargins LegendCell
Column.ShouldSerializeMargins
I n this Article
Determines whether the property should be serialized.
Returns
Boolean Boolean
true if property should be serialized; otherwise, false .
LegendCellColumn.Text LegendCellColumn.Text
I n this Article
Gets or sets the text of the legend cell column.
public virtual string Text { get; set; }
member this.Text : string with get, set
Returns
String String
A string value that represents the text for the legend cell column. The default value is a zero-length string.
Remarks
This property is only applicable if the LegendCellColumnType is set to Text.
LegendCellColumn.ToolTip LegendCellColumn.ToolTip
I n this Article
Gets or sets the tooltip text for the legend cell column.
public virtual string ToolTip { get; set; }
member this.ToolTip : string with get, set
Returns
String String
A string value that represents the tooltip for the legend cell column. The default value is a zero-length string.
Remarks
If the ToolTip property is set for both a legend item and a legend cell, the legend cell property has precedence.
This property allows you to set special keywords to display different types of chart-related data.
LegendCellColumnCollection LegendCellColumn
Collection Class
Stores LegendCellColumn objects, which are applied to default legend items.
D eclaration
public class LegendCellColumnCollection :
System.Windows.Forms.DataVisualization.Charting.ChartNamedElementCollection<System.Windows.Forms
.DataVisualization.Charting.LegendCellColumn>
type LegendCellColumnCollection = class
inherit ChartNamedElementCollection<LegendCellColumn>
I nheritance H ierarchy
Object Object
Collection<T> Collection<T>
ChartElementCollection<T> ChartElementCollection<T>
ChartNamedElementCollection<T> ChartNamedElementCollection<T>
Remarks
The LegendCellColumnCollection class stores LegendCellColumn objects.
Methods
Dispose(Boolean)
Dispose(Boolean)
Releases the unmanaged resources used by the LegendCellColumnCollection and optionally releases the
managed resources.
LegendCellColumnCollection.Dispose LegendCellColumn
Collection.Dispose
I n this Article
Releases the unmanaged resources used by the LegendCellColumnCollection and optionally releases the managed
resources.
protected override void Dispose (bool disposing);
override this.Dispose : bool -> unit
Parameters
disposing Boolean Boolean
true to release both managed and unmanaged resources; false to release only unmanaged resources.
LegendCellColumnType LegendCellColumnType Enum
Specifies a legend cell column type.
D eclaration
public enum LegendCellColumnType
type LegendCellColumnType =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Fields
SeriesSymbol The legend cell column contains a series symbol such as a line, rectangle, or line with
SeriesSymbol marker.
D eclaration
public enum LegendCellType
type LegendCellType =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Fields
Image Image The legend cell contains an image.
SeriesSymbol SeriesSymbol The legend cell contains a series symbol, such as a line or rectangle.
D eclaration
public class LegendCollection :
System.Windows.Forms.DataVisualization.Charting.ChartNamedElementCollection<System.Windows.Forms
.DataVisualization.Charting.Legend>
type LegendCollection = class
inherit ChartNamedElementCollection<Legend>
I nheritance H ierarchy
Object Object
Collection<T> Collection<T>
ChartElementCollection<T> ChartElementCollection<T>
ChartNamedElementCollection<T> ChartNamedElementCollection<T>
Remarks
The LegendCollection class is implemented as the Legends collection property of the root Chart object.
Legend objects can be appended, inserted or removed from the collection at either design time or run time.
The Count property indicates the total number of items in the collection and is commonly used to find the upper
bound of the collection.
Methods
Add(String)
Add(String)
Parameters
name String String
The name of legend to be added.
Returns
Legend Legend
A string value that represents the index of the added item.
LegendImageStyle LegendImageStyle Enum
Specifies the style to apply to the symbol for a legend item.
D eclaration
public enum LegendImageStyle
type LegendImageStyle =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The LegendImageStyle enumeration represents the style that is used for a legend item, and is applied to the symbol for
that item.
Fields
Line Line The symbol will be a line.
D eclaration
public class LegendItem : System.Windows.Forms.DataVisualization.Charting.ChartNamedElement
type LegendItem = class
inherit ChartNamedElement
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
Remarks
The LegendItem class represents a legend item, which can be either a default or custom item:
Default legend items are automatically inserted into the legend for either data series or data points. Default entries for
pie and doughnut charts represent the plotted data points, whereas entries for all other chart types represent the
plotted series. By default, these legend entries use the data point or series color for the symbol color, and the name of
the series or data point for the legend item text. Default legend items can be customized or deleted at run time by using
the CustomizeLegend event of the Chart control.
Custom legend items have user-defined text, symbol color, and so forth. Unlike the default entries, they are not
connected with the plotted data. Custom legend items can be added at either design time or run time, using the
CustomItems property of the Legend object.
Legend symbols can be rectangles, lines or markers, depending on the ImageStyle property setting of a LegendItem
object.
The text of a custom legend item is determined by the Name property.
Constructors
LegendItem()
LegendItem()
Initializes a new instance of the LegendItem class with the specified name, color and image path.
Properties
BackGradientStyle
BackGradientStyle
Gets or sets the orientation for the background gradient of a legend item. Also determines whether a gradient is
used.
BackHatchStyle
BackHatchStyle
BackImageTransparentColor
BackImageTransparentColor
Gets or sets a color which will be replaced with a transparent color when the background image is drawn.
BackSecondaryColor
BackSecondaryColor
BorderColor
BorderColor
BorderDashStyle
BorderDashStyle
BorderWidth
BorderWidth
Cells
Cells
Color
Color
Enabled
Enabled
Gets or sets a flag that indicates whether the legend item is enabled.
Image
Image
Gets or sets the image that will be displayed for a legend item symbol.
ImageStyle
ImageStyle
Legend
Legend
Gets or sets the Legend object associated with this legend item.
MarkerBorderColor
MarkerBorderColor
MarkerBorderWidth
MarkerBorderWidth
Gets or sets the border width of the markers, if used. Measured in pixels.
MarkerColor
MarkerColor
MarkerImage
MarkerImage
MarkerImageTransparentColor
MarkerImageTransparentColor
Gets or sets a color that will be replaced with a transparent color when the marker image is drawn.
MarkerSize
MarkerSize
MarkerStyle
MarkerStyle
Gets or sets a legend item marker style. Also used to enable or disable the display of markers.
Name
Name
SeparatorColor
SeparatorColor
SeparatorType
SeparatorType
SeriesName
SeriesName
Gets or sets the name of the Series associated with a default legend item.
SeriesPointIndex
SeriesPointIndex
Gets or sets the index of a DataPoint object associated with a default legend item.
ShadowColor
ShadowColor
ShadowOffset
ShadowOffset
Methods
Dispose(Boolean)
Dispose(Boolean)
Releases the unmanaged resources used by the LegendItem and optionally releases the managed resources.
LegendItem.BackGradientStyle LegendItem.BackGradient
Style
I n this Article
Gets or sets the orientation for the background gradient of a legend item. Also determines whether a gradient is used.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.GradientStyle BackGradientStyle { get; set; }
member this.BackGradientStyle : System.Windows.Forms.DataVisualization.Charting.GradientStyle with
get, set
Returns
GradientStyle GradientStyle
A GradientStyle enumeration that specifies the orientation for the background gradient of a legend item. The default
value is None.
Attributes BindableAttribute
Remarks
Use the BackGradientStyle property to determine whether a title will display a gradient, and to determine the
orientation of the gradient if one is used.
This property is only implemented if the ImageStyle property is set to Rectangle.
For a listing of available patterns, refer to the GradientStyle enumeration.
To use gradient colors:
Use the Color property to set the primary color.
Use the BackGradientStyle property to set the secondary color.
Use this BackGradientStyle property to set the desired gradient style.
Note
This property is applicable only to LegendCell objects with a LegendCellType of either SeriesSymbol or Image.
LegendItem.BackHatchStyle LegendItem.BackHatchStyle
I n this Article
Gets or sets the hatching style of a legend item.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle BackHatchStyle { get; set; }
member this.BackHatchStyle : System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle with
get, set
Returns
ChartHatchStyle ChartHatchStyle
A ChartHatchStyle enumeration that specifies the hatching style of a legend item. The default value is None.
Attributes BindableAttribute
Remarks
The ChartHatchStyle enumeration specifies the hatch pattern used by a brush of type HatchBrush. The hatch pattern
consists of a solid background color and lines drawn over the background.
For a listing of available hatching styles, refer to the ChartHatchStyle enumeration.
Note
This property is applicable only to LegendCell objects with a LegendCellType of either SeriesSymbol or Image.
LegendItem.BackImageTransparentColor LegendItem.
BackImageTransparentColor
I n this Article
Gets or sets a color which will be replaced with a transparent color when the background image is drawn.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BackImageTransparentColor { get; set; }
member this.BackImageTransparentColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that will be displayed as transparent when the background image is drawn.
Attributes BindableAttribute TypeConverterAttribute
Remarks
This property is applicable only to LegendCell objects with a LegendCellType of either SeriesSymbol or Image.
LegendItem.BackSecondaryColor LegendItem.Back
SecondaryColor
I n this Article
Gets or sets the secondary color of a legend item.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BackSecondaryColor { get; set; }
member this.BackSecondaryColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used for the secondary color of background with hatching or gradient fill. The default value is Empty.
Attributes BindableAttribute TypeConverterAttribute
Remarks
The BackSecondaryColor property is one of several related properties that determine the secondary background color
of many Chart objects; it is used when gradient colors are being applied.
This property is only implemented if the ImageStyle property is set to Rectangle.
You can set BackSecondaryColor to any valid ARGB (alpha, red, green, blue) value.
If hatching is used, the BackSecondaryColor property determines the color of the hatching lines for the legend item.
To use gradient colors for a legend cell's background:
To use gradient colors:
Use the Color property to set the primary color.
Use the BackGradientStyle property to set the secondary color.
Use the BackGradientStyle property to set the desired gradient style.
Note
This property is applicable only to LegendCell objects with a LegendCellType of either SeriesSymbol or Image.
LegendItem.BorderColor LegendItem.BorderColor
I n this Article
Gets or sets the border color of a legend item.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BorderColor { get; set; }
member this.BorderColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the border color of a legend item. The default color is Empty.
Attributes BindableAttribute TypeConverterAttribute
Remarks
You can set this property to any valid ARGB (alpha, red, green, blue) value.
Note
If you use a marker for a custom legend item. this property will set the border color of the marker. However, if the
MarkerBorderColor property is also set, its value has precedence.
Note
This property is applicable only to LegendCell objects with a LegendCellType of either SeriesSymbol or Image.
LegendItem.BorderDashStyle LegendItem.BorderDash
Style
I n this Article
Gets or sets the border style of a legend item.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartDashStyle BorderDashStyle { get; set; }
member this.BorderDashStyle : System.Windows.Forms.DataVisualization.Charting.ChartDashStyle with
get, set
Returns
ChartDashStyle ChartDashStyle
A ChartDashStyle enumeration value that determines the border style of the legend item.
Attributes BindableAttribute
Remarks
This property determines the line style used for a border. The line can be solid, dotted, and so forth.
For other border styles, see the ChartDashStyle enumeration topic.
Note
This property is applicable only to LegendCell objects with a LegendCellType of either SeriesSymbol or Image.
LegendItem.BorderWidth LegendItem.BorderWidth
I n this Article
Gets or sets the border width of a legend item.
[System.ComponentModel.Bindable(true)]
public int BorderWidth { get; set; }
member this.BorderWidth : int with get, set
Returns
Int32 Int32
An integer value that determines the width, in pixels, of the legend item border.
Attributes BindableAttribute
Remarks
The BorderWidth property can also be used to set the width of lines when, for example, custom legend items are
displayed with a Line style.
Note This property is applicable only to LegendCell objects with a LegendCellType of either SeriesSymbol or Image.
LegendItem.Cells LegendItem.Cells
I n this Article
Gets the collection of cells in the legend item.
public System.Windows.Forms.DataVisualization.Charting.LegendCellCollection Cells { get; }
member this.Cells : System.Windows.Forms.DataVisualization.Charting.LegendCellCollection
Returns
LegendCellCollection LegendCellCollection
A LegendCellCollection object that represents the collection of cells in the legend item.
Remarks
A legend item consists of one or more legend cells, each represented by a LegendCell object and stored in a
LegendCellCollection.
Note
Returns
Color Color
A Color value that is used to draw the legend item. The default color is Empty.
Attributes BindableAttribute TypeConverterAttribute
Remarks
This Color property is one several related properties that get or set the color of many chart elements; it can be set to
any ARGB (alpha, red, green, blue) value.
If this property is set for both a data point and its series, the data point color will have precedence. The series color will
only be used for data points that do not define their own color.
If a custom legend item uses a marker, this property will determine the marker color. However, if the MarkerColor
property is set, its value then has precedence.
This property will be ignored if the Image property specifies an image to be used for the legend item symbol.
Note
This property is applicable only to LegendCell objects with a LegendCellType of either SeriesSymbol or Image.
LegendItem.Dispose LegendItem.Dispose
I n this Article
Releases the unmanaged resources used by the LegendItem and optionally releases the managed resources.
protected override void Dispose (bool disposing);
override this.Dispose : bool -> unit
Parameters
disposing Boolean Boolean
true to release both managed and unmanaged resources; false to release only unmanaged resources.
LegendItem.Enabled LegendItem.Enabled
I n this Article
Gets or sets a flag that indicates whether the legend item is enabled.
public bool Enabled { get; set; }
member this.Enabled : bool with get, set
Returns
Boolean Boolean
true if the legend item is enabled; otherwise, false . The default value is true .
Remarks
This property is applicable to the entire LegendItem.
LegendItem.Image LegendItem.Image
I n this Article
Gets or sets the image that will be displayed for a legend item symbol.
[System.ComponentModel.Bindable(true)]
public string Image { get; set; }
member this.Image : string with get, set
Returns
String String
A string value that represents the URL of an image file. The default value is an empty string.
Attributes BindableAttribute
Remarks
This property determines the image file to be used for the LegendItem symbol.
The path can be an absolute or a relative URL.
If you set a background image, that image will be displayed regardless of the ImageStyle property setting.
Set the BackImageTransparentColor property to enable one color used by the image to appear transparent.
Note
This property is applicable only to LegendCell objects with a LegendCellType of either SeriesSymbol or Image.
LegendItem.ImageStyle LegendItem.ImageStyle
I n this Article
Gets or sets the display style of the legend item image.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.LegendImageStyle ImageStyle { get; set; }
member this.ImageStyle : System.Windows.Forms.DataVisualization.Charting.LegendImageStyle with get,
set
Returns
LegendImageStyle LegendImageStyle
A LegendImageStyle enumeration value that specifies the display style of the legend item image.
Attributes BindableAttribute
Remarks
These styles determine how the item's corresponding symbol will be displayed.
A Line style can be combined with a Marker style. To accomplish this, first set the ImageStyle property to Line. Then
use the MarkerImage property to specify a marker image, or the MarkerStyle property to specify a marker style. The
resulting symbol will be a combination of a line and an image or marker.
Note
This property is applicable only to LegendCell objects with a LegendCellType of either SeriesSymbol or Image.
LegendItem.Legend LegendItem.Legend
I n this Article
Gets or sets the Legend object associated with this legend item.
[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
public System.Windows.Forms.DataVisualization.Charting.Legend Legend { get; }
member this.Legend : System.Windows.Forms.DataVisualization.Charting.Legend
Returns
Legend Legend
A Legend object associated with this legend item.
Attributes BindableAttribute BrowsableAttribute
LegendItem LegendItem
I n this Article
Overloads
LegendItem()
Initializes a new instance of the LegendItem class.
LegendItem()
Initializes a new instance of the LegendItem class.
public LegendItem ();
Remarks
Use this constructor to create and initialize a new instance of the LegendItem class.
Note that you can also add custom legend items using the Add and Insert methods associated with the CustomItems
collection property of the Legend object.
Parameters
name String String
The name of the legend item.
color Color Color
The color of the legend item.
image String String
The path of the image to be displayed for the legend item.
Remarks
Only the image or color parameter needs to be specified. If both are specified, the image parameter has precedence.
LegendItem.MarkerBorderColor LegendItem.Marker
BorderColor
I n this Article
Gets or sets the border color of the markers, if used.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color MarkerBorderColor { get; set; }
member this.MarkerBorderColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that represents the ARGB (alpha, red, green, blue) color of a marker border.
Attributes BindableAttribute TypeConverterAttribute
Remarks
To use markers, set the MarkerStyle property to a value other than None.
Note that markers will not be applied to pie, doughnut, and any stacked chart types.
For custom legends, the BorderColor property will also set the border color of markers. The MarkerBorderColor
property setting has precedence over the BorderColor property setting.
Note
This property is applicable only to LegendCell objects with a LegendCellType of either SeriesSymbol or Image.
LegendItem.MarkerBorderWidth LegendItem.Marker
BorderWidth
I n this Article
Gets or sets the border width of the markers, if used. Measured in pixels.
Returns
Int32 Int32
An integer value that represents the border width of the markers. The default value is one (1) pixel.
Remarks
This property is applicable only to LegendCell objects with a LegendCellType of either SeriesSymbol or Image.
LegendItem.MarkerColor LegendItem.MarkerColor
I n this Article
Gets or sets the color of the markers, if used.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color MarkerColor { get; set; }
member this.MarkerColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that represents the color of the markers. The default color is Empty.
Attributes BindableAttribute TypeConverterAttribute
Remarks
This property is applicable only to LegendCell objects with a LegendCellType of either SeriesSymbol or Image.
LegendItem.MarkerImage LegendItem.MarkerImage
I n this Article
Gets or sets a marker image of the legend item.
[System.ComponentModel.Bindable(true)]
public string MarkerImage { get; set; }
member this.MarkerImage : string with get, set
Returns
String String
A string value that represents the URL of an image file.
Attributes BindableAttribute
Remarks
Represents a path to an image file, which can be an absolute or relative URL.
To use markers, set the MarkerStyle property to a value other than None.
The MarkerImage property takes precedence over the MarkerColor property.
A marker image can be any valid graphics file supported by .NET Framework, including icons.
To set one color of the marker image to be transparent, use the MarkerImageTransparentColor property.
Note
This property is applicable only to LegendCell objects with a LegendCellType of either SeriesSymbol or Image.
LegendItem.MarkerImageTransparentColor LegendItem.
MarkerImageTransparentColor
I n this Article
Gets or sets a color that will be replaced with a transparent color when the marker image is drawn.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color MarkerImageTransparentColor { get; set; }
member this.MarkerImageTransparentColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that represents an ARGB (alpha, red, green, blue) color that will be replaced with a transparent color
when the marker image is drawn.
Attributes BindableAttribute TypeConverterAttribute
Remarks
The MarkerImageTransparentColor property is used to select one color in a marker image that will be displayed as
transparent.
You can set this property to any valid ARGB (alpha, red, green, blue) value.
Note
This property is applicable only to LegendCell objects with a LegendCellType of either SeriesSymbol or Image.
LegendItem.MarkerSize LegendItem.MarkerSize
I n this Article
Gets or sets the size of the legend item markers, if used.
[System.ComponentModel.Bindable(true)]
public int MarkerSize { get; set; }
member this.MarkerSize : int with get, set
Returns
Int32 Int32
An integer expression that represents the height and width of the plotting area of markers, in pixels. The default value
is 5 pixels.
Attributes BindableAttribute
Remarks
To use markers, set the MarkerStyle property to a value other than None.
Note that markers will not be applied to data points of pie, doughnut and any stacked chart types.
Note
This property is applicable only to LegendCell objects with a LegendCellType of either SeriesSymbol or Image.
LegendItem.MarkerStyle LegendItem.MarkerStyle
I n this Article
Gets or sets a legend item marker style. Also used to enable or disable the display of markers.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.MarkerStyle MarkerStyle { get; set; }
member this.MarkerStyle : System.Windows.Forms.DataVisualization.Charting.MarkerStyle with get, set
Returns
MarkerStyle MarkerStyle
A MarkerStyle integer enumeration that specifies a legend item marker style. The default value is None.
Attributes BindableAttribute
Remarks
To disable markers, set this property to None.
Note
This property is applicable only to LegendCell objects with a LegendCellType of either SeriesSymbol or Image.
LegendItem.Name LegendItem.Name
I n this Article
Gets or sets the name of the legend item.
[System.ComponentModel.Bindable(true)]
public override string Name { get; set; }
member this.Name : string with get, set
Returns
String String
A string value that represents the name of the legend item.
Attributes BindableAttribute
LegendItem.SeparatorColor LegendItem.SeparatorColor
I n this Article
Gets or sets the color of the legend item separator.
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color SeparatorColor { get; set; }
member this.SeparatorColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the color of the legend item separator. The default value is Black.
Attributes TypeConverterAttribute
Remarks
This property is applicable to the entire LegendItem.
LegendItem.SeparatorType LegendItem.SeparatorType
I n this Article
Gets or sets the separator style of the legend item.
public System.Windows.Forms.DataVisualization.Charting.LegendSeparatorStyle SeparatorType { get;
set; }
member this.SeparatorType : System.Windows.Forms.DataVisualization.Charting.LegendSeparatorStyle
with get, set
Returns
LegendSeparatorStyle LegendSeparatorStyle
A LegendSeparatorStyle enumeration value that specifies the separator style of the legend item.
LegendItem.SeriesName LegendItem.SeriesName
I n this Article
Gets or sets the name of the Series associated with a default legend item.
[System.ComponentModel.Browsable(false)]
public string SeriesName { get; set; }
member this.SeriesName : string with get, set
Returns
String String
A string value that determines the name of the series associated with a default legend item. The default value is a
zero-length string.
Attributes BrowsableAttribute
Remarks
This property should only be used in the CustomizeLegend event, to determine which data series a default legend
entry represents.
The SeriesName property applies to all charts except pie and sphere charts; their default legend items correspond to
plotted data points, and not to plotted series. When you deal with pie and sphere charts, use the SeriesPointIndex
property instead.
This property should not be set by the developer.
Note
[System.ComponentModel.Browsable(false)]
public int SeriesPointIndex { get; set; }
member this.SeriesPointIndex : int with get, set
Returns
Int32 Int32
An integer value that represents the location of the default legend's associated data point in a zero-based index. All
chart types except for pie and doughnut charts will return a negative one (-1).
Attributes BrowsableAttribute
Remarks
This property should only be used in the CustomizeLegend event to determine the DataPoint object that is represented
by a default pie or sphere chart legend entry.
Chart types other than pie or sphere charts will return a negative one (-1), because the default legend items correspond
to plotted series, and not plotted data points. Use the SeriesName property for these chart types.
This property should not be set by the developer.
Note
Returns
Color Color
A Color value that represents the shadow color of a legend item. The default color is Black.
Attributes BindableAttribute TypeConverterAttribute
Remarks
Gets or sets the shadow color of several chart elements, and can be set to any valid ARGB (alpha, red, green, blue)
value.
The alpha value can be used to achieve a "realistic" shadowing effect; try using a color of "128,0,0,0" for shadows.
To implement a shadow, set the ShadowOffset property to a value other than zero (0).
Note This property is applicable only to LegendCell objects with a LegendCellType of either SeriesSymbol or Image.
LegendItem.ShadowOffset LegendItem.ShadowOffset
I n this Article
Gets or sets the shadow offset, in pixels, of a legend item.
[System.ComponentModel.Bindable(true)]
public int ShadowOffset { get; set; }
member this.ShadowOffset : int with get, set
Returns
Int32 Int32
An integer value that represents the shadow offset, in pixels, of the relevant chart element.
Attributes BindableAttribute
Remarks
To implement shadowing, use a value other than zero (0). A positive value will result in a shadow that shifts down and
to the right. A negative value will result in a shadow that shifts up and to the left.
Note This property is applicable only to LegendCell objects with a LegendCellType of either SeriesSymbol or Image.
LegendItem.ToolTip LegendItem.ToolTip
I n this Article
Gets or sets the tooltip of the legend item.
[System.ComponentModel.Bindable(true)]
public string ToolTip { get; set; }
member this.ToolTip : string with get, set
Returns
String String
A string value that represents the tooltip for the legend item.
Attributes BindableAttribute
Remarks
This property allows you to set special keywords to display different types of chart-related data. For more information,
see Keywords [rs_vsDataVis].
Note
D eclaration
public enum LegendItemOrder
type LegendItemOrder =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Fields
Auto Auto The chart automatically determines the order in which items are added to the
legend.
ReversedSeriesOrder Items are added to the legend in the reverse order of items added to the
ReversedSeriesOrder chart series.
SameAsSeriesOrder SameAsSeriesOrder Items are added to the legend in the same order as items added to the chart
series.
LegendItemsCollection LegendItemsCollection Class
Represents a collection of LegendItem objects.
D eclaration
public class LegendItemsCollection :
System.Windows.Forms.DataVisualization.Charting.ChartElementCollection<System.Windows.Forms.Data
Visualization.Charting.LegendItem>
type LegendItemsCollection = class
inherit ChartElementCollection<LegendItem>
I nheritance H ierarchy
Object Object
Collection<T> Collection<T>
ChartElementCollection<T> ChartElementCollection<T>
Remarks
The LegendItemsCollection class represents a collection of LegendItem objects, which in turn represent items in a
legend.
This collection class is exposed in two ways:
As the CustomItems object property of the Legend object, which can be used to add, delete or modify custom legend
items. The term "custom" refers to legend items that have user-defined text, symbol color, and so forth. In comparison,
"default" legend items are items that are automatically inserted into the legend and represent a data series or data
point. Default legend item entries for pie and doughnut charts represent the plotted data points, whereas item entries
for all other chart types represent the plotted series. The CustomItems property is available at both design time and
run time.
In the CustomizeLegend event, as the LegendItems property of the CustomizeLegendEventArgs parameter. The
LegendItems property stores both default legend items and custom legend items that have been added to the Chart
control at design time. Legend items can be modified or deleted; in addition, their order can be changed.
To add legend items to the collection, use one of the overloaded Add and Insert methods in this class.
Methods
Add(Color, String)
Add(Color, String)
Add(String, String)
Add(String, String)
Adds a custom LegendItem object with the specified image to the end of the collection.
Inserts a LegendItem object with the specified text and symbol image into the collection at the specified location.
Reverse()
Reverse()
Overloads
Add(Color, String) Add(Color, String)
Adds a custom LegendItem object to the end of the collection.
Parameters
color Color Color
The symbol color of the legend item.
text String String
The legend item text.
Returns
Int32 Int32
An integer that represents the location in the zero-based index where the item was inserted into the collection.
Remarks
Appends a custom legend item with the specified text and symbol color to the end of the collection.
To add a custom legend item that uses an image for its symbol, call the Add(String, String) method.
To insert a custom LegendItem into the collection, use one of the Insert methods of this class.
Parameters
image String String
The absolute or relative URL of the image file to be used for the legend item symbol.
text String String
The legend item text.
Returns
Int32 Int32
An integer that represents the location in the zero-based index where the item was inserted into the collection.
Remarks
Appends a custom legend item to the collection with the specified text and image to be used as the symbol for the
legend item.
To add a custom legend item that uses a color for its symbol, call the Add(Color, String) method.
To insert a LegendItem object into the collection use one of the Insert methods of this class.
LegendItemsCollection.Insert LegendItemsCollection.
Insert
I n this Article
Overloads
Insert(Int32, Color, String) Insert(Int32, Color, String)
Inserts a LegendItem object with the specified text and symbol
color into the collection at the specified location.
Parameters
index Int32 Int32
The location in the zero-based index where the LegendItem object is to be inserted.
color Color Color
The symbol color of the legend item.
text String String
The legend item text.
Remarks
Inserts a custom legend item into the collection at the specified location using the specified text and symbol color.
To insert a legend item that uses an image for its symbol, use the Insert method.
Use the Add method to append a LegendItem object that uses a color for its symbol to the end if the collection.
Parameters
index Int32 Int32
The location in the zero-based index where the LegendItem object is to be inserted.
image String String
The absolute or relative URL of the image file to be used for the legend item symbol.
text String String
The legend item text.
Remarks
Inserts a custom legend item into the collection at the specified location using the specified text and image for the
symbol.
To insert a legend item that uses a color for its symbol, use the Insert method.
Use the Add method to append a LegendItem object with a symbol image to the end if the collection.
LegendItemsCollection.Reverse LegendItemsCollection.
Reverse
I n this Article
Reverses the order of items in the collection.
D eclaration
public enum LegendSeparatorStyle
type LegendSeparatorStyle =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Fields
DashLine DashLine Legend separator is a dashed line.
GradientLine GradientLine Legend separator is a solid line with a gradient on the ends.
ThickGradientLine ThickGradientLine Legend separator is a thick solid line with a gradient on the ends.
D eclaration
public enum LegendStyle
type LegendStyle =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The LegendStyle enumeration represents a legend style, and is used in conjunction with the LegendStyle property.
Fields
Column Column Legend items are displayed using one column and multiple rows.
Row Row Legend items are displayed using multiple columns and one row.
Table Table Legend items are displayed using multiple columns and multiple rows.
LegendTableStyle LegendTableStyle Enum
Specifies the legend table style.
D eclaration
public enum LegendTableStyle
type LegendTableStyle =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Fields
Auto The legend table style is automatically determined by the Chart control.
Auto
Tall Legend items will be fit vertically within the legend. This style is preferred when Docking is set to Left or Right.
Tall
Wide Legend items will be fit horizontally within the legend. This style is preferred when Docking is set to Top or
Wide Bottom.
LightStyle LightStyle Enum
Specifies a lighting style for a three-dimensional (3D ) chart area.
D eclaration
public enum LightStyle
type LightStyle =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The LightStyle enumeration is used with the LightStyle property to set the lighting style of a 3D chart area.
Fields
None None No lighting is applied.
Realistic A realistic lighting style is applied, where the hue of all chart area elements changes depending on the
Realistic amount of rotation.
Simplistic A simplistic lighting style is applied, where the hue of all chart area elements is fixed.
Simplistic
LineAnchorCapStyle LineAnchorCapStyle Enum
Specifies the shape - that is, the anchor cap - to draw on the point end of the label callout line.
D eclaration
public enum LineAnchorCapStyle
type LineAnchorCapStyle =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The LineAnchorCapStyle enumeration represents the shape to be drawn on the point end of the label callout line. It is
used in conjunction with the CalloutStyle and the CalloutLineAnchorCapStyle properties. If a callout line is not used,
this enumeration will have no effect.
Fields
Arrow Arrow Anchor cap will be drawn with an arrowhead.
D eclaration
public class LineAnnotation : System.Windows.Forms.DataVisualization.Charting.Annotation
type LineAnnotation = class
inherit Annotation
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
Annotation Annotation
Constructors
LineAnnotation()
LineAnnotation()
Properties
Alignment
Alignment
AnchorAlignment
AnchorAlignment
AnnotationType
AnnotationType
BackColor
BackColor
BackGradientStyle
BackGradientStyle
This property is not applicable to the line annotation type.
BackHatchStyle
BackHatchStyle
BackSecondaryColor
BackSecondaryColor
EndCap
EndCap
Gets or sets a style for the anchor cap at the end of the annotation line.
Font
Font
ForeColor
ForeColor
IsInfinitive
IsInfinitive
Gets or sets a flag that indicates whether an infinite line should be drawn.
IsSizeAlwaysRelative
IsSizeAlwaysRelative
Gets or sets a flag that specifies whether the size of an annotation is always defined in relative chart coordinates.
StartCap
StartCap
Gets or sets a style for the anchor cap at the start of an annotation line.
TextStyle
TextStyle
Returns
ContentAlignment ContentAlignment
A ContentAlignment enumeration value.
Attributes BrowsableAttribute
LineAnnotation.AnchorAlignment LineAnnotation.Anchor
Alignment
I n this Article
Gets or sets the position alignment of an annotation to the anchor point.
[System.ComponentModel.Browsable(false)]
public override System.Drawing.ContentAlignment AnchorAlignment { get; set; }
member this.AnchorAlignment : System.Drawing.ContentAlignment with get, set
Returns
ContentAlignment ContentAlignment
A ContentAlignment value that represents the annotation alignment to the anchor point.
Attributes BrowsableAttribute
Remarks
The annotation must be anchored using either AnchorDataPoint, or the AnchorX and AnchorY properties. Its X and Y
properties must be set to NaN.
LineAnnotation.AnnotationType LineAnnotation.
AnnotationType
I n this Article
Gets the type of annotation.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
public override string AnnotationType { get; }
member this.AnnotationType : string
Returns
String String
The annotation type.
Attributes BindableAttribute BrowsableAttribute
Remarks
For internal use, should not be used.
LineAnnotation.BackColor LineAnnotation.BackColor
I n this Article
This property is not applicable to the line annotation type.
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color BackColor { get; set; }
member this.BackColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value.
Attributes BrowsableAttribute TypeConverterAttribute
LineAnnotation.BackGradientStyle LineAnnotation.Back
GradientStyle
I n this Article
This property is not applicable to the line annotation type.
[System.ComponentModel.Browsable(false)]
public override System.Windows.Forms.DataVisualization.Charting.GradientStyle BackGradientStyle {
get; set; }
member this.BackGradientStyle : System.Windows.Forms.DataVisualization.Charting.GradientStyle with
get, set
Returns
GradientStyle GradientStyle
A GradientStyle enumeration value.
Attributes BrowsableAttribute
LineAnnotation.BackHatchStyle LineAnnotation.Back
HatchStyle
I n this Article
This property is not applicable to the line annotation type.
[System.ComponentModel.Browsable(false)]
public override System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle BackHatchStyle {
get; set; }
member this.BackHatchStyle : System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle with
get, set
Returns
ChartHatchStyle ChartHatchStyle
A ChartHatchStyle value.
Attributes BrowsableAttribute
LineAnnotation.BackSecondaryColor LineAnnotation.
BackSecondaryColor
I n this Article
This property is not applicable to the line annotation type.
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color BackSecondaryColor { get; set; }
member this.BackSecondaryColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value.
Attributes BrowsableAttribute TypeConverterAttribute
LineAnnotation.EndCap LineAnnotation.EndCap
I n this Article
Gets or sets a style for the anchor cap at the end of the annotation line.
public virtual System.Windows.Forms.DataVisualization.Charting.LineAnchorCapStyle EndCap { get; set;
}
member this.EndCap : System.Windows.Forms.DataVisualization.Charting.LineAnchorCapStyle with get,
set
Returns
LineAnchorCapStyle LineAnchorCapStyle
A LineAnchorCapStyle enumeration value that represents the style to apply to the anchor cap at the end of the line.
LineAnnotation.Font LineAnnotation.Font
I n this Article
This property is not applicable to the line annotation type.
[System.ComponentModel.Browsable(false)]
public override System.Drawing.Font Font { get; set; }
member this.Font : System.Drawing.Font with get, set
Returns
Font Font
A Font object.
Attributes BrowsableAttribute
LineAnnotation.ForeColor LineAnnotation.ForeColor
I n this Article
This property is not applicable to the line annotation type.
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color ForeColor { get; set; }
member this.ForeColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value.
Attributes BrowsableAttribute TypeConverterAttribute
LineAnnotation.IsInfinitive LineAnnotation.IsInfinitive
I n this Article
Gets or sets a flag that indicates whether an infinite line should be drawn.
public virtual bool IsInfinitive { get; set; }
member this.IsInfinitive : bool with get, set
Returns
Boolean Boolean
true if a line should be drawn infinitely through two points provided, otherwise false .
LineAnnotation.IsSizeAlwaysRelative LineAnnotation.Is
SizeAlwaysRelative
I n this Article
Gets or sets a flag that specifies whether the size of an annotation is always defined in relative chart coordinates.
Returns
Boolean Boolean
true if the Width and Height of an annotation are always in chart relative coordinates, otherwise false .
Remarks
The width and height of an annotation may be set in relative chart or in axes coordinates. By default, relative chart
coordinates are used. To use axes coordinates for the annotation size, set the IsSizeAlwaysRelative property to false .
Then anchor the annotation to a data point or set the AxisX or AxisY properties.
LineAnnotation
I n this Article
Initializes a new instance of the LineAnnotation class.
public LineAnnotation ();
LineAnnotation.StartCap LineAnnotation.StartCap
I n this Article
Gets or sets a style for the anchor cap at the start of an annotation line.
public virtual System.Windows.Forms.DataVisualization.Charting.LineAnchorCapStyle StartCap { get;
set; }
member this.StartCap : System.Windows.Forms.DataVisualization.Charting.LineAnchorCapStyle with get,
set
Returns
LineAnchorCapStyle LineAnchorCapStyle
A LineAnchorCapStyle enumeration value that represents the style to apply to the anchor cap at the start of the line.
LineAnnotation.TextStyle LineAnnotation.TextStyle
I n this Article
This property is not applicable to the line annotation type.
[System.ComponentModel.Browsable(false)]
public override System.Windows.Forms.DataVisualization.Charting.TextStyle TextStyle { get; set; }
member this.TextStyle : System.Windows.Forms.DataVisualization.Charting.TextStyle with get, set
Returns
TextStyle TextStyle
A TextStyle enumeration value.
Attributes BrowsableAttribute
Margins Margins Class
Represents the margins for various chart elements.
D eclaration
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.Marg
inExpandableObjectConverter))]
public class Margins
type Margins = class
I nheritance H ierarchy
Object Object
Constructors
Margins()
Margins()
Initializes a new instance of the Margins class with the specified top, bottom, left and right coordinates of the
margin.
Properties
Bottom
Bottom
Left
Left
Right
Right
Top
Top
GetHashCode()
GetHashCode()
IsEmpty()
IsEmpty()
ToRectangleF()
ToRectangleF()
ToString()
ToString()
Returns
Int32 Int32
Returns an integer value. The default value is 0.
Remarks
When used for legend cells, the margins are measured as a percentage of the legend's font size.
Margins.Equals Margins.Equals
I n this Article
Determines whether the specified object is equal to the current object.
public override bool Equals (object obj);
override this.Equals : obj -> bool
Parameters
obj Object Object
The object to compare with the current object.
Returns
Boolean Boolean
true if the specified object is equal to the current object; otherwise, false .
Margins.GetHashCode Margins.GetHashCode
I n this Article
Gets the hash code for the Margins object.
public override int GetHashCode ();
override this.GetHashCode : unit -> int
Returns
Int32 Int32
An integer value that represents the hash code for a Margins object.
Margins.IsEmpty Margins.IsEmpty
I n this Article
Determines whether the margins are empty.
public bool IsEmpty ();
member this.IsEmpty : unit -> bool
Returns
Boolean Boolean
true if all margins values are zero; otherwise, false .
Margins.Left Margins.Left
I n this Article
Gets or sets the left margin.
public int Left { get; set; }
member this.Left : int with get, set
Returns
Int32 Int32
An integer value. The default value is 0.
Remarks
When used for legend cells, the margins are measured as a percentage of the legend's font size.
Margins Margins
I n this Article
Overloads
Margins()
Initializes a new instance of the Margins class.
Margins()
Initializes a new instance of the Margins class.
public Margins ();
Parameters
top Int32 Int32
Top margin.
bottom Int32 Int32
Bottom margin.
left Int32 Int32
Left margin.
right Int32 Int32
Right margin.
Remarks
When used for legend cells, the margins are measured as a percentage of the legend's font size.
Margins.Right Margins.Right
I n this Article
Gets or sets the right margin.
public int Right { get; set; }
member this.Right : int with get, set
Returns
Int32 Int32
An integer value. The default value is 0.
Remarks
When used for legend cells, the margins are measured as a percentage of the legend's font size.
Margins.Top Margins.Top
I n this Article
Gets or sets the top margin.
public int Top { get; set; }
member this.Top : int with get, set
Returns
Int32 Int32
An integer value. The default value is 0.
Remarks
When used for legend cells, the margins are measured as a percentage of the legend's font size.
Margins.ToRectangleF Margins.ToRectangleF
I n this Article
Converts a Margins object to a RectangleF object.
public System.Drawing.RectangleF ToRectangleF ();
member this.ToRectangleF : unit -> System.Drawing.RectangleF
Returns
RectangleF RectangleF
A RectangleF object that has margins.
Margins.ToString Margins.ToString
I n this Article
Converts a Margins object to its string representation.
Returns
String String
A string value that represents this object.
MarkerStyle MarkerStyle Enum
Specifies a style for markers.
D eclaration
public enum MarkerStyle
type MarkerStyle =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The MarkerStyle enumeration represents a style that is used for a series or data point marker. It is used in conjunction
with the MarkerStyle property.
Fields
Circle Circle A circular marker is displayed.
D eclaration
public class NamedImage : System.Windows.Forms.DataVisualization.Charting.ChartNamedElement
type NamedImage = class
inherit ChartNamedElement
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
Remarks
The NamedImage class represents an image that has a unique name, and is useful when an image is dynamically
created using a particular drawing routine, and then specified as the image for one of the image properties of the Chart
control.
The Name property determines the unique name of a NamedImage object. The Image property determines its
associated image, which can be any object derived from the .NET Framework Image class.
When one of the image properties of the Chart control is set by specifying a string value, the Images collection
property is first checked to determine whether an image with the specified name exists. If a matching NamedImage
object is found, this image is used. If a matching NamedImage object is not located, the string value is treated as a
URL, image resource name, or an image path.
Constructors
NamedImage()
NamedImage()
NamedImage(String, Image)
NamedImage(String, Image)
Initializes a new instance of the NamedImage class with the specified name of the named image and its associated
image.
Properties
Image
Image
Methods
Dispose(Boolean)
Dispose(Boolean)
Parameters
disposing Boolean Boolean
true to release both unmanaged and managed resources; false to release only unmanaged resources.
NamedImage.Image NamedImage.Image
I n this Article
Gets or sets the image of a NamedImage object.
[System.ComponentModel.Bindable(false)]
public System.Drawing.Image Image { get; set; }
member this.Image : System.Drawing.Image with get, set
Returns
Image Image
The image component of a NamedImage object. This can be any object derived from the .NET Framework Image class,
for example, a Bitmap object.
Attributes BindableAttribute
Remarks
The Image property determines which image is stored in a NamedImage object.
Use NamedImage objects for dynamically created images, which can then be assigned to a chart image property.
NamedImage.Name NamedImage.Name
I n this Article
Gets or sets the unique name of a NamedImage object.
[System.ComponentModel.Bindable(false)]
public override string Name { get; set; }
member this.Name : string with get, set
Returns
String String
A string value that represents the unique name of a NamedImage object stored in the NamedImagesCollection.
Attributes BindableAttribute
Remarks
The property identifies a NamedImage object that is stored in the NamedImagesCollection. This name must be unique,
or an exception will be thrown when the object is added to the collection.
Use NamedImage objects for dynamically created images, which can then be assigned to a chart image property.
This Name property value is used when you set a chart image property to a NamedImage object.
When one of the image properties of the Chart control is set by specifying a string value, the Images collection
property - of type NamedImagesCollection - is first checked to determine whether an image with the specified name
exists. If a matching NamedImage object is found, this image is used. If a matching NamedImage object is not located,
the string value is treated as a URL, an image resource name, or an image path.
NamedImage NamedImage
I n this Article
Overloads
NamedImage()
Initializes a new instance of the NamedImage class.
NamedImage()
Initializes a new instance of the NamedImage class.
public NamedImage ();
Parameters
name String String
The name of the named image. Use this name when setting a named image to one of the image properties.
image Image Image
The associated image of the named image.
NamedImagesCollection NamedImagesCollection Class
Represents a collection of NamedImage objects.
D eclaration
public class NamedImagesCollection :
System.Windows.Forms.DataVisualization.Charting.ChartNamedElementCollection<System.Windows.Forms
.DataVisualization.Charting.NamedImage>
type NamedImagesCollection = class
inherit ChartNamedElementCollection<NamedImage>
I nheritance H ierarchy
Object Object
Collection<T> Collection<T>
ChartElementCollection<T> ChartElementCollection<T>
ChartNamedElementCollection<T> ChartNamedElementCollection<T>
Remarks
The NamedImagesCollection class represents a collection of NamedImage objects, which are objects that have an
associated image and a name that is unique to the collection.
This class is exposed as the Images collection property of the root Chart object, and is only available at run time.
An image can be any object derived from the .NET Framework Image class, such as Bitmap, which is created
dynamically. The image can be stored in this collection, and then assigned at a later time to any image property in the
Chart control, such as BackImage.
When one of the image properties in the Chart control is set by specifying a string value, the Images collection
property, of type NamedImagesCollection, is first checked to see if an image with that name exists. If a matching
NamedImage object is found, this image is used. If a matching NamedImage object is not located, the string expression
is treated as a URL, image resource name or pathname.
Point3D Point3D Class
Represents the coordinates of a three-dimensional (3D ) data point. This class is used when performing custom drawing
with 3D charts.
D eclaration
public class Point3D
type Point3D = class
I nheritance H ierarchy
Object Object
Remarks
Any point used in custom 3D drawing - which is accomplished using GDI+ - must be transformed from relative X, Y
and Z (3D ) coordinates into relative X and Y (2D ) coordinates using the TransformPoints method. By calling
TransformPoints, the X and Y -values of the Point3D objects are changed so that they reflect the 3-dimensional space.
The new X and Y points can then be used for GDI+ method calls - the Z value is then disregarded - after being
changed to absolute pixel coordinates using the GetAbsolutePoint method.
Note that the Z coordinate may be less than zero (located behind a chart area) or greater than 100 (located in front of a
chart area).
To both enable 3D charts and work with their styles, use the Area3DStyle property. The Point3D class is not used for
3D styles.
Constructors
Point3D()
Point3D()
Initializes a new instance of the AnnotationPathPoint class with the specified X, Y and Z coordinates.
Properties
PointF
PointF
Gets or sets a PointF structure, which stores the X and Y coordinates of a 3D point.
X
X
Z
Z
Overloads
Point3D()
Initializes a new instance of the Point3D class.
Point3D()
Initializes a new instance of the Point3D class.
public Point3D ();
Parameters
x Single Single
The X coordinate of 3D point.
y Single Single
The Y coordinate of 3D point.
z Single Single
The Z coordinate, which represents the depth of 3D point.
Point3D.PointF Point3D.PointF
I n this Article
Gets or sets a PointF structure, which stores the X and Y coordinates of a 3D point.
[System.ComponentModel.Bindable(true)]
public System.Drawing.PointF PointF { get; set; }
member this.PointF : System.Drawing.PointF with get, set
Returns
PointF PointF
A PointF structure which stores the X and Y coordinates of a 3D point.
Attributes BindableAttribute
Remarks
Any point used in custom 3D drawing - which is accomplished using GDI+ - must be transformed from X, Y and Z
(3D ) coordinates into X and Y (2D ) coordinates using the TransformPoints method. This method takes an array of
Point3D objects as its only parameter. By calling TransformPoints, the X and Y property values are changed to reflect
the 3-dimensional space.
These new X and Y coordinates are then converted to absolute coordinates, by using a method such as the
GetAbsolutePoint method. After converting the coordinates, the PointF property of each Point3D object can be used
for any GDI+ method that take a PointF object as a parameter.
Point3D.X Point3D.X
I n this Article
Gets or sets the X coordinate of a 3D point.
[System.ComponentModel.Bindable(true)]
public float X { get; set; }
member this.X : single with get, set
Returns
Single Single
A float that represents the X coordinate of a 3D point.
Attributes BindableAttribute
Remarks
Any point used in custom 3D drawing - which is accomplished using GDI+ - must be transformed from X, Y and Z
(3D ) coordinates into X and Y (2D ) coordinates using the TransformPoints method. This method takes an array of
Point3D objects as its only parameter. By calling the TransformPoints method, the X and Y property values are changed
to reflect the 3-dimensional space.
These new X and Y coordinates are then converted to absolute coordinates using the GetAbsolutePoint method. They
are then used for GDI+ method calls.
A relative X coordinate can be obtained from an axis value by calling the ValueToPosition method.
Point3D.Y Point3D.Y
I n this Article
Gets or sets the Y coordinate of a 3D point.
[System.ComponentModel.Bindable(true)]
public float Y { get; set; }
member this.Y : single with get, set
Returns
Single Single
A float value that represents the Y coordinate of a 3D point.
Attributes BindableAttribute
Remarks
Any point used in custom 3D drawing - which is accomplished using GDI+ - must be transformed from X, Y and Z
(3D ) coordinates into X and Y (2D ) coordinates using the TransformPoints method. This method takes an array of
Point3D objects as its only parameter. By calling the TransformPoints method, the X and Y property values are changed
to reflect the 3-dimensional space.
These new X and Y coordinates are then converted to absolute coordinates by using the GetAbsolutePoint method.
They are then used for GDI+ method calls.
A relative Y coordinate can be obtained from an axis value using the ValueToPosition method.
Point3D.Z Point3D.Z
I n this Article
Gets or sets the Z coordinate of a 3D point.
[System.ComponentModel.Bindable(true)]
public float Z { get; set; }
member this.Z : single with get, set
Returns
Single Single
The Z coordinate of a 3D point, which is measured as a percentage of the relevant chart area's depth.
Attributes BindableAttribute
Remarks
This Z property is always expressed as a percentage of the relevant chart area's depth. With 3D charts, Z coordinates
are relative, and have a value of 0 for the back wall of the chart area and a value of 100 for the front wall of the chart
area.
Note This Z property may be less than zero (located behind a chart area) or greater than 100 (located in front of a
chart area).
Any point used in custom 3D drawing - which is accomplished using GDI+ - must be transformed from X, Y and Z
(3D ) coordinates into X and Y (2D ) coordinates using the TransformPoints method. This method takes an array of
Point3D objects as its only parameter. By calling the TransformPoints method, the X and Y property values are changed
to reflect the 3-dimensional space.
These new X and Y coordinates are then converted to absolute coordinates by using the GetAbsolutePoint method.
They are then used for GDI+ method calls.
Relative Z coordinates can be obtained for series by using the GetSeriesDepth and GetSeriesZPosition methods.
PointSortOrder PointSortOrder Enum
Indicates whether the sort order for data points is ascending or descending.
D eclaration
public enum PointSortOrder
type PointSortOrder =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The PointSortOrder enumeration represents the order of the sort to be performed on data point values. It is used with
the Sort method definitions in the DataManipulator class that include a pointSortOrder parameter.
Fields
Ascending Ascending Ascending sort order, that is, smallest to largest values.
Descending Descending Descending sort order, that is, largest to smallest values.
PolygonAnnotation PolygonAnnotation Class
Represents a polygon annotation.
D eclaration
public class PolygonAnnotation :
System.Windows.Forms.DataVisualization.Charting.PolylineAnnotation
type PolygonAnnotation = class
inherit PolylineAnnotation
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
Annotation Annotation
PolylineAnnotation PolylineAnnotation
Constructors
PolygonAnnotation()
PolygonAnnotation()
Properties
AnnotationType
AnnotationType
BackColor
BackColor
BackGradientStyle
BackGradientStyle
BackHatchStyle
BackHatchStyle
EndCap
EndCap
StartCap
StartCap
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
public override string AnnotationType { get; }
member this.AnnotationType : string
Returns
String String
The annotation type.
Attributes BindableAttribute BrowsableAttribute
Remarks
For internal use, should not be used.
PolygonAnnotation.BackColor PolygonAnnotation.Back
Color
I n this Article
Gets or sets the background color of an annotation.
[System.ComponentModel.Browsable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color BackColor { get; set; }
member this.BackColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the annotation background.
Attributes BrowsableAttribute TypeConverterAttribute
PolygonAnnotation.BackGradientStyle Polygon
Annotation.BackGradientStyle
I n this Article
Gets or sets the background gradient style of an annotation.
[System.ComponentModel.Browsable(true)]
public override System.Windows.Forms.DataVisualization.Charting.GradientStyle BackGradientStyle {
get; set; }
member this.BackGradientStyle : System.Windows.Forms.DataVisualization.Charting.GradientStyle with
get, set
Returns
GradientStyle GradientStyle
A GradientStyle value used to draw the annotation background.
Attributes BrowsableAttribute
Remarks
Two colors are used to draw the gradient fill; the primary color is specified with the BackColor property and the
secondary color is specified with the BackSecondaryColor property.
PolygonAnnotation.BackHatchStyle PolygonAnnotation.
BackHatchStyle
I n this Article
Gets or sets the background hatch style of an annotation.
[System.ComponentModel.Browsable(true)]
public override System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle BackHatchStyle {
get; set; }
member this.BackHatchStyle : System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle with
get, set
Returns
ChartHatchStyle ChartHatchStyle
A ChartHatchStyle value used to draw the annotation background.
Attributes BrowsableAttribute
Remarks
Two colors are used to draw the hatching fill; the primary color is specified with the BackColor property and the
secondary color is specified with the BackSecondaryColor property.
PolygonAnnotation.BackSecondaryColor Polygon
Annotation.BackSecondaryColor
I n this Article
Gets or sets the secondary color of the annotation background.
[System.ComponentModel.Browsable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color BackSecondaryColor { get; set; }
member this.BackSecondaryColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the annotation background with hatching or gradient fill.
Attributes BrowsableAttribute TypeConverterAttribute
Remarks
This secondary color is used with a primary color, defined with the BackColor property, when the BackHatchStyle and
BackGradientStyle properties are used.
PolygonAnnotation.EndCap PolygonAnnotation.EndCap
I n this Article
This property is not applicable to the polygon annotation type.
[System.ComponentModel.Browsable(false)]
public override System.Windows.Forms.DataVisualization.Charting.LineAnchorCapStyle EndCap { get;
set; }
member this.EndCap : System.Windows.Forms.DataVisualization.Charting.LineAnchorCapStyle with get,
set
Returns
LineAnchorCapStyle LineAnchorCapStyle
A LineAnchorCapStyle value.
Attributes BrowsableAttribute
Remarks
This property is not applicable to the polygon annotation type.
PolygonAnnotation
I n this Article
Initializes a new instance of the PolygonAnnotation class.
public PolygonAnnotation ();
PolygonAnnotation.StartCap PolygonAnnotation.Start
Cap
I n this Article
This property is not applicable to the polygon annotation type.
[System.ComponentModel.Browsable(false)]
public override System.Windows.Forms.DataVisualization.Charting.LineAnchorCapStyle StartCap { get;
set; }
member this.StartCap : System.Windows.Forms.DataVisualization.Charting.LineAnchorCapStyle with get,
set
Returns
LineAnchorCapStyle LineAnchorCapStyle
A LineAnchorCapStyle value.
Attributes BrowsableAttribute
Remarks
This property is not applicable to the polygon annotation type.
PolylineAnnotation PolylineAnnotation Class
Represents a polyline annotation.
D eclaration
public class PolylineAnnotation : System.Windows.Forms.DataVisualization.Charting.Annotation
type PolylineAnnotation = class
inherit Annotation
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
Annotation Annotation
Constructors
PolylineAnnotation()
PolylineAnnotation()
Properties
Alignment
Alignment
AnnotationType
AnnotationType
BackColor
BackColor
BackGradientStyle
BackGradientStyle
BackHatchStyle
BackHatchStyle
This property is not applicable to the polyline annotation type.
BackSecondaryColor
BackSecondaryColor
EndCap
EndCap
Gets or sets the style of an anchor cap at the end of the annotation line.
Font
Font
ForeColor
ForeColor
GraphicsPath
GraphicsPath
GraphicsPathPoints
GraphicsPathPoints
Gets or sets the path points of the polyline annotation at design time.
IsFreeDrawPlacement
IsFreeDrawPlacement
Gets or sets a flag that determines whether an annotation should be placed using the free-draw mode.
StartCap
StartCap
Gets or sets a style for the anchor cap at the start of the annotation line.
TextStyle
TextStyle
Methods
Dispose(Boolean)
Dispose(Boolean)
EndPlacement()
EndPlacement()
[System.ComponentModel.Browsable(false)]
public override System.Drawing.ContentAlignment Alignment { get; set; }
member this.Alignment : System.Drawing.ContentAlignment with get, set
Returns
ContentAlignment ContentAlignment
A ContentAlignment value.
Attributes BrowsableAttribute
PolylineAnnotation.AnnotationType PolylineAnnotation.
AnnotationType
I n this Article
Gets the annotation type.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
public override string AnnotationType { get; }
member this.AnnotationType : string
Returns
String String
The annotation type.
Attributes BindableAttribute BrowsableAttribute
Remarks
For internal use, should not be used.
PolylineAnnotation.BackColor PolylineAnnotation.Back
Color
I n this Article
This property is not applicable to the polyline annotation type.
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color BackColor { get; set; }
member this.BackColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value.
Attributes BrowsableAttribute TypeConverterAttribute
PolylineAnnotation.BackGradientStyle Polyline
Annotation.BackGradientStyle
I n this Article
This property is not applicable to the polyline annotation type.
[System.ComponentModel.Browsable(false)]
public override System.Windows.Forms.DataVisualization.Charting.GradientStyle BackGradientStyle {
get; set; }
member this.BackGradientStyle : System.Windows.Forms.DataVisualization.Charting.GradientStyle with
get, set
Returns
GradientStyle GradientStyle
A GradientStyle enumeration value.
Attributes BrowsableAttribute
Remarks
This property is not applicable to the polyline annotation type.
PolylineAnnotation.BackHatchStyle PolylineAnnotation.
BackHatchStyle
I n this Article
This property is not applicable to the polyline annotation type.
[System.ComponentModel.Browsable(false)]
public override System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle BackHatchStyle {
get; set; }
member this.BackHatchStyle : System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle with
get, set
Returns
ChartHatchStyle ChartHatchStyle
A ChartHatchStyle enumeration value.
Attributes BrowsableAttribute
Remarks
This property is not applicable to the polyline annotation type.
PolylineAnnotation.BackSecondaryColor Polyline
Annotation.BackSecondaryColor
I n this Article
This property is not applicable to the polyline annotation type.
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color BackSecondaryColor { get; set; }
member this.BackSecondaryColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value.
Attributes BrowsableAttribute TypeConverterAttribute
Remarks
This property is not applicable to the polyline annotation type.
PolylineAnnotation.Dispose PolylineAnnotation.Dispose
I n this Article
Releases unmanaged and, optionally, managed resources.
protected override void Dispose (bool disposing);
override this.Dispose : bool -> unit
Parameters
disposing Boolean Boolean
true to release both unmanaged and managed resources; false to release only unmanaged resources.
PolylineAnnotation.EndCap PolylineAnnotation.EndCap
I n this Article
Gets or sets the style of an anchor cap at the end of the annotation line.
public virtual System.Windows.Forms.DataVisualization.Charting.LineAnchorCapStyle EndCap { get; set;
}
member this.EndCap : System.Windows.Forms.DataVisualization.Charting.LineAnchorCapStyle with get,
set
Returns
LineAnchorCapStyle LineAnchorCapStyle
A LineAnchorCapStyle value that represents the style used for an anchor cap located at the end of an annotation line.
PolylineAnnotation.EndPlacement PolylineAnnotation.
EndPlacement
I n this Article
Ends the user placement of a polyline annotation.
Remarks
This method ends an annotation placement operation previously started by a BeginPlacement method call.
You are not required to call this method, because placement will automatically end when an end user enters all
required points. However, it is useful when an annotation placement operation needs to be aborted for some reason.
PolylineAnnotation.Font PolylineAnnotation.Font
I n this Article
This property is not applicable to the polyline annotation type.
[System.ComponentModel.Browsable(false)]
public override System.Drawing.Font Font { get; set; }
member this.Font : System.Drawing.Font with get, set
Returns
Font Font
A Font object.
Attributes BrowsableAttribute
Remarks
This property is not applicable to the polyline annotation type.
PolylineAnnotation.ForeColor PolylineAnnotation.Fore
Color
I n this Article
This property is not applicable to the polyline annotation type.
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color ForeColor { get; set; }
member this.ForeColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value.
Attributes BrowsableAttribute TypeConverterAttribute
Remarks
This property is not applicable to the polyline annotation type.
PolylineAnnotation.GraphicsPath PolylineAnnotation.
GraphicsPath
I n this Article
Gets or sets the path points of a polyline annotation at run time.
[System.ComponentModel.Browsable(false)]
public virtual System.Drawing.Drawing2D.GraphicsPath GraphicsPath { get; set; }
member this.GraphicsPath : System.Drawing.Drawing2D.GraphicsPath with get, set
Returns
GraphicsPath GraphicsPath
A GraphicsPath object with the polyline shape.
Attributes BrowsableAttribute
Remarks
A polyline must use coordinates relative to an annotation object, where (0,0) denotes the top-left coordinates and
(100,100) denotes the bottom-right coordinates of the annotation.
This property is not accessible at design time, when you should use the GraphicsPathPoints property instead.
PolylineAnnotation.GraphicsPathPoints Polyline
Annotation.GraphicsPathPoints
I n this Article
Gets or sets the path points of the polyline annotation at design time.
public System.Windows.Forms.DataVisualization.Charting.AnnotationPathPointCollection
GraphicsPathPoints { get; }
member this.GraphicsPathPoints :
System.Windows.Forms.DataVisualization.Charting.AnnotationPathPointCollection
Returns
AnnotationPathPointCollection AnnotationPathPointCollection
An AnnotationPathPointCollection object with the polyline shape.
Remarks
A polyline must use coordinates relative to an annotation object, where (0,0) denotes the top-left coordinates and
(100,100) denotes the bottom-right coordinates of the annotation.
This property is not accessible at run time, when you should use the GraphicsPath property instead.
PolylineAnnotation.IsFreeDrawPlacement Polyline
Annotation.IsFreeDrawPlacement
I n this Article
Gets or sets a flag that determines whether an annotation should be placed using the free-draw mode.
Returns
Boolean Boolean
true if an annotation should be placed using free-draw mode; otherwise, false . The default value is false .
Remarks
Two different placement modes are supported when the BeginPlacement method is called. Set the
IsFreeDrawPlacement property to true to switch from the default mode to free-draw mode, which allows the user to
free draw while moving the mouse cursor.
To allow the user to free draw the annotation, you must also set the AllowPathEditing property to true .
PolylineAnnotation
I n this Article
Initializes a new instance of the PolylineAnnotation class.
public PolylineAnnotation ();
PolylineAnnotation.StartCap PolylineAnnotation.Start
Cap
I n this Article
Gets or sets a style for the anchor cap at the start of the annotation line.
Returns
LineAnchorCapStyle LineAnchorCapStyle
A LineAnchorCapStyle value that represents the style for an anchor cap located at the start of an annotation line.
PolylineAnnotation.TextStyle PolylineAnnotation.TextStyle
I n this Article
Gets or sets the text style of an annotation.
[System.ComponentModel.Browsable(false)]
public override System.Windows.Forms.DataVisualization.Charting.TextStyle TextStyle { get; set; }
member this.TextStyle : System.Windows.Forms.DataVisualization.Charting.TextStyle with get, set
Returns
TextStyle TextStyle
A TextStyle value used to draw the text of an annotation.
Attributes BrowsableAttribute
PrintingManager PrintingManager Class
Represents the print manager for the chart.
D eclaration
public class PrintingManager : IDisposable
type PrintingManager = class
interface IDisposable
I nheritance H ierarchy
Object Object
Constructors
PrintingManager(IServiceContainer)
PrintingManager(IServiceContainer)
Properties
PrintDocument
PrintDocument
Methods
Dispose()
Dispose()
Dispose(Boolean)
Dispose(Boolean)
PageSetup()
PageSetup()
Print(Boolean)
Print(Boolean)
PrintPreview()
PrintPreview()
Overloads
Dispose() Dispose()
Frees, releases, or resets managed resources.
Dispose(Boolean) Dispose(Boolean)
Releases unmanaged and, optionally, managed resources
Dispose() Dispose()
Frees, releases, or resets managed resources.
public void Dispose ();
abstract member Dispose : unit -> unit
override this.Dispose : unit -> unit
Dispose(Boolean) Dispose(Boolean)
Releases unmanaged and, optionally, managed resources
protected virtual void Dispose (bool disposing);
abstract member Dispose : bool -> unit
override this.Dispose : bool -> unit
Parameters
disposing Boolean Boolean
true to release both unmanaged and managed resources; false to release only unmanaged resources.
PrintingManager.PageSetup PrintingManager.PageSetup
I n this Article
Displays a Page Setup dialog.
public void PageSetup ();
member this.PageSetup : unit -> unit
PrintingManager.Print PrintingManager.Print
I n this Article
Prints the chart.
public void Print (bool showPrintDialog);
member this.Print : bool -> unit
Parameters
showPrintDialog Boolean Boolean
true to indicate that a print dialog should be shown; otherwise, false .
PrintingManager.PrintDocument PrintingManager.Print
Document
I n this Article
Gets or sets a print document for the chart.
[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
public System.Drawing.Printing.PrintDocument PrintDocument { get; set; }
member this.PrintDocument : System.Drawing.Printing.PrintDocument with get, set
Returns
PrintDocument PrintDocument
A PrintDocument object for the chart.
Attributes BindableAttribute BrowsableAttribute
PrintingManager PrintingManager
I n this Article
Initializes a new instance of the PrintingManager class.
public PrintingManager (System.ComponentModel.Design.IServiceContainer container);
new System.Windows.Forms.DataVisualization.Charting.PrintingManager :
System.ComponentModel.Design.IServiceContainer ->
System.Windows.Forms.DataVisualization.Charting.PrintingManager
Parameters
container IServiceContainer IServiceContainer
An IServiceContainer reference.
PrintingManager.PrintPaint PrintingManager.PrintPaint
I n this Article
Draws the chart on the printer graphics.
public void PrintPaint (System.Drawing.Graphics graphics, System.Drawing.Rectangle position);
member this.PrintPaint : System.Drawing.Graphics * System.Drawing.Rectangle -> unit
Parameters
graphics Graphics Graphics
The printer Graphics object.
position Rectangle Rectangle
The position to draw on the graphics.
PrintingManager.PrintPreview PrintingManager.Print
Preview
I n this Article
Provides a preview of the chart.
D eclaration
public class RectangleAnnotation :
System.Windows.Forms.DataVisualization.Charting.TextAnnotation
type RectangleAnnotation = class
inherit TextAnnotation
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
Annotation Annotation
TextAnnotation TextAnnotation
Remarks
A rectangle annotation can display text inside the rectangle, in addition to being displayed as a rectangle only. So you
can annotate using a rectangle or a rectangle with text inside it.
Constructors
RectangleAnnotation()
RectangleAnnotation()
Properties
AnnotationType
AnnotationType
BackColor
BackColor
BackGradientStyle
BackGradientStyle
BackHatchStyle
BackHatchStyle
BackSecondaryColor
BackSecondaryColor
LineColor
LineColor
LineDashStyle
LineDashStyle
LineWidth
LineWidth
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
public override string AnnotationType { get; }
member this.AnnotationType : string
Returns
String String
The annotation type.
Attributes BindableAttribute BrowsableAttribute
Remarks
For internal use, should not be used.
RectangleAnnotation.BackColor RectangleAnnotation.
BackColor
I n this Article
Gets or sets the background color of the annotation.
[System.ComponentModel.Browsable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color BackColor { get; set; }
member this.BackColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the annotation background.
Attributes BrowsableAttribute TypeConverterAttribute
RectangleAnnotation.BackGradientStyle Rectangle
Annotation.BackGradientStyle
I n this Article
Gets or sets the gradient style of the annotation.
[System.ComponentModel.Browsable(true)]
public override System.Windows.Forms.DataVisualization.Charting.GradientStyle BackGradientStyle {
get; set; }
member this.BackGradientStyle : System.Windows.Forms.DataVisualization.Charting.GradientStyle with
get, set
Returns
GradientStyle GradientStyle
A GradientStyle value used to draw an annotation background.
Attributes BrowsableAttribute
Remarks
Two colors are used to draw the gradient, a primary color that is specified the BackColor and a secondary color that is
specified with the BackSecondaryColor.
RectangleAnnotation.BackHatchStyle Rectangle
Annotation.BackHatchStyle
I n this Article
Gets or sets the hatch style of an annotation background.
[System.ComponentModel.Browsable(true)]
public override System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle BackHatchStyle {
get; set; }
member this.BackHatchStyle : System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle with
get, set
Returns
ChartHatchStyle ChartHatchStyle
A ChartHatchStyle value used to draw the background.
Attributes BrowsableAttribute
Remarks
Two colors are used to draw the hatching, a primary color that is specified the BackColor property, and a secondary
color that is specified with the BackColor property.
RectangleAnnotation.BackSecondaryColor Rectangle
Annotation.BackSecondaryColor
I n this Article
Gets or sets the secondary color for an annotation background.
[System.ComponentModel.Browsable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color BackSecondaryColor { get; set; }
member this.BackSecondaryColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the annotation background with hatching or gradient fill.
Attributes BrowsableAttribute TypeConverterAttribute
Remarks
This color is used with BackColor when the BackHatchStyle or BackGradientStyle property is used.
RectangleAnnotation.LineColor RectangleAnnotation.
LineColor
I n this Article
Gets or sets the line color of an annotation.
[System.ComponentModel.Browsable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color LineColor { get; set; }
member this.LineColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used to draw the annotation line.
Attributes BrowsableAttribute TypeConverterAttribute
RectangleAnnotation.LineDashStyle Rectangle
Annotation.LineDashStyle
I n this Article
Gets or sets the line style of an annotation.
[System.ComponentModel.Browsable(true)]
public override System.Windows.Forms.DataVisualization.Charting.ChartDashStyle LineDashStyle { get;
set; }
member this.LineDashStyle : System.Windows.Forms.DataVisualization.Charting.ChartDashStyle with get,
set
Returns
ChartDashStyle ChartDashStyle
A ChartDashStyle value used to draw the line style of an annotation.
Attributes BrowsableAttribute
RectangleAnnotation.LineWidth RectangleAnnotation.
LineWidth
I n this Article
Gets or sets the line width, in pixels, of an annotation.
[System.ComponentModel.Browsable(true)]
public override int LineWidth { get; set; }
member this.LineWidth : int with get, set
Returns
Int32 Int32
An integer value that represents the line width, in pixels.
Attributes BrowsableAttribute
RectangleAnnotation
I n this Article
Initializes a new instance of the AnnotationPathPoint class.
public RectangleAnnotation ();
ScrollBarButtonStyles ScrollBarButtonStyles Enum
Specifies the type of button that will be displayed on the scrollbar.
D eclaration
[System.Flags]
public enum ScrollBarButtonStyles
type ScrollBarButtonStyles =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The ScrollBarButtonStyles enumeration is used with the ButtonStyle property to specify the buttons to be displayed for
a scrollbar.
Fields
All All All buttons are displayed.
ResetZoom ResetZoom The reset and zoom (thumb) buttons are displayed.
SmallScroll SmallScroll The up/down and left/right buttons only are displayed.
ScrollBarButtonType ScrollBarButtonType Enum
Specifies the button clicked by a user in the AxisScrollBarClicked event.
D eclaration
public enum ScrollBarButtonType
type ScrollBarButtonType =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The ScrollBarButtonType enumeration is used with the ButtonType property, and allows the developer to determine
what type of scrollbar button the end-user clicked on.
Fields
LargeDecrement The scroll view was decreased by a large decrement, by clicking the area beneath a scrolling thumb for a
LargeDecrement vertical scrollbar, or to the left of a scrolling thumb for a horizontal scrollbar.
LargeIncrement The scroll view was increased by a large increment, by clicking the area above a scrolling thumb for a
LargeIncrement vertical scrollbar, or to the right of a scrolling thumb for a horizontal scrollbar.
SmallDecrement A down or left arrow button was clicked to decrease the scroll view by a small decrement.
SmallDecrement
SmallIncrement An up or right arrow button was clicked to increase the scroll view by a small increment.
SmallIncrement
ThumbTracker The tracker button (also known as the scrollbar thumb) was clicked.
ThumbTracker
D eclaration
public class ScrollBarEventArgs : EventArgs
type ScrollBarEventArgs = class
inherit EventArgs
I nheritance H ierarchy
Object Object
EventArgs EventArgs
Remarks
The ScrollBarEventArgs class is exposed as the e parameter in the AxisScrollBarClicked event.
The ScrollBarEventArgs class contains the following properties:
The ChartArea property, which is used to get the ChartArea object that the event was raised for. The Name property
gets the name of the chart area; other chart area properties can also be set.
The Axis property, which is used to get the Axis object that the scrollbar belongs to, using the AxisName property.
Other Axis properties can also be set.
The ButtonType property, which is used to get the scrollbar button that the end-user clicked.
The IsHandled property, which determines if the Chart control cancels default behavior of the scrollbar button after the
code in the AxisScrollBarClicked event completes execution.
The MousePositionX property, which represents the X position of the mouse cursor at the time the end-user clicked the
scrollbar element.
The MousePositionY property, which represents the Y -position of the mouse cursor at the time the end-user clicked
the scrollbar element.
Constructors
ScrollBarEventArgs(Axis, Int32, Int32, ScrollBarButtonType)
ScrollBarEventArgs(Axis, Int32, Int32, ScrollBarButtonType)
Initializes a new instance of the ScrollBarEventArgs class with the specified axis, X and Y positions of the mouse
cursor, and type of button clicked.
Properties
Axis
Axis
ChartArea
ChartArea
IsHandled
IsHandled
Gets or sets a flag that indicates whether to cancel the default behavior of specific scrollbar events.
MousePositionX
MousePositionX
Gets the X position of the mouse cursor at the time the AxisScrollBarClicked event was raised.
MousePositionY
MousePositionY
Gets the Y position of the mouse cursor at the time the AxisScrollBarClicked event was raised.
ScrollBarEventArgs.Axis ScrollBarEventArgs.Axis
I n this Article
Gets the Axis object that a scrollbar belongs to.
public System.Windows.Forms.DataVisualization.Charting.Axis Axis { get; }
member this.Axis : System.Windows.Forms.DataVisualization.Charting.Axis
Returns
Axis Axis
An Axis object that represents the axis that the scrollbar belongs to.
Remarks
This property is exposed in the AxisScrollBarClicked event of the root Chart object.
This property can be used to:
determine the type of axis - X, X2, Y or Y2 - that the event is being raised for, using the AxisName property.
get and set axis properties, such as LineColor.
ScrollBarEventArgs.ButtonType ScrollBarEventArgs.
ButtonType
I n this Article
Gets the type of scrollbar button that the end-user clicked.
Returns
ScrollBarButtonType ScrollBarButtonType
A ScrollBarButtonType enumeration value that represents the type of scrollbar button the end-user clicked.
Remarks
This property is exposed in the AxisScrollBarClicked event of the root Chart object, and can be used to determine the
type of scrollbar button the end-user clicked.
ScrollBarEventArgs.ChartArea ScrollBarEventArgs.Chart
Area
I n this Article
Gets the ChartArea object that the scrollbar belongs to.
Returns
ChartArea ChartArea
A ChartArea object.
Remarks
This property is exposed in the AxisScrollBarClicked event of the root Chart object.
The ChartArea property can be used to determine the chart area that the scrollbar belongs to by accessing the Name
property. This property can also be used to get and set chart area properties.
ScrollBarEventArgs.IsHandled ScrollBarEventArgs.Is
Handled
I n this Article
Gets or sets a flag that indicates whether to cancel the default behavior of specific scrollbar events.
Returns
Boolean Boolean
true if the default behavior of the event should be cancelled, otherwise false .
Remarks
This property is exposed in the AxisScrollBarClicked event of the root Chart object.
This property can be used to cancel the default behavior on specific scrollbar events.
If you click on a scrollbar button, the default manipulation of the view will occur.
The following list summarizes this default behavior:
If the user clicks the Reset/Zoom button, the previous view will be displayed.
If the user clicks in the scrollbar background - that is, not on the scrolling thumb, otherwise known as the tracker -
large increments and/or decrements of the scrollbar will occur, with the increment and/or decrement size being
determined by the Size property.
To turn off these default behaviors, set the IsHandled property to true after providing custom logic in the
AxisScrollBarClicked event.
ScrollBarEventArgs.MousePositionX ScrollBarEventArgs.
MousePositionX
I n this Article
Gets the X position of the mouse cursor at the time the AxisScrollBarClicked event was raised.
Returns
Int32 Int32
An integer value that represents the X mouse cursor position. The position is expressed in pixels, with 0,0 being the
top-left corner of the chart image.
Remarks
This property is used to get the X mouse position, in pixels, when the end-user clicks on a scrollbar element. The 0,0
coordinate represents the top-left corner of the chart.
ScrollBarEventArgs.MousePositionY ScrollBarEventArgs.
MousePositionY
I n this Article
Gets the Y position of the mouse cursor at the time the AxisScrollBarClicked event was raised.
Returns
Int32 Int32
An integer value that represents the Y mouse cursor position. The position is expressed in pixels, with 0,0 being the
top-left corner of the chart image.
Remarks
This property is used to get the Y mouse position, in pixels, when the end-user clicks on a scrollbar element. The 0,0
coordinate represents the top-left corner of the chart.
ScrollBarEventArgs ScrollBarEventArgs
I n this Article
Initializes a new instance of the ScrollBarEventArgs class with the specified axis, X and Y positions of the mouse cursor,
and type of button clicked.
Parameters
axis Axis Axis
The Axis that contains the scrollbar.
x Int32 Int32
The X position of mouse cursor.
y Int32 Int32
The Y position of mouse cursor.
buttonType ScrollBarButtonType ScrollBarButtonType
The type of button clicked.
ScrollType ScrollType Enum
Specifies the scrolling that will occur when the one of the Scroll methods in the AxisScaleView class is called.
D eclaration
public enum ScrollType
type ScrollType =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The ScrollType enumeration is used with one of the Scroll methods to specify the direction and amount of scrolling.
Fields
First First Data is scrolled to the first displayed view.
LargeDecrement LargeDecrement The data view is decreased by one large scrolling interval.
LargeIncrement LargeIncrement The data view is increased by one large scrolling interval.
SmallDecrement SmallDecrement The data view is decreased by one small scrolling interval.
SmallIncrement SmallIncrement The data view is increased by one small scrolling interval.
SerializationContents SerializationContents Enum
Specifies the type of chart content to be serialized.
D eclaration
[System.Flags]
public enum SerializationContents
type SerializationContents =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The SerializationContents enumeration represents the chart content type to be serialized. This enumeration is used
with the Content property.
Fields
All All Serialize all chart information. This includes all appearance properties and data point values.
Appearance Serialize all appearance properties, such as color or line style, if they have non-default values.
Appearance
Data Data Serialize data values from all chart series. Does not include appearance properties.
Default Serialize all non-default chart content. This includes appearance properties, series and their data points,
Default axis minimums/maximums, and so forth.
SerializationFormat SerializationFormat Enum
Represents the formatting type to use when the chart is serialized.
D eclaration
public enum SerializationFormat
type SerializationFormat =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The SerializationFormat enumeration is used in conjunction with the Format property.
Fields
Binary Binary Chart data will be serialized in a binary format.
D eclaration
public class Series : System.Windows.Forms.DataVisualization.Charting.DataPointCustomProperties
type Series = class
inherit DataPointCustomProperties
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
DataPointCustomProperties DataPointCustomProperties
Remarks
A Series object represents a data series and is stored in the SeriesCollection class.
A Series stores DataPoint objects using the DataPointCollection class. It also stores attributes of the data series. For
example, a data series has a color attribute, background image attribute, background gradient attribute, and so forth.
The DataPoint objects that belong to a series also have their own attributes. Normally, if the same attribute is set for a
data point and the series to which it belongs, the data point attribute has precedence.
A series is not necessarily plotted on a chart; it can store data point values that are used to perform a calculation from
which another series is created and then plotted. For example, Series A, which is plotted, may be the result of adding
Series B and Series C data points together, though neither of these series is plotted. In order to draw a Series object,
the ChartArea property must be set to the name of the ChartArea object used to plot the series.
When a series is created, it is automatically assigned to the ChartArea object named "Default", or to the first available
chart area in the chart area collection if the "Default" object does not exist.
To disable the display of a series, set its ChartArea property to a zero-length string.
The ChartType property determines the type of chart that will be used to plot this series, if it is drawn.
Constructors
Series()
Series()
Series(String)
Series(String)
Initializes a new instance of the Series class with the specified series name.
Series(String, Int32)
Series(String, Int32)
Initializes a new instance of the Series class with the specified name and maximum number of Y -values.
Properties
AxisLabel
AxisLabel
ChartArea
ChartArea
Gets or sets the name of the ChartArea object used to plot the data series, if any.
ChartType
ChartType
ChartTypeName
ChartTypeName
Gets or sets the name of the chart type used to draw the series.
EmptyPointStyle
EmptyPointStyle
Enabled
Enabled
Gets or sets a flag that indicates whether the series will be visible on the rendered chart.
IsXValueIndexed
IsXValueIndexed
Gets or sets a flag that indicates whether data point indices will be used for the X-values.
Legend
Legend
Gets or sets the name of the series associated with the Legend object.
MarkerStep
MarkerStep
Gets or sets a value that determines how often to display data point markers.
Name
Name
Palette
Palette
Points
Points
ShadowColor
ShadowColor
ShadowOffset
ShadowOffset
SmartLabelStyle
SmartLabelStyle
XAxisType
XAxisType
XValueMember
XValueMember
Gets or sets the member of the chart data source used to data bind to the X-value of the series.
XValueType
XValueType
YAxisType
YAxisType
YValueMembers
YValueMembers
Gets or sets member columns of the chart data source used to bind data to the Y -values of the series.
YValuesPerPoint
YValuesPerPoint
Gets or sets the maximum number of Y -values that DataPoint objects in a Series are allowed to have.
YValueType
YValueType
Gets or sets the type of Y -value data in the data points stored by a series.
Methods
Dispose(Boolean)
Dispose(Boolean)
Releases the unmanaged resources used by the Series and optionally releases the managed resources.
Sort(IComparer<DataPoint>)
Sort(IComparer<DataPoint>)
Sort(PointSortOrder)
Sort(PointSortOrder)
Sorts the data points in the series, given the specified sort order.
Sort(PointSortOrder, String)
Sort(PointSortOrder, String)
Sorts the points in the series, given the specified sort order and value to use for the sort.
Series.AxisLabel Series.AxisLabel
I n this Article
Gets or sets the axis label text for the series.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
public override string AxisLabel { get; set; }
member this.AxisLabel : string with get, set
Returns
String String
The axis label text for the series. The default value is a zero-length string.
Attributes BindableAttribute BrowsableAttribute
Series.ChartArea Series.ChartArea
I n this Article
Gets or sets the name of the ChartArea object used to plot the data series, if any.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.SeriesAr
eaNameConverter))]
public string ChartArea { get; set; }
member this.ChartArea : string with get, set
Returns
String String
A ChartArea object, which is used to plot the series.
Attributes BindableAttribute TypeConverterAttribute
Remarks
When a series is added at both design time and run time, it is automatically assigned to the "Default" ChartArea object,
or the first available chart area in the ChartAreaCollection if "Default" does not exist.
Set this property to a zero-length string if you do not want the series to be plotted.
Series.ChartType Series.ChartType
I n this Article
Gets or sets the chart type of a series.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.SeriesChartType ChartType { get; set; }
member this.ChartType : System.Windows.Forms.DataVisualization.Charting.SeriesChartType with get,
set
Returns
SeriesChartType SeriesChartType
A SeriesChartType enumeration value that indicates the chart type that will be used to represent the series. The default
value is Column.
Attributes BindableAttribute
Remarks
This property determines the chart type of the Series object; the value is case-sensitive. See the SeriesChartType
enumeration for a list of all possible chart types for a series.
Series.ChartTypeName Series.ChartTypeName
I n this Article
Gets or sets the name of the chart type used to draw the series.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.ChartTyp
eConverter))]
public string ChartTypeName { get; set; }
member this.ChartTypeName : string with get, set
Returns
String String
The name of the chart type.
Attributes BindableAttribute BrowsableAttribute TypeConverterAttribute
Series.Dispose Series.Dispose
I n this Article
Releases the unmanaged resources used by the Series and optionally releases the managed resources.
protected override void Dispose (bool disposing);
override this.Dispose : bool -> unit
Parameters
disposing Boolean Boolean
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Series.EmptyPointStyle Series.EmptyPointStyle
I n this Article
Gets or sets the drawing style of points marked as empty.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.DataPointCustomProperties EmptyPointStyle {
get; set; }
member this.EmptyPointStyle :
System.Windows.Forms.DataVisualization.Charting.DataPointCustomProperties with get, set
Returns
DataPointCustomProperties DataPointCustomProperties
The drawing style of points marked as empty.
Attributes BindableAttribute
Remarks
The EmptyPointStyle property determines the drawing style of points marked as empty, for example, in the border
color, in the marker images, background color or images, and so forth.
Certain properties are only applicable for specific chart types. For example, the BackImage property does not apply to
line charts but does apply to an area chart.
To display an image that indicates an empty point, use the MarkerImage and MarkerStyle properties, and not the
BackImage property.
The AxisLabel property determines the axis label for empty points. Note that for stacked chart types, the axis label is
determined by the AxisLabel property of the first plotted series that has this property set.
Data points can be manually marked as an empty by setting the IsEmpty property to true . Alternatively, one of the
InsertEmptyPoints methods in the DataManipulator class can be used to check for missing data and insert empty
points if a data point is missing.
Note
In the case of line-type charts, the line color for lines that connect to an empty point is determined by the Color
property setting.
Series.Enabled Series.Enabled
I n this Article
Gets or sets a flag that indicates whether the series will be visible on the rendered chart.
[System.ComponentModel.Bindable(true)]
public bool Enabled { get; set; }
member this.Enabled : bool with get, set
Returns
Boolean Boolean
true if the series will be visible on the rendered chart; otherwise, false . The default value is true .
Attributes BindableAttribute
Remarks
Gets or sets a value that determines if the series will be visible on the rendered ChartArea.
Series.IsXValueIndexed Series.IsXValueIndexed
I n this Article
Gets or sets a flag that indicates whether data point indices will be used for the X-values.
[System.ComponentModel.Bindable(true)]
public bool IsXValueIndexed { get; set; }
member this.IsXValueIndexed : bool with get, set
Returns
Boolean Boolean
true if the indices of data points that belong to the series will be used for X-values; otherwise, false . The default
value is false .
Attributes BindableAttribute
Remarks
All data points in a series use sequential indices, and if this property is true then data points will be plotted
sequentially, regardless of their associated X-values. This means that there will be no "missing" data points.
For example, assume there are three (3) data points in a series having X-values of 1, 2 and 4. If this property was
false , there would be a data point missing at the X-axis location labeled "3". However, if you set this property to true
, the three data points will be plotted at points 1, 2, and 4, sequentially, and there will be no missing data point. The X-
axis location labeled "3" will not appear on the chart.
This is useful when you do not want to have missing data points for intervals that you know you will not have data for,
such as weekends.
Im p o rt a nt
If you are displaying multiple series and at least one series uses indexed X-values, then all series must be aligned - that
is, have the same number of data points - and the corresponding points must have the same X-values.
Series.Legend Series.Legend
I n this Article
Gets or sets the name of the series associated with the Legend object.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.SeriesLe
gendNameConverter))]
public string Legend { get; set; }
member this.Legend : string with get, set
Returns
String String
The name of a Legend object.
Attributes BindableAttribute TypeConverterAttribute
Remarks
When a series is added at both design time and run time, it is automatically assigned to the default Legend object.
If you do not want the series shown in a legend, set this property to a zero-length string, or set the IsVisibleInLegend
property to false .
Series.MarkerStep Series.MarkerStep
I n this Article
Gets or sets a value that determines how often to display data point markers.
[System.ComponentModel.Bindable(true)]
public int MarkerStep { get; set; }
member this.MarkerStep : int with get, set
Returns
Int32 Int32
An integer value that determines how often to display data point markers. The default value is one (1).
Attributes BindableAttribute
Remarks
The MarkerStep property specifies the frequency with which markers are displayed. For example, if you set this
property to two (2), every other data point will use a marker.
This property is only used if markers are enabled using the MarkerStyle property.
Series.Name Series.Name
I n this Article
Gets or sets the unique name of a Series object.
[System.ComponentModel.Bindable(true)]
public override string Name { get; set; }
member this.Name : string with get, set
Returns
String String
The unique name of the data series.
Attributes BindableAttribute
Remarks
The name of a data series must be unique; otherwise, an exception will be thrown.
This property can be used as the indexer when you retrieve a Series object from the SeriesCollection object.
If this property is set to a zero-length string, an exception will be thrown.
Series.Palette Series.Palette
I n this Article
Gets or sets the color palette of a Series object.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartColorPalette Palette { get; set; }
member this.Palette : System.Windows.Forms.DataVisualization.Charting.ChartColorPalette with get,
set
Returns
ChartColorPalette ChartColorPalette
An ChartColorPalette enumeration value that determines the palette for the data series.
Attributes BindableAttribute
Remarks
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:
CO LO R S D IS PL AYED B Y D ATA
CHAR T T YPE S ER IES PALE T TE U S ED ? PO INTS
Any shape chart (for example, Pie and No First available colors used from Chart
Doughnut charts) control palette. One color per data
point.
All charts except shape charts. No First available colors from Chart control
palette. One color per data series.
Any shape chart (for example, Pie and Yes First available colors used from Series
Doughnut charts) palette. One color per data point.
All charts except shape charts. Yes First available colors used from Series
palette. One color per data series.
This Palette property has precedence over the Palette property of the root Chart object, with respect to the display of
data.
NOTE: 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.
Series.Points Series.Points
I n this Article
Gets a collection of data points.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.DataPointCollection Points { get; }
member this.Points : System.Windows.Forms.DataVisualization.Charting.DataPointCollection
Returns
DataPointCollection DataPointCollection
A collection of data points.
Attributes BindableAttribute
Remarks
The Points collection property allows you to add and remove data points to a series. This property also provides
methods and properties that can be used to manipulate this collection, such as finding data points, performing data-
binding, and so forth.
Series Series
I n this Article
Overloads
Series()
Initializes a new instance of the Series class.
Series(String) Series(String)
Initializes a new instance of the Series class with the specified
series name.
Series()
Initializes a new instance of the Series class.
public Series ();
Series(String) Series(String)
Initializes a new instance of the Series class with the specified series name.
public Series (string name);
new System.Windows.Forms.DataVisualization.Charting.Series : string ->
System.Windows.Forms.DataVisualization.Charting.Series
Parameters
name String String
The name of the Series object that will be created. This must be a unique name; otherwise, an exception will be thrown.
Remarks
This constructor can be used to create a new instance of the Series class.
Note
This series is only capable of storing DataPoint objects that have one Y -value. If a data point that has multiple Y -values
is added to this series, an exception will be thrown.
To create a series at run time, use the Add method.
This series will only be able to store DataPoint objects that do not have more Y -values than the maximum set by the
yValues parameter. If you add a data point that has more Y -values than the set maximum, an exception will be thrown.
To create a Series object at runtime, the Add and Insert methods of the Series collection property can also be used.
Series.ShadowColor Series.ShadowColor
I n this Article
Gets or sets the shadow color of a series.
[System.ComponentModel.Bindable(true)]
public System.Drawing.Color ShadowColor { get; set; }
member this.ShadowColor : System.Drawing.Color with get, set
Returns
Color Color
The shadow color of a series. The default color is Black.
Attributes BindableAttribute
Remarks
Gets or sets the shadow color of a series, which can be to any valid ARGB (alpha, red, green, blue) value.
The alpha value can be used to achieve a realistic shadow effect; try using a color value of "128,0,0,0" for shadows.
To implement a shadow, set the ShadowOffset property to a value other than zero (0).
Series.ShadowOffset Series.ShadowOffset
I n this Article
Gets or sets the shadow offset, in pixels, of a series.
[System.ComponentModel.Bindable(true)]
public int ShadowOffset { get; set; }
member this.ShadowOffset : int with get, set
Returns
Int32 Int32
The shadow offset of the series, in pixels.
Attributes BindableAttribute
Remarks
To implement shadowing, use a value other than zero (0). A positive value will result in a shadow that shifts down and
to the right. A negative value will result in a shadow that shifts up and to the left.
Series.SmartLabelStyle Series.SmartLabelStyle
I n this Article
Gets or sets the style of the smart labels.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(true)]
public System.Windows.Forms.DataVisualization.Charting.SmartLabelStyle SmartLabelStyle { get; set; }
member this.SmartLabelStyle : System.Windows.Forms.DataVisualization.Charting.SmartLabelStyle with
get, set
Returns
SmartLabelStyle SmartLabelStyle
The style of the smart labels.
Attributes BindableAttribute BrowsableAttribute
Series.Sort Series.Sort
I n this Article
Overloads
Sort(IComparer<DataPoint>) Sort(IComparer<DataPoint>)
Sorts the points in the series using IComparer interface.
Sort(PointSortOrder) Sort(PointSortOrder)
Sorts the data points in the series, given the specified sort
order.
Sort(IComparer<DataPoint>) Sort(IComparer<DataPoint>)
Sorts the points in the series using IComparer interface.
public void Sort
(System.Collections.Generic.IComparer<System.Windows.Forms.DataVisualization.Charting.DataPoint>
comparer);
member this.Sort :
System.Collections.Generic.IComparer<System.Windows.Forms.DataVisualization.Charting.DataPoint> ->
unit
Parameters
comparer IComparer<DataPoint>
The IComparer interface.
Sort(PointSortOrder) Sort(PointSortOrder)
Sorts the data points in the series, given the specified sort order.
public void Sort (System.Windows.Forms.DataVisualization.Charting.PointSortOrder pointSortOrder);
member this.Sort : System.Windows.Forms.DataVisualization.Charting.PointSortOrder -> unit
Parameters
pointSortOrder PointSortOrder PointSortOrder
The sort order.
Returns
AxisType AxisType
A AxisType enumeration value that determines if the series uses the primary or secondary X-axis.
Attributes BindableAttribute
Remarks
For all chart types except horizontally oriented charts such as bar and stacked bar charts, and shape charts such as pie,
doughnut, funnel and pyramid charts, the primary X-axis is always the lower axis and the secondary axis is the upper
axis. For bar and stacked bar charts, the primary X-axis is the left axis, and the secondary X-axis is the right axis.
When data is plotted using the secondary X-axis, you must use the AxisX2 property to set axis properties, and not the
AxisX property.
Series.XValueMember Series.XValueMember
I n this Article
Gets or sets the member of the chart data source used to data bind to the X-value of the series.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.SeriesDa
taSourceMemberConverter))]
public string XValueMember { get; set; }
member this.XValueMember : string with get, set
Returns
String String
The member of the chart data source used to data bind to the X-value of the series.
Attributes BindableAttribute TypeConverterAttribute
Remarks
This property accepts either the name of the member column or the ordinal value of the member column.
Series.XValueType Series.XValueType
I n this Article
Gets or sets the value types plotted along the X-axis.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartValueType XValueType { get; set; }
member this.XValueType : System.Windows.Forms.DataVisualization.Charting.ChartValueType with get,
set
Returns
ChartValueType ChartValueType
A ChartValueType enumeration value that determines the type of X-value data stored by the series. The default value is
Auto.
Attributes BindableAttribute
Remarks
The XValueType property determines the type of data stored by the series.
Set this property to DateTime to allow the X-value to be entered as a DateTime value, and not as a Double. Date and
time values are internally stored by .NET Framework as Double values. The same holds true for the ToPosition and
FromPosition properties of CustomLabel objects.
The IntervalType property found in axis label, tick mark, and grid classes determines the interval type.
Note
To correctly apply a DateTime format to axis labels that are generated from data point X-values, using the Format
property, this property must be set to DateTime.
This property can also be used to determine the data type to which the X-values are bound.
Series.YAxisType Series.YAxisType
I n this Article
Gets or sets the Y -axis type of a series.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.AxisType YAxisType { get; set; }
member this.YAxisType : System.Windows.Forms.DataVisualization.Charting.AxisType with get, set
Returns
AxisType AxisType
An AxisType enumeration value that determines if a series uses the primary or secondary Y -axis.
Attributes BindableAttribute
Remarks
The YAxisType property determines if a series is plotted using the primary or secondary Y -axis.
For all chart types except pie, doughnut, range bar, bar and stacked bar charts, the primary Y -axis is the left vertical
axis, and the secondary axis is the right vertical axis. For bar and stacked bar charts, the primary axis is the lower
horizontal axis, and the secondary Y -axis is the upper horizontal axis.
When data is plotted using the secondary Y -axis, you must use the AxisY2 property to set axis properties, and not the
AxisY property.
Series.YValueMembers Series.YValueMembers
I n this Article
Gets or sets member columns of the chart data source used to bind data to the Y -values of the series.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.SeriesDa
taSourceMemberConverter))]
public string YValueMembers { get; set; }
member this.YValueMembers : string with get, set
Returns
String String
The member columns of the chart data source used to bind data to the Y -values of the series.
Attributes BindableAttribute TypeConverterAttribute
Remarks
This property accepts a comma separated string that contains the names or ordinal values of the columns.
Series.YValuesPerPoint Series.YValuesPerPoint
I n this Article
Gets or sets the maximum number of Y -values that DataPoint objects in a Series are allowed to have.
[System.ComponentModel.Bindable(true)]
public int YValuesPerPoint { get; set; }
member this.YValuesPerPoint : int with get, set
Returns
Int32 Int32
The maximum number of Y -values that the data points in a series are allowed to have. The default value is one (1).
Attributes BindableAttribute
Remarks
If you add a DataPoint object that has more Y -values than this property specifies, the excess Y -values will be ignored.
The number of Y -values that are required to properly display a chart depends on the chart type selected.
Series.YValueType Series.YValueType
I n this Article
Gets or sets the type of Y -value data in the data points stored by a series.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.SeriesYV
alueTypeConverter))]
public System.Windows.Forms.DataVisualization.Charting.ChartValueType YValueType { get; set; }
member this.YValueType : System.Windows.Forms.DataVisualization.Charting.ChartValueType with get,
set
Returns
ChartValueType ChartValueType
A ChartValueType enumeration value that determines the type of Y -value data stored by the series. The default value is
Auto.
Attributes BindableAttribute TypeConverterAttribute
Remarks
The YValueType property determines the type of data stored by the series. The value of this property is normally set to
either Auto or DateTime.
The IntervalType property found in axis label, tick mark, and grid classes determines the interval type.
This property can also be used to determine the data type to which the Y -values are bound.
It is possible to plot date expressions as the values of data points, though this is rarely done. If you set this property to
DateTime, the Y -value can then entered as a DateTime value, and not as a Double. Date and time values are internally
stored by .NET Framework as Double values.
SeriesChartType SeriesChartType Enum
Specifies a chart type for a Series.
D eclaration
public enum SeriesChartType
type SeriesChartType =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Fields
Area Area Area chart type.
D eclaration
public class SeriesCollection :
System.Windows.Forms.DataVisualization.Charting.ChartNamedElementCollection<System.Windows.Forms
.DataVisualization.Charting.Series>
type SeriesCollection = class
inherit ChartNamedElementCollection<Series>
I nheritance H ierarchy
Object Object
Collection<T> Collection<T>
ChartElementCollection<T> ChartElementCollection<T>
ChartNamedElementCollection<T> ChartNamedElementCollection<T>
Remarks
The SeriesCollection class represents a collection of Series objects, which in turn represent a grouping of related data
points and attributes for the series. This collection class is implemented as the Series collection property of the root
Chart object.
Series objects can be appended, inserted or removed from the collection at both design time and run time.
When a series is added to the collection, it is automatically assigned to the ChartArea object named "Default" or, if
"Default" does not exist, to the first available chart area in the chart area collection.
Methods
Add(String)
Add(String)
Parameters
name String String
The name of the Series to be added.
Returns
Series Series
The new Series object appended to the collection.
Remarks
Items are always added as the last item in the collection.
The name argument refers to the Name property of the object being added.
Note If you use this method to add Series objects to the SeriesCollection class, the associated DataPoint objects of the
newly added Series object cannot have more than one Y -value per data point.
SmartLabelStyle SmartLabelStyle Class
Provides methods and properties used to perform intelligent, rule-based data point label positioning to resolve
overlapping data point label issues.
D eclaration
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.NoNa
meExpandableObjectConverter))]
public class SmartLabelStyle
type SmartLabelStyle = class
I nheritance H ierarchy
Object Object
Remarks
When smart labels are enabled, the chart repositions overlapping data point labels, based on a set of user-defined
rules.
Callout lines will be drawn to link the label with its data point. The visual attributes of the callout line can be controlled.
These visual attributes include color, line style, and line width. The CalloutStyle and CalloutLineAnchorCapStyle
properties control the embellishments, such as arrowheads, that appear at the end of the callout line.
The CalloutLineColor property can be set to any Color object. If you set the color of the callout line, you will also
automatically set the color of the CalloutLineAnchorCapStyle and the embellishment defined by the CalloutStyle.
The CalloutLineWidth property controls the pixel width of the callout line. Use of this property will also scale the
embellishments of the CalloutLineAnchorCapStyle and the CalloutStyle.
The movement of smart labels can be controlled through the use of several motion-related properties. These define
the rules of movement for the direction, distance and whether the data point label is allowed to leave the plotting area.
The default movement rules will normally resolve most issues. The MaxMovingDistance defines a value that specifies
the maximum distance in pixels from the data point that data point labels are allowed to be moved in case of
overlapping. The MinMovingDistance property defines a value that specifies the minimum distance in pixels from the
data point that data point labels will be moved in case of overlapping. When a data point label needs to be
repositioned, the label will be moved by at least the number of pixels specified.
The IsOverlappedHidden property indicates whether the labels are hidden when overlapping issues cannot be
resolved. If the IsOverlappedHidden property is true , and the data point cannot be drawn within the area specified by
MinMovingDistance and MaxMovingDistance in the directions allowed by MovingDirection, the data point label will
not be drawn.
The MovingDirection property defines the direction(s) in which the data point label can be moved. This property
accepts one LabelAlignmentStyles value or a bitwise-OR of multiple LabelAlignmentStyles values. The default is the
bitwise-OR of all LabelAlignmentStyles values, to allow repositioning in all possible directions except to the center of
the data point.
Smart labels are not supported for the following chart types:
Bar charts: bar and hundred-percent-stacked bar charts.
Shape charts: pie, doughnut, polar and radar charts.
Range charts: range, range column and range bar charts.
Stacked area charts: stacked area and hundred-percent-stacked area charts.
Constructors
SmartLabelStyle()
SmartLabelStyle()
Properties
AllowOutsidePlotArea
AllowOutsidePlotArea
Gets or sets a flag that specifies whether a SmartLabelStyle object can be drawn outside the plotting area.
CalloutBackColor
CalloutBackColor
CalloutLineAnchorCapStyle
CalloutLineAnchorCapStyle
Gets or sets the anchor cap style of the label callout line.
CalloutLineColor
CalloutLineColor
CalloutLineDashStyle
CalloutLineDashStyle
CalloutLineWidth
CalloutLineWidth
CalloutStyle
CalloutStyle
IsMarkerOverlappingAllowed
IsMarkerOverlappingAllowed
Gets or sets a flag that specifies whether the point labels are allowed to overlap a point marker.
IsOverlappedHidden
IsOverlappedHidden
Gets or sets a flag that indicates whether overlapped labels that cannot be repositioned will be hidden.
MaxMovingDistance
MaxMovingDistance
Gets or sets the maximum distance, in pixels, that the overlapped SmartLabelStyle object can be moved from the
marker.
MinMovingDistance
MinMovingDistance
Gets or sets the minimum distance, in pixels, that the overlapped SmartLabelStyle object can be moved from the
marker.
MovingDirection
MovingDirection
Gets or sets the direction(s) in which the overlapped SmartLabelStyle object is allowed to be moved.
SmartLabelStyle.AllowOutsidePlotArea SmartLabelStyle.
AllowOutsidePlotArea
I n this Article
Gets or sets a flag that specifies whether a SmartLabelStyle object can be drawn outside the plotting area.
[System.ComponentModel.Bindable(true)]
public virtual System.Windows.Forms.DataVisualization.Charting.LabelOutsidePlotAreaStyle
AllowOutsidePlotArea { get; set; }
member this.AllowOutsidePlotArea :
System.Windows.Forms.DataVisualization.Charting.LabelOutsidePlotAreaStyle with get, set
Returns
LabelOutsidePlotAreaStyle LabelOutsidePlotAreaStyle
A LabelOutsidePlotAreaStyle enumeration value.
Attributes BindableAttribute
SmartLabelStyle.CalloutBackColor SmartLabelStyle.
CalloutBackColor
I n this Article
Gets or sets the background color of the label callout.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public virtual System.Drawing.Color CalloutBackColor { get; set; }
member this.CalloutBackColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value.
Attributes BindableAttribute TypeConverterAttribute
Remarks
This property is only applicable when the CalloutStyle property is set to a value of Box.
SmartLabelStyle.CalloutLineAnchorCapStyle SmartLabel
Style.CalloutLineAnchorCapStyle
I n this Article
Gets or sets the anchor cap style of the label callout line.
[System.ComponentModel.Bindable(true)]
public virtual System.Windows.Forms.DataVisualization.Charting.LineAnchorCapStyle
CalloutLineAnchorCapStyle { get; set; }
member this.CalloutLineAnchorCapStyle :
System.Windows.Forms.DataVisualization.Charting.LineAnchorCapStyle with get, set
Returns
LineAnchorCapStyle LineAnchorCapStyle
A LineAnchorCapStyle enumeration value.
Attributes BindableAttribute
SmartLabelStyle.CalloutLineColor SmartLabelStyle.
CalloutLineColor
I n this Article
Gets or sets the color of the label callout line.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public virtual System.Drawing.Color CalloutLineColor { get; set; }
member this.CalloutLineColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value.
Attributes BindableAttribute TypeConverterAttribute
SmartLabelStyle.CalloutLineDashStyle SmartLabelStyle.
CalloutLineDashStyle
I n this Article
Gets or sets the style of the label callout line.
[System.ComponentModel.Bindable(true)]
public virtual System.Windows.Forms.DataVisualization.Charting.ChartDashStyle CalloutLineDashStyle {
get; set; }
member this.CalloutLineDashStyle : System.Windows.Forms.DataVisualization.Charting.ChartDashStyle
with get, set
Returns
ChartDashStyle ChartDashStyle
A ChartDashStyle enumeration value.
Attributes BindableAttribute
SmartLabelStyle.CalloutLineWidth SmartLabelStyle.
CalloutLineWidth
I n this Article
Gets or sets the width of the label callout line.
[System.ComponentModel.Bindable(true)]
public virtual int CalloutLineWidth { get; set; }
member this.CalloutLineWidth : int with get, set
Returns
Int32 Int32
An integer value.
Attributes BindableAttribute
SmartLabelStyle.CalloutStyle SmartLabelStyle.Callout
Style
I n this Article
Gets or sets the callout style of the repositioned SmartLabelStyle object.
[System.ComponentModel.Bindable(true)]
public virtual System.Windows.Forms.DataVisualization.Charting.LabelCalloutStyle CalloutStyle { get;
set; }
member this.CalloutStyle : System.Windows.Forms.DataVisualization.Charting.LabelCalloutStyle with
get, set
Returns
LabelCalloutStyle LabelCalloutStyle
A LabelCalloutStyle enumeration value.
Attributes BindableAttribute
SmartLabelStyle.Enabled SmartLabelStyle.Enabled
I n this Article
Gets or sets a flag that indicates whether a SmartLabelStyle algorithm is enabled.
[System.ComponentModel.Bindable(true)]
public virtual bool Enabled { get; set; }
member this.Enabled : bool with get, set
Returns
Boolean Boolean
true if an algorithm will be applied to prevent data point labels from overlapping. False if overlapping of data point
labels will not be prevented. The default value is true .
Attributes BindableAttribute
SmartLabelStyle.IsMarkerOverlappingAllowed Smart
LabelStyle.IsMarkerOverlappingAllowed
I n this Article
Gets or sets a flag that specifies whether the point labels are allowed to overlap a point marker.
[System.ComponentModel.Bindable(true)]
public virtual bool IsMarkerOverlappingAllowed { get; set; }
member this.IsMarkerOverlappingAllowed : bool with get, set
Returns
Boolean Boolean
true if data point labels are permitted to overlap point markers. False if data point labels will be prevented from
overlapping the point markers. The default value is false .
Attributes BindableAttribute
SmartLabelStyle.IsOverlappedHidden SmartLabelStyle.Is
OverlappedHidden
I n this Article
Gets or sets a flag that indicates whether overlapped labels that cannot be repositioned will be hidden.
[System.ComponentModel.Bindable(true)]
public virtual bool IsOverlappedHidden { get; set; }
member this.IsOverlappedHidden : bool with get, set
Returns
Boolean Boolean
true if labels will be hidden if they overlap. false if overlapped labels will not be hidden. The default value is true .
Attributes BindableAttribute
Remarks
If the point cannot be drawn within the area specified by the properties MinMovingDistance and MaxMovingDistance,
in the directions allowed by the MovingDirection, property, and this property is true , the data point label will not be
drawn.
Note
Smart labels only work when the Angle property is set to zero.
SmartLabelStyle.MaxMovingDistance SmartLabelStyle.
MaxMovingDistance
I n this Article
Gets or sets the maximum distance, in pixels, that the overlapped SmartLabelStyle object can be moved from the
marker.
[System.ComponentModel.Bindable(true)]
public virtual double MaxMovingDistance { get; set; }
member this.MaxMovingDistance : double with get, set
Returns
Double Double
A double value.
Attributes BindableAttribute
Remarks
This property specifies the maximum distance in pixels from the data point that data point labels are allowed to be
moved in case of overlapping.
SmartLabelStyle.MinMovingDistance SmartLabelStyle.
MinMovingDistance
I n this Article
Gets or sets the minimum distance, in pixels, that the overlapped SmartLabelStyle object can be moved from the
marker.
[System.ComponentModel.Bindable(true)]
public virtual double MinMovingDistance { get; set; }
member this.MinMovingDistance : double with get, set
Returns
Double Double
A double value.
Attributes BindableAttribute
Remarks
This property specifies the minimum distance in pixels from the data point that data point labels are allowed to be
moved in case of overlapping.
SmartLabelStyle.MovingDirection SmartLabelStyle.
MovingDirection
I n this Article
Gets or sets the direction(s) in which the overlapped SmartLabelStyle object is allowed to be moved.
[System.ComponentModel.Bindable(true)]
public virtual System.Windows.Forms.DataVisualization.Charting.LabelAlignmentStyles MovingDirection
{ get; set; }
member this.MovingDirection : System.Windows.Forms.DataVisualization.Charting.LabelAlignmentStyles
with get, set
Returns
LabelAlignmentStyles LabelAlignmentStyles
A LabelAlignmentStyles enumeration value or multiple bitwise OR'd LabelAlignmentStyles values. The default is the
bitwise OR of all LabelAlignmentStyles values to allow repositioning in all directions except to the center of the data
point.
Attributes BindableAttribute
SmartLabelStyle
I n this Article
Initializes a new instance of the SmartLabelStyle class.
public SmartLabelStyle ();
StartFromZero StartFromZero Enum
Indicates whether an axis segment should start from zero when a scale break is used.
D eclaration
public enum StartFromZero
type StartFromZero =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The StartFromZero enumeration is used to set the value of the StartFromZero property and indicates whether an axis
segment should start from zero.
Fields
Auto Auto The Chart control calculates whether to start the axis scale at zero or at a more appropriate rounded value.
D eclaration
public class StatisticFormula
type StatisticFormula = class
I nheritance H ierarchy
Object Object
Remarks
Formulas can be loosely grouped into the following categories: distributions, including inverse distributions; tests; and
basic statistical formulas. Each group has common characteristics with respect to their input and return values.
Methods
Anova(Double, String)
Anova(Double, String)
Performs an ANOVA test to determine whether there is a statistically significant difference between the mean
values of two or more groups of data.
BetaFunction(Double, Double)
BetaFunction(Double, Double)
Correlation(String, String)
Correlation(String, String)
Covariance(String, String)
Covariance(String, String)
GammaFunction(Double)
GammaFunction(Double)
InverseNormalDistribution(Double)
InverseNormalDistribution(Double)
InverseTDistribution(Double, Int32)
InverseTDistribution(Double, Int32)
Returns the inverse t-value of the Students t-distribution as a function of probability and degree of freedom.
Mean(String)
Mean(String)
Returns the average of all data points stored in the specified series.
Median(String)
Median(String)
NormalDistribution(Double)
NormalDistribution(Double)
Returns the probability for the standard normal cumulative distribution function.
Performs a T Test using Student's distribution (T distribution) with paired samples. This is useful when there is a
natural pairing of observations in samples.
Variance(String, Boolean)
Variance(String, Boolean)
Parameters
probability Double Double
The alpha value, which is the probability that the hypothesis is rejected. The allowable range is 0-1.
inputSeriesNames String String
A comma-delimited list of input series names.
Returns
AnovaResult AnovaResult
An AnovaResult object.
Remarks
An ANOVA test is used to test the difference between the means of two or more groups of data.
Two or more groups of series data must be specified, and each series must have the same number of data points;
otherwise, an exception will be raised.
If a specified input series does not exist in the SeriesCollection at the time of the method call, an exception will be
thrown.
StatisticFormula.BetaFunction StatisticFormula.Beta
Function
I n this Article
Returns the beta function value for two given values.
Parameters
m Double Double
The first value for the beta function.
n Double Double
The second value for the beta function.
Returns
Double Double
A double value that represents the beta function for the two given values.
Remarks
This method returns the beta function value for two given values that are specified by m and n .
StatisticFormula.Correlation StatisticFormula.Correlation
I n this Article
Returns the correlation value for two data series.
public double Correlation (string firstInputSeriesName, string secondInputSeriesName);
member this.Correlation : string * string -> double
Parameters
firstInputSeriesName String String
The first input series name.
secondInputSeriesName String String
The second input series name.
Returns
Double Double
A double value that represents the correlation between two data series.
Remarks
Correlation measures the relationship between two data sets that are scaled to be independent of the unit of
measurement. The Correlation method returns the covariance of two data sets divided by the product of their standard
deviations, and always ranges from -1 to 1.
Use correlation to determine whether two ranges of data move together; that is, whether large values of one set are
associated with large values of the other (positive correlation), whether small values of one set are associated with
large values of the other (negative correlation), or whether values in both sets are unrelated (correlation near zero).
If a specified input series does not exist in the series collection at the time of the method call, an exception will be
thrown. An exception will also be raised if the specified series do not have the same number of data points.
StatisticFormula.Covariance StatisticFormula.Covariance
I n this Article
Returns the covariance value for two data series.
public double Covariance (string firstInputSeriesName, string secondInputSeriesName);
member this.Covariance : string * string -> double
Parameters
firstInputSeriesName String String
The first input series name.
secondInputSeriesName String String
The second input series name.
Returns
Double Double
A double value that represents the covariance between two data series.
StatisticFormula.FDistribution StatisticFormula.
FDistribution
I n this Article
Returns the cumulative F distribution function probability.
Parameters
value Double Double
The F value.
firstDegreeOfFreedom Int32 Int32
First degree of freedom.
secondDegreeOfFreedom Int32 Int32
Second degree of freedom.
Returns
Double Double
A double value that represents the cumulative F distribution function probability.
StatisticFormula.FTest StatisticFormula.FTest
I n this Article
Performs a two-sample F Test using the F distribution. This test is used to determine if the samples have different
variances.
Parameters
probability Double Double
The alpha value, which is the probability that the hypothesis is rejected. The allowable range is 0-1.
firstInputSeriesName String String
First input series name.
secondInputSeriesName String String
Second input series name.
Returns
FTestResult FTestResult
An FTestResult object.
StatisticFormula.GammaFunction StatisticFormula.
GammaFunction
I n this Article
Returns the gamma function value for the given variable.
Parameters
value Double Double
The input variable.
Returns
Double Double
A double value that represents the gamma function.
StatisticFormula.InverseFDistribution StatisticFormula.
InverseFDistribution
I n this Article
Returns the inverse of the F cumulative distribution.
Parameters
probability Double Double
The alpha value, which is the probability that the hypothesis is rejected. The allowable range is 0-1.
firstDegreeOfFreedom Int32 Int32
First degree of freedom.
secondDegreeOfFreedom Int32 Int32
Second degree of freedom.
Returns
Double Double
A double value from the inverse F distribution function.
Exceptions
InvalidOperationException InvalidOperationException
Condition: Cannot continue calculation using specified parameter values because of limitation.
Remarks
This method returns the F value for the given F distribution probability.
The F distribution can be used in an F -test that compares the degree of variability in two data sets.
This method may return an exception depending on the parameter values.
StatisticFormula.InverseNormalDistribution Statistic
Formula.InverseNormalDistribution
I n this Article
Returns the inverse of the standard normal cumulative distribution.
Parameters
probability Double Double
The alpha value, which is the probability that the hypothesis is rejected. The allowable range is 0-1.
Returns
Double Double
A double value from the inverse standard normal cumulative distribution function.
Remarks
This method returns the F value for the given F distribution probability.
It is assumed that the distribution has a mean of 0 (zero) and a standard deviation of one.
StatisticFormula.InverseTDistribution StatisticFormula.
InverseTDistribution
I n this Article
Returns the inverse t-value of the Students t-distribution as a function of probability and degree of freedom.
Parameters
probability Double Double
The alpha value, which is the probability that the hypothesis is rejected. The allowable range is 0-1.
degreeOfFreedom Int32 Int32
The degree of freedom.
Returns
Double Double
A double value that represents the inverse T distribution.
Remarks
This method returns the t value for the given T distribution probability.
StatisticFormula.Mean StatisticFormula.Mean
I n this Article
Returns the average of all data points stored in the specified series.
public double Mean (string inputSeriesName);
member this.Mean : string -> double
Parameters
inputSeriesName String String
Input series name.
Returns
Double Double
A double value that represents the average of all data points.
Remarks
Use this method to calculate the mean (that is, the average) of the points stored in a series.
If the specified input series does not exist in the SeriesCollection at the time of the method call, an exception will be
thrown.
StatisticFormula.Median StatisticFormula.Median
I n this Article
Returns the median of all data points in the specified series.
public double Median (string inputSeriesName);
member this.Median : string -> double
Parameters
inputSeriesName String String
Input series name.
Returns
Double Double
A double value that represents the median.
Remarks
Use this method to calculate the median of the points stored in a series.
The median is the middle value of a sample set, where half of the members are greater in size and half the members
are lesser in size.
If the specified input series does not exist in the SeriesCollection at the time of the method call, an exception will be
thrown.
StatisticFormula.NormalDistribution StatisticFormula.
NormalDistribution
I n this Article
Returns the probability for the standard normal cumulative distribution function.
Parameters
zValue Double Double
The Z value for which the probability is required.
Returns
Double Double
A double value from the standard normal cumulative distribution function.
StatisticFormula.TDistribution StatisticFormula.
TDistribution
I n this Article
Returns the probability for the T distribution (Student's distribution).
Parameters
value Double Double
The T value
degreeOfFreedom Int32 Int32
Degree of freedom
oneTail Boolean Boolean
If true , a one-tailed distribution is used; otherwise, a two-tailed distribution is used.
Returns
Double Double
A double value that represents a T Distribution cumulative function.
StatisticFormula.TTestEqualVariances StatisticFormula.
TTestEqualVariances
I n this Article
Performs a T Test using Student's distribution (T distribution) with equal variances.
Parameters
hypothesizedMeanDifference Double Double
Hypothesized mean difference.
probability Double Double
The alpha value, which is the probability that the hypothesis is rejected. The allowable range is 0-1.
firstInputSeriesName String String
First input series name.
secondInputSeriesName String String
Second input series name.
Returns
TTestResult TTestResult
A TTestResult object.
StatisticFormula.TTestPaired StatisticFormula.TTestPaired
I n this Article
Performs a T Test using Student's distribution (T distribution) with paired samples. This is useful when there is a natural
pairing of observations in samples.
Parameters
hypothesizedMeanDifference Double Double
Hypothesized mean difference.
probability Double Double
The alpha value, which is the probability that the hypothesis is rejected. The allowable range is 0-1.
firstInputSeriesName String String
First input series name.
secondInputSeriesName String String
Second input series name.
Returns
TTestResult TTestResult
A TTestResult object.
StatisticFormula.TTestUnequalVariances StatisticFormula.
TTestUnequalVariances
I n this Article
Performs a T Test using Student's distribution (T distribution) with unequal variances.
Parameters
hypothesizedMeanDifference Double Double
Hypothesized mean difference.
probability Double Double
The alpha value, which is the probability that the hypothesis is rejected. The allowable range is 0-1.
firstInputSeriesName String String
First input series name.
secondInputSeriesName String String
Second input series name.
Returns
TTestResult TTestResult
A TTestResult object.
StatisticFormula.Variance StatisticFormula.Variance
I n this Article
Returns the variance for a series.
public double Variance (string inputSeriesName, bool sampleVariance);
member this.Variance : string * bool -> double
Parameters
inputSeriesName String String
The input series name.
sampleVariance Boolean Boolean
true if the data is a sample of the population; false if the data is the entire population.
Returns
Double Double
A double value that represents the variance.
StatisticFormula.ZTest StatisticFormula.ZTest
I n this Article
Performs a Z Test using the Normal distribution.
public System.Windows.Forms.DataVisualization.Charting.ZTestResult ZTest (double
hypothesizedMeanDifference, double varianceFirstGroup, double varianceSecondGroup, double
probability, string firstInputSeriesName, string secondInputSeriesName);
member this.ZTest : double * double * double * double * string * string ->
System.Windows.Forms.DataVisualization.Charting.ZTestResult
Parameters
hypothesizedMeanDifference Double Double
Hypothesized mean difference.
varianceFirstGroup Double Double
Variance of the first group.
varianceSecondGroup Double Double
Variance of the second group.
probability Double Double
The alpha value, which is the probability that the hypothesis is rejected. The allowable range is 0-1.
firstInputSeriesName String String
First input series name.
secondInputSeriesName String String
Second input series name.
Returns
ZTestResult ZTestResult
A ZTestResult object.
StripLine StripLine Class
Represents the strip lines on a chart.
D eclaration
public class StripLine : System.Windows.Forms.DataVisualization.Charting.ChartElement
type StripLine = class
inherit ChartElement
I nheritance H ierarchy
Object Object
ChartElement ChartElement
Remarks
Strip lines, or strips, are horizontal or vertical ranges that shade the background of a chart in regular or custom
intervals. You can use strip lines to:
Improve readability for looking up individual values on the chart.
Separate data points when reading the chart.
Highlight dates that occur at regular intervals, for example, to identify weekend data points.
Highlight a specific key range of data.
Add a threshold line at a specific constant value.
A single StripLine object can either be drawn once, or repeatedly, for a given interval. This action is controlled by the
Interval property. When a value of zero is assigned to the Interval property, one strip line will be drawn. When a non-
zero value is assigned to the Interval property, a strip line will be drawn repeatedly at each given interval. The location
where a strip line is drawn is also affected by the IntervalOffset and IntervalOffsetType properties of the strip line.
Strip lines are always associated with an Axis object. They can be added at both design time and run time.
To add a horizontal or vertical line to display a threshold, set the StripWidth property to a value of 0.0. This will result in
a line being drawn. You can use the BorderColor, BorderDashStyle and BorderWidth properties for the color, width and
style of the line. No chart background properties ( Back* ) are used when the StripWidth property is set to 0.0.
Use the Text property of the strip line to associate text with a strip line. The placement and orientation of this text can
be controlled by the TextAlignment property.
When multiple strip lines are defined for the same axis, it is possible that the strip lines will overlap. The Z -order of
StripLine objects is determined by their order of occurrence in the StripLinesCollection object. This means that the first
occurrence is drawn first; the second occurrence is drawn second, and so on.
Strip lines are not supported for the following chart types: Pie, Doughnut, Funnel, Pyramid, Kagi, ThreeLineBreak,
PointAndFigure, Polar and Radar.
Constructors
StripLine()
StripLine()
BackGradientStyle
BackGradientStyle
BackHatchStyle
BackHatchStyle
BackImage
BackImage
BackImageAlignment
BackImageAlignment
BackImageTransparentColor
BackImageTransparentColor
Gets or sets a color which will be replaced with a transparent color when the background image is drawn.
BackImageWrapMode
BackImageWrapMode
Gets or sets the drawing mode of the background image of the strip line.
BackSecondaryColor
BackSecondaryColor
BorderColor
BorderColor
BorderWidth
BorderWidth
Font
Font
Gets or sets the font used for the strip line text.
ForeColor
ForeColor
Interval
Interval
Gets or sets the interval for a strip line, and determines if the strip line is drawn once or repeatedly.
IntervalOffset
IntervalOffset
Gets or sets the offset of grid lines, tick marks, strip lines and axis labels.
IntervalOffsetType
IntervalOffsetType
IntervalType
IntervalType
Name
Name
StripWidthType
StripWidthType
Text
Text
TextAlignment
TextAlignment
TextLineAlignment
TextLineAlignment
TextOrientation
TextOrientation
ToolTip
ToolTip
Methods
Dispose(Boolean)
Dispose(Boolean)
Releases the unmanaged resources used by the StripLine and optionally releases the managed resources.
StripLine.BackColor StripLine.BackColor
I n this Article
Gets or sets the background color of the strip line.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BackColor { get; set; }
member this.BackColor : System.Drawing.Color with get, set
Returns
Color Color
A Color structure. The default color is White.
Attributes BindableAttribute TypeConverterAttribute
Remarks
You can set this property to any valid ARGB (alpha, red, green, blue) value.
To set a gradient for the strip line, set the BackColor and BackSecondaryColor properties.
If you set this color to "transparent" - in other words, set the alpha value to 0 - no color will be assigned to the
background of the element. As a result, the background will be transparent.
If the StripWidth property is set to 0.0, a line will be drawn and the BorderColor property will determine the color of
the line, not this property.
StripLine.BackGradientStyle StripLine.BackGradientStyle
I n this Article
Gets or sets the gradient style of the strip line.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.GradientStyle BackGradientStyle { get; set; }
member this.BackGradientStyle : System.Windows.Forms.DataVisualization.Charting.GradientStyle with
get, set
Returns
GradientStyle GradientStyle
A GradientStyle enumeration. The default value is None.
Attributes BindableAttribute
Remarks
The BackGradientStyle property determines whether a chart element will display a gradient, as well as the orientation
of the gradient, if used.
To use gradient colors:
Use the BackColor property to set the primary color.
Use the BackSecondaryColor property to set the secondary color.
Set this BackGradientStyle property of the chart element to the desired gradient style.
This property is not applicable if the StripWidth property is set to a value of 0.0.
StripLine.BackHatchStyle StripLine.BackHatchStyle
I n this Article
Gets or sets the hatching style of the strip line.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle BackHatchStyle { get; set; }
member this.BackHatchStyle : System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle with
get, set
Returns
ChartHatchStyle ChartHatchStyle
A ChartHatchStyle enumeration. The default value is None.
Attributes BindableAttribute
Remarks
The hatch pattern consists of a solid background color and lines drawn over the background. The two colors used in
the hatch style are set by the BackColor and BackSecondaryColor properties. This property is not applicable if the
StripWidth property is set to a value of 0.0.
StripLine.BackImage StripLine.BackImage
I n this Article
Gets or sets the background image of the strip line.
[System.ComponentModel.Bindable(true)]
public string BackImage { get; set; }
member this.BackImage : string with get, set
Returns
String String
A string value that represents an image file's URL. The default is an empty string.
Attributes BindableAttribute
Remarks
The BackImage property defines a path to a background image for many chart elements, and is an absolute or relative
URL.
To position this image, use the BackImageAlignment and BackImageWrapMode properties.
You can also specify that one color will be displayed by the image as "transparent" by setting the
BackImageTransparentColor property.
An image can be any valid graphics file supported by .NET Framework, including icons.
This property is not applicable if the StripWidth property is set to a value of 0.0.
Background images take precedence over other background properties, such as gradient colors.
StripLine.BackImageAlignment StripLine.BackImage
Alignment
I n this Article
Gets or sets the background image alignment.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartImageAlignmentStyle BackImageAlignment {
get; set; }
member this.BackImageAlignment :
System.Windows.Forms.DataVisualization.Charting.ChartImageAlignmentStyle with get, set
Returns
ChartImageAlignmentStyle ChartImageAlignmentStyle
A ChartImageAlignmentStyle enumeration value. The default value is TopLeft.
Attributes BindableAttribute
Remarks
This property determines the alignment of the background image for strip lines; it is only applied when the
BackImageWrapMode property is set to Unscaled.
For more information about available alignments, see the ChartImageAlignmentStyle enumeration topic.
StripLine.BackImageTransparentColor StripLine.Back
ImageTransparentColor
I n this Article
Gets or sets a color which will be replaced with a transparent color when the background image is drawn.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BackImageTransparentColor { get; set; }
member this.BackImageTransparentColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that will be displayed as transparent.
Attributes BindableAttribute TypeConverterAttribute
Remarks
This property is not applicable if the StripWidth property is set to a value of 0.0.
StripLine.BackImageWrapMode StripLine.BackImage
WrapMode
I n this Article
Gets or sets the drawing mode of the background image of the strip line.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartImageWrapMode BackImageWrapMode { get;
set; }
member this.BackImageWrapMode : System.Windows.Forms.DataVisualization.Charting.ChartImageWrapMode
with get, set
Returns
ChartImageWrapMode ChartImageWrapMode
A ChartImageWrapMode integer enumeration. The default is Tile.
Attributes BindableAttribute
Remarks
This property determines how the image is displayed; that is, tiled, scaled, and so forth.
If an image is scaled, it will be stretched to fit within the bounding strip line. If the image is tiled, it is repeatedly drawn,
starting from the top-left corner.
For more information concerning the available wrapping modes, see the ChartImageWrapMode enumeration topic.
If the BackImageWrapMode property is set to Unscaled, the location where the image is drawn will be determined by
the BackImageAlignment property setting.
This property is not applicable if StripWidth is set to a value of 0.0.
StripLine.BackSecondaryColor StripLine.BackSecondary
Color
I n this Article
Gets or sets the secondary color of the strip line background.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BackSecondaryColor { get; set; }
member this.BackSecondaryColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used for the secondary color of a background with hatching or gradient fill. The default color is Empty.
Attributes BindableAttribute TypeConverterAttribute
Remarks
This property determines the secondary background color of many chart objects, and is used when gradient colors are
being applied.
You can set background secondary color to any valid ARGB (alpha, red, green, blue) value.
If hatching is used, the BackSecondaryColor property determines the color of the hatching lines.
To use gradient colors for the background of a chart element:
Use the BackColor property to set the primary color.
Use this BackSecondaryColor property to set the secondary color.
Set the BackGradientStyle property to the desired gradient style.
This property is not applicable if the StripWidth property is set to a value of 0.0.
StripLine.BorderColor StripLine.BorderColor
I n this Article
Gets or sets the border color of a strip line.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BorderColor { get; set; }
member this.BorderColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value. The default color is Empty.
Attributes BindableAttribute TypeConverterAttribute
Remarks
You can set this property to any valid ARGB (alpha, red, green, blue) value.
If the StripWidth property of a StripLine object is set to 0.0, a line will be drawn, and it is this property and not the
BackColor property setting that will determine the color of the line.
StripLine.BorderDashStyle StripLine.BorderDashStyle
I n this Article
Gets or sets the border style of the strip line.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartDashStyle BorderDashStyle { get; set; }
member this.BorderDashStyle : System.Windows.Forms.DataVisualization.Charting.ChartDashStyle with
get, set
Returns
ChartDashStyle ChartDashStyle
A ChartDashStyle enumeration value that determines the border style of the strip line.
Attributes BindableAttribute
Remarks
This property specifies the line style used for a border. The line can be solid, dotted or some variation of solid and
dotted.
StripLine.BorderWidth StripLine.BorderWidth
I n this Article
Gets or sets the border width of the strip line.
[System.ComponentModel.Bindable(true)]
public int BorderWidth { get; set; }
member this.BorderWidth : int with get, set
Returns
Int32 Int32
An integer value that determines the width of the strip line's border, in pixels.
Attributes BindableAttribute
Remarks
This property is measured in pixels.
StripLine.Dispose StripLine.Dispose
I n this Article
Releases the unmanaged resources used by the StripLine and optionally releases the managed resources.
protected override void Dispose (bool disposing);
override this.Dispose : bool -> unit
Parameters
disposing Boolean Boolean
true to release both managed and unmanaged resources; false to release only unmanaged resources.
StripLine.Font StripLine.Font
I n this Article
Gets or sets the font used for the strip line text.
[System.ComponentModel.Bindable(true)]
public System.Drawing.Font Font { get; set; }
member this.Font : System.Drawing.Font with get, set
Returns
Font Font
A Font value that represents the font of the strip line text.
Attributes BindableAttribute
StripLine.ForeColor StripLine.ForeColor
I n this Article
Gets or sets the color of the strip line text.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color ForeColor { get; set; }
member this.ForeColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that represents the text color of a strip line. The default value is Black.
Attributes BindableAttribute TypeConverterAttribute
Remarks
You can specify any valid ARGB color for this property. This property is only applicable when a text value is specified
for the strip line.
StripLine.Interval StripLine.Interval
I n this Article
Gets or sets the interval for a strip line, and determines if the strip line is drawn once or repeatedly.
[System.ComponentModel.Bindable(true)]
public double Interval { get; set; }
member this.Interval : double with get, set
Returns
Double Double
A double value that represents the interval between strip lines. The default value is zero.
Attributes BindableAttribute
Remarks
When you set the Interval property to a value of zero, one strip line will be displayed, with a width specified by the
StripWidth property. When you set Interval to a value of other than zero, multiple strip lines will be shown. The unit
that is used for the Interval property is defined by the IntervalType property.
StripLine.IntervalOffset StripLine.IntervalOffset
I n this Article
Gets or sets the offset of grid lines, tick marks, strip lines and axis labels.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.AxisLabe
lDateValueConverter))]
public double IntervalOffset { get; set; }
member this.IntervalOffset : double with get, set
Returns
Double Double
A double value that represents the interval offset.
Attributes BindableAttribute TypeConverterAttribute
Remarks
The interval offset of minor tick marks and grid lines is never affected by the value of the IntervalOffset property of the
Axis object.
The IntervalOffset property setting defines the units of measurement of the offset.
The Interval can be a negative value.
The default value is Auto ( 0 ).
StripLine.IntervalOffsetType StripLine.IntervalOffsetType
I n this Article
Gets or sets the interval offset type of the strip line.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType IntervalOffsetType {
get; set; }
member this.IntervalOffsetType :
System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType with get, set
Returns
DateTimeIntervalType DateTimeIntervalType
A DateTimeIntervalType enumeration value that indicates the interval type. The default value is Auto.
Attributes BindableAttribute
Remarks
By default, this property is set to Auto; the actual value of this property is determined by the IntervalType property.
StripLine.IntervalType StripLine.IntervalType
I n this Article
Gets or sets the interval type of a StripLine object.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType IntervalType { get; set;
}
member this.IntervalType : System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType with
get, set
Returns
DateTimeIntervalType DateTimeIntervalType
A DateTimeIntervalType enumeration value that indicates the interval type. The default value is Auto.
Attributes BindableAttribute
Remarks
Interval types can be set to Auto, in which case the type depends on: the X-value or Y -value types of the plotted
DataPoint objects - depending on which axis the StripLine objects belong to - and the axis scale.
The Interval property determines how often a strip or line is drawn.
StripLine.Name StripLine.Name
I n this Article
Gets the name of the strip line.
[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
public string Name { get; }
member this.Name : string
Returns
String String
A string value that represents the name of the strip line.
Attributes BindableAttribute BrowsableAttribute
StripLine
I n this Article
Initializes a new instance of the StripLine class.
public StripLine ();
StripLine.StripWidth StripLine.StripWidth
I n this Article
Gets or sets the width of a strip line.
[System.ComponentModel.Bindable(true)]
public double StripWidth { get; set; }
member this.StripWidth : double with get, set
Returns
Double Double
A double value that determines whether a strip or a line is drawn. The default value is 0.0.
Attributes BindableAttribute
Remarks
This property cannot be set to a value less than zero, otherwise an exception will be raised.
A setting of 0.0 will result in a line being drawn; this line will use the BorderColor, BorderDashStyle and BorderWidth
property settings for its color, width and style. None of the Back* properties in this class are utilized when the value of
StripWidth is 0.0.
If you set the StripWidth property to a value greater than zero, a strip will be created. The BorderColor,
BorderDashStyle and BorderWidth properties only apply to the border of the strip; all of the Back* properties are then
used for the background properties of the strip.
If the value of the StripWidth property is greater than 0.0, the units are determined by the relevant axis scale.
StripLine.StripWidthType StripLine.StripWidthType
I n this Article
Gets or sets the unit of measurement for the StripWidth property.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType StripWidthType { get;
set; }
member this.StripWidthType : System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType
with get, set
Returns
DateTimeIntervalType DateTimeIntervalType
A DateTimeIntervalType enumeration value that indicates the width type. The default value is Auto.
Attributes BindableAttribute
Remarks
This property determines the units used for the StripWidth property. For example, to set a strip line to represent "one
week", you could set this property to Weeks and set the StripWidth property to one (1.0).
You can change the value of this property from Auto to a DateTime value when the relevant axis scale uses a DateTime
value.
StripLine.Text StripLine.Text
I n this Article
Gets or sets the text of the strip line.
[System.ComponentModel.Bindable(true)]
public string Text { get; set; }
member this.Text : string with get, set
Returns
String String
A string value that represents the text of a strip line.
Attributes BindableAttribute
Remarks
Use this property to add text to a strip line.
StripLine.TextAlignment StripLine.TextAlignment
I n this Article
Gets or sets the text alignment of the strip line.
[System.ComponentModel.Bindable(true)]
public System.Drawing.StringAlignment TextAlignment { get; set; }
member this.TextAlignment : System.Drawing.StringAlignment with get, set
Returns
StringAlignment StringAlignment
A StringAlignment value that represents the alignment of the strip line text.
Attributes BindableAttribute
StripLine.TextLineAlignment StripLine.TextLineAlignment
I n this Article
Gets or sets the text line alignment of the strip line.
[System.ComponentModel.Bindable(true)]
public System.Drawing.StringAlignment TextLineAlignment { get; set; }
member this.TextLineAlignment : System.Drawing.StringAlignment with get, set
Returns
StringAlignment StringAlignment
A StringAlignment value that represents the alignment of the text line.
Attributes BindableAttribute
StripLine.TextOrientation StripLine.TextOrientation
I n this Article
Gets or sets the text orientation.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.TextOrientation TextOrientation { get; set; }
member this.TextOrientation : System.Windows.Forms.DataVisualization.Charting.TextOrientation with
get, set
Returns
TextOrientation TextOrientation
A TextOrientation value that represents the alignment of the text orientation.
Attributes BindableAttribute
Remarks
When this property is set to a value of Auto, the text is oriented based on the chart type. For all X-Y chart types other
than Bar, X-axis strip line text is oriented horizontally from left to right on the bottom of the strip line. For Bar charts, X-
axis strip line text is oriented vertically from top to bottom to the right of the strip line.
StripLine.ToolTip StripLine.ToolTip
I n this Article
Gets or sets the tooltip of a strip line.
[System.ComponentModel.Bindable(true)]
public string ToolTip { get; set; }
member this.ToolTip : string with get, set
Returns
String String
A string value that represents the tooltip of the strip line.
Attributes BindableAttribute
StripLinesCollection StripLinesCollection Class
Represents a collection of StripLine objects.
D eclaration
public class StripLinesCollection :
System.Windows.Forms.DataVisualization.Charting.ChartElementCollection<System.Windows.Forms.Data
Visualization.Charting.StripLine>
type StripLinesCollection = class
inherit ChartElementCollection<StripLine>
I nheritance H ierarchy
Object Object
Collection<T> Collection<T>
ChartElementCollection<T> ChartElementCollection<T>
Remarks
The StripLinesCollection class represents a collection of StripLine objects, and is implemented as the StripLines
property of the Axis class.
StripLine objects can be appended, inserted or removed from the collection at both design time and run time.
Note Strip lines can be displayed once or repeatedly for a set interval.
TextAnnotation TextAnnotation Class
Represents a text annotation.
D eclaration
public class TextAnnotation : System.Windows.Forms.DataVisualization.Charting.Annotation
type TextAnnotation = class
inherit Annotation
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
Annotation Annotation
Remarks
Note that other annotations, such as rectangle and ellipse annotations, can display inner text.
Constructors
TextAnnotation()
TextAnnotation()
Properties
AnnotationType
AnnotationType
BackColor
BackColor
BackGradientStyle
BackGradientStyle
BackHatchStyle
BackHatchStyle
Font
Font
IsMultiline
IsMultiline
Gets or sets a flag that indicates whether the annotation text is multiline.
LineColor
LineColor
LineDashStyle
LineDashStyle
LineWidth
LineWidth
Text
Text
Methods
BeginTextEditing()
BeginTextEditing()
EndPlacement()
EndPlacement()
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
public override string AnnotationType { get; }
member this.AnnotationType : string
Returns
String String
The annotation type.
Attributes BindableAttribute BrowsableAttribute
Remarks
For internal use, should not be used.
TextAnnotation.BackColor TextAnnotation.BackColor
I n this Article
This property is not applicable to the text annotation type.
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color BackColor { get; set; }
member this.BackColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value.
Attributes BrowsableAttribute TypeConverterAttribute
Remarks
This property is not applicable to the text annotation type.
TextAnnotation.BackGradientStyle TextAnnotation.Back
GradientStyle
I n this Article
This property is not applicable to the text annotation type.
[System.ComponentModel.Browsable(false)]
public override System.Windows.Forms.DataVisualization.Charting.GradientStyle BackGradientStyle {
get; set; }
member this.BackGradientStyle : System.Windows.Forms.DataVisualization.Charting.GradientStyle with
get, set
Returns
GradientStyle GradientStyle
A GradientStyle enumeration value.
Attributes BrowsableAttribute
Remarks
This property is not applicable to the text annotation type.
TextAnnotation.BackHatchStyle TextAnnotation.Back
HatchStyle
I n this Article
This property is not applicable to the text annotation type.
[System.ComponentModel.Browsable(false)]
public override System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle BackHatchStyle {
get; set; }
member this.BackHatchStyle : System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle with
get, set
Returns
ChartHatchStyle ChartHatchStyle
A ChartHatchStyle enumeration value.
Attributes BrowsableAttribute
Remarks
This property is not applicable to the text annotation type.
TextAnnotation.BackSecondaryColor TextAnnotation.Back
SecondaryColor
I n this Article
This property is not applicable to the text annotation type.
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color BackSecondaryColor { get; set; }
member this.BackSecondaryColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value.
Attributes BrowsableAttribute TypeConverterAttribute
Remarks
This property is not applicable to the text annotation type.
TextAnnotation.BeginTextEditing TextAnnotation.Begin
TextEditing
I n this Article
Begins editing of the annotation text by an end-user.
Remarks
After calling this method, the annotation displays an editing box that allows the user to edit the annotation text.
Call the StopTextEditing method to cancel this mode programmatically. Note that editing also ends when the end-user
hits the Enter key if the value of the IsMultiline property is false , or when the end-user clicks outside the editing box if
the value is true .
TextAnnotation.EndPlacement TextAnnotation.End
Placement
I n this Article
Ends user placement of an annotation.
Remarks
Ends an annotation placement operation previously started by a BeginPlacement method call. You are not required to
call this method, because placement will automatically end when an end-user enters all required points. However, it is
useful when an annotation placement operation needs to be aborted for some reason.
TextAnnotation.Font TextAnnotation.Font
I n this Article
Gets or sets the font for the annotation text.
public override System.Drawing.Font Font { get; set; }
member this.Font : System.Drawing.Font with get, set
Returns
Font Font
A Font object used as the font for the annotation text.
Remarks
To set this property, create a new Font object, and then assign it to this property.
TextAnnotation.IsMultiline TextAnnotation.IsMultiline
I n this Article
Gets or sets a flag that indicates whether the annotation text is multiline.
public virtual bool IsMultiline { get; set; }
member this.IsMultiline : bool with get, set
Returns
Boolean Boolean
true if the annotation text is multiline; otherwise, false .
TextAnnotation.LineColor TextAnnotation.LineColor
I n this Article
This property is not applicable to the text annotation type.
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public override System.Drawing.Color LineColor { get; set; }
member this.LineColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value.
Attributes BrowsableAttribute TypeConverterAttribute
Remarks
This property is not applicable to the text annotation type.
TextAnnotation.LineDashStyle TextAnnotation.LineDash
Style
I n this Article
This property is not applicable to the text annotation type.
[System.ComponentModel.Browsable(false)]
public override System.Windows.Forms.DataVisualization.Charting.ChartDashStyle LineDashStyle { get;
set; }
member this.LineDashStyle : System.Windows.Forms.DataVisualization.Charting.ChartDashStyle with get,
set
Returns
ChartDashStyle ChartDashStyle
A ChartDashStyle enumeration value.
Attributes BrowsableAttribute
Remarks
This property is not applicable to the text annotation type.
TextAnnotation.LineWidth TextAnnotation.LineWidth
I n this Article
This property is not applicable to the text annotation type.
[System.ComponentModel.Browsable(false)]
public override int LineWidth { get; set; }
member this.LineWidth : int with get, set
Returns
Int32 Int32
An integer value.
Attributes BrowsableAttribute
Remarks
This property is not applicable to the text annotation type.
TextAnnotation.StopTextEditing TextAnnotation.StopText
Editing
I n this Article
Stops end-user editing of the annotation text.
Remarks
Call this method to cancel a text editing operation that was started with a call to the BeginTextEditing method.
Note that if the end user double-clicks the annotation, the BeginTextEditing method will be automatically called.
TextAnnotation.Text TextAnnotation.Text
I n this Article
Gets or sets the text of the annotation.
public virtual string Text { get; set; }
member this.Text : string with get, set
Returns
String String
A string value that represents the text.
TextAnnotation
I n this Article
Initializes a new instance of the TextAnnotation class.
public TextAnnotation ();
TextAntiAliasingQuality TextAntiAliasingQuality Enum
Specifies the level of anti-aliasing quality to be used with the TextAntiAliasingQuality property.
D eclaration
public enum TextAntiAliasingQuality
type TextAntiAliasingQuality =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The TextAntiAliasingQuality enumeration represents a quality range for text.
Fields
High High High anti-aliasing quality.
D eclaration
public enum TextOrientation
type TextOrientation =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Fields
Auto Auto Text orientation is automatically determined, based on the type of chart element in which the text
appears.
Rotated270 Text is rotated 270 degrees and oriented from bottom to top.
Rotated270
Rotated90 Rotated90 Text is rotated 90 degrees and oriented from top to bottom.
Stacked Stacked Text characters are not rotated and are positioned one below the other.
TextStyle TextStyle Enum
Specifies text drawing styles.
D eclaration
public enum TextStyle
type TextStyle =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Fields
Default Default Default text drawing style.
D eclaration
public class TickMark : System.Windows.Forms.DataVisualization.Charting.Grid
type TickMark = class
inherit Grid
I nheritance H ierarchy
Object Object
Grid Grid
Remarks
The TickMark class encapsulates the functionality for all chart tick marks.
The TickMark class is exposed as the MajorTickMark and MinorTickMark properties of Axis objects.
By default, major tick marks are displayed at the major grid lines, whereas minor tick marks must be explicitly
displayed.
MajorTickMark.Interval is not set ( Double.NaN ) by default, and the tick marks are drawn according to Interval.
MinorTickMark.Interval is set to Auto ( 0 ) by default, and the Chart control automatically determines the interval.
A developer can use this class to:
Enable or disable tick marks.
Set the color, width, length and line style of tick marks.
Specify a style that determines whether tick marks are displayed outside the axis, inside the axis or across the axis.
Specify the starting point - where the first tick mark is drawn - as well as the tick mark interval, which correlates to
their frequency.
Constructors
TickMark()
TickMark()
Properties
Size
Size
Gets or sets the length of tick marks. The length is measured in units that represent a percentage of the height or
width of the chart image, depending on the axis.
TickMarkStyle
TickMarkStyle
[System.ComponentModel.Bindable(true)]
public float Size { get; set; }
member this.Size : single with get, set
Returns
Single Single
A float value that represents the size, or length, of tick marks. The default value is 1.0 percent.
Attributes BindableAttribute
Remarks
The size of a tick mark determines the tick mark's length.
The Size property is measured in units that represent a percentage of the height or width of the chart image. If the
tick mark is displayed along a vertical axis, the unit of measure is a percentage of the chart image's width. If the tick
mark is displayed along a horizontal axis, the unit of measure is a percentage of the chart image's height.
A change in the width of the chart image will result in the resizing of all tick marks displayed along vertical axes, for all
chart areas. Similarly, a change in the height of the chart image will result in the resizing of all tick marks displayed
along horizontal axes, for all chart areas.
To display tick marks for three-dimensional (3D ) charts, so that they are just drawn for the width of a wall, set the
TickMarkStyle property to AcrossAxis and specify a tick mark size of zero (0) using the Size property.
TickMark
I n this Article
Initializes a new instance of the TickMark class.
public TickMark ();
TickMark.TickMarkStyle TickMark.TickMarkStyle
I n this Article
Gets or sets the tick mark style.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.TickMarkStyle TickMarkStyle { get; set; }
member this.TickMarkStyle : System.Windows.Forms.DataVisualization.Charting.TickMarkStyle with get,
set
Returns
TickMarkStyle TickMarkStyle
A TickMarkStyle enumeration value. The default value is OutsideArea.
Attributes BindableAttribute
Remarks
The TickMarkStyle property determines the style of tick marks.
Tick marks can be drawn inside the chart area, outside the chart area, across an axis line, or can be disabled.
To display tick marks for three-dimensional (3D ) charts so that they are just drawn for the width of a wall, set the
TickMarkStyle property to TickMarkStyle.AcrossAxis. Then specify a tick mark size of zero (0) using the Size property.
If the TickMarkStyle property is set to TickMarkStyle.None, tick marks are not displayed. Tick marks can also be
toggled on or off by setting the Enabled property to true or false .
TickMarkStyle TickMarkStyle Enum
Specifies a tick mark style when setting the TickMarkStyle property of a TickMark object.
D eclaration
public enum TickMarkStyle
type TickMarkStyle =
I nheritance H ierarchy
Object Object
ValueType ValueType
Enum Enum
Remarks
The TickMarkStyle enumeration represents the styles for major and minor tick marks.
Fields
AcrossAxis AcrossAxis Tick marks are drawn across the relevant axis line.
InsideArea InsideArea Tick marks are drawn inside the chart area.
OutsideArea OutsideArea Tick marks are drawn outside the chart area.
Title Title Class
Represents a title for the entire chart image.
D eclaration
public class Title : System.Windows.Forms.DataVisualization.Charting.ChartNamedElement,
IDisposable
type Title = class
inherit ChartNamedElement
interface IDisposable
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
Remarks
The Title class encapsulates all the functionality of a title for the Chart control. This class is exposed using the Titles
collection property of the root Chart object.
There can be any number of titles for an entire chart image.
Titles are able to:
Be docked and aligned or custom-positioned.
Be displayed inside or outside the plotted chart areas.
Use a predefined TextStyle such as Embed or Shadow.
Use hatching, gradient colors and background images.
Be sized and positioned anywhere within the chart image.
Constructors
Title()
Title()
Title(String)
Title(String)
Initializes a new instance of the Title class with the specified title text.
Title(String, Docking)
Title(String, Docking)
Initializes a new instance of the Title class with the specified title text and docking value.
Title(String, Docking, Font, Color)
Title(String, Docking, Font, Color)
Initializes a new instance of the Title class with the specified title text, docking value, font and color.
Properties
Alignment
Alignment
BackColor
BackColor
BackGradientStyle
BackGradientStyle
Gets or sets the orientation for the background gradient of a title. Also determines whether a gradient is used.
BackHatchStyle
BackHatchStyle
BackImage
BackImage
BackImageAlignment
BackImageAlignment
BackImageTransparentColor
BackImageTransparentColor
Gets or sets a color that will be drawn as transparent when the background image is drawn.
BackImageWrapMode
BackImageWrapMode
Gets or sets the drawing mode for the background image of the title.
BackSecondaryColor
BackSecondaryColor
BorderColor
BorderColor
BorderDashStyle
BorderDashStyle
BorderWidth
BorderWidth
DockedToChartArea
DockedToChartArea
Gets or sets the name of the ChartArea where the title will be docked.
Docking
Docking
DockingOffset
DockingOffset
Gets or sets the positive or negative offset of the docked title position.
Font
Font
ForeColor
ForeColor
Gets or sets a flag that specifies whether the title should be docked within a ChartArea object.
Name
Name
Position
Position
Gets or sets an ElementPosition object, which can be used to get or set the position of the title.
ShadowColor
ShadowColor
ShadowOffset
ShadowOffset
Text
Text
TextOrientation
TextOrientation
TextStyle
TextStyle
ToolTip
ToolTip
Methods
Dispose(Boolean)
Dispose(Boolean)
Releases the unmanaged resources used by the Title and optionally releases the managed resources.
Title.Alignment Title.Alignment
I n this Article
Gets or sets the alignment of the title.
[System.ComponentModel.Bindable(true)]
public System.Drawing.ContentAlignment Alignment { get; set; }
member this.Alignment : System.Drawing.ContentAlignment with get, set
Returns
ContentAlignment ContentAlignment
A ContentAlignment enumeration value that represents the title alignment within the text drawing area. The default
value is MiddleCenter.
Attributes BindableAttribute
Remarks
The Alignment property has no effect on alignment if the Position property is not set to Auto.
Title.BackColor Title.BackColor
I n this Article
Gets or sets the background color of the title.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BackColor { get; set; }
member this.BackColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that represents the background color of the title. The default color is White.
Attributes BindableAttribute TypeConverterAttribute
Remarks
You can set this property to any valid ARGB (alpha, red, green, blue) value.
The BackColor value will be the first color used if you have specified gradient colors for the background.
The alpha value controls the opacity of a color. If you set this color to "transparent" - that is, if you use an alpha value of
0 - no color will be assigned to the background of the title. As a result, the background will be transparent.
Title.BackGradientStyle Title.BackGradientStyle
I n this Article
Gets or sets the orientation for the background gradient of a title. Also determines whether a gradient is used.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.GradientStyle BackGradientStyle { get; set; }
member this.BackGradientStyle : System.Windows.Forms.DataVisualization.Charting.GradientStyle with
get, set
Returns
GradientStyle GradientStyle
A GradientStyle enumeration that represents the orientation for the background gradient of a title. The default value is
None.
Attributes BindableAttribute
Remarks
Use the BackGradientStyle property to determine whether a title will display a gradient, and to determine the
orientation of the gradient if one is used.
For a listing of available patterns, refer to the GradientStyle enumeration.
To use gradient colors:
Set the primary color of the title background with the BackColor property.
Set the secondary color of the title background with the BackSecondaryColor property.
Set this BackGradientStyle property to the desired gradient style.
Title.BackHatchStyle Title.BackHatchStyle
I n this Article
Gets or sets the hatching style for the title.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle BackHatchStyle { get; set; }
member this.BackHatchStyle : System.Windows.Forms.DataVisualization.Charting.ChartHatchStyle with
get, set
Returns
ChartHatchStyle ChartHatchStyle
A ChartHatchStyle enumeration that specifies the hatching style for the title. The default value is None.
Attributes BindableAttribute
Remarks
The ChartHatchStyle enumeration specifies the hatch pattern used by a brush of type HatchBrush. The hatch pattern
consists of a solid background color and lines drawn over the background.
For a listing of available hatching styles, refer to the ChartHatchStyle enumeration.
Note The color of hatching lines is determined by the BackSecondaryColor property.
Title.BackImage Title.BackImage
I n this Article
Gets or sets the background image of the title.
[System.ComponentModel.Bindable(true)]
public string BackImage { get; set; }
member this.BackImage : string with get, set
Returns
String String
A string value that represents the URL of an image file. The default is an empty string.
Attributes BindableAttribute
Remarks
This property defines a path to a background image for a Chart title, and can be an absolute or relative URL.
To position the image, use the BackImageAlignment and BackImageWrapMode properties.
You can also specify one of the colors displayed by the image as "transparent", by setting the
BackImageTransparentColor property.
An image be any valid graphics file supported by .NET Framework, including icons.
Background images take precedence over other background properties such as gradient color.
Title.BackImageAlignment Title.BackImageAlignment
I n this Article
Gets or sets the alignment of the title background image.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartImageAlignmentStyle BackImageAlignment {
get; set; }
member this.BackImageAlignment :
System.Windows.Forms.DataVisualization.Charting.ChartImageAlignmentStyle with get, set
Returns
ChartImageAlignmentStyle ChartImageAlignmentStyle
A ChartImageAlignmentStyle enumeration value that specifies the alignment of the title background image. The
default value is TopLeft.
Attributes BindableAttribute
Remarks
This property is used when the BackImageWrapMode property is set to Unscaled.
Title.BackImageTransparentColor Title.BackImage
TransparentColor
I n this Article
Gets or sets a color that will be drawn as transparent when the background image is drawn.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BackImageTransparentColor { get; set; }
member this.BackImageTransparentColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that specifies the color that will be drawn as transparent when the background image is drawn. The
default value is Empty.
Attributes BindableAttribute TypeConverterAttribute
Remarks
This color will be displayed as transparent when the chart is rendered.
Title.BackImageWrapMode Title.BackImageWrapMode
I n this Article
Gets or sets the drawing mode for the background image of the title.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartImageWrapMode BackImageWrapMode { get;
set; }
member this.BackImageWrapMode : System.Windows.Forms.DataVisualization.Charting.ChartImageWrapMode
with get, set
Returns
ChartImageWrapMode ChartImageWrapMode
A ChartImageWrapMode enumeration value that specifies the drawing mode for the background image of the title.
The default value is Tile.
Attributes BindableAttribute
Remarks
The BackImageWrapMode property determines how the image is displayed; the image can be tiled, scaled, and so
forth.
If an image is scaled, it will be stretched to fit within the bounds of the title. If the image is tiled, it is repeatedly drawn,
starting from the top-left corner of the title.
For more information about the available wrapping modes, see the ChartImageWrapMode enumeration topic.
If the BackImageWrapMode property is set to Unscaled, the location where the image is drawn is determined by the
BackImageAlignment property setting.
Title.BackSecondaryColor Title.BackSecondaryColor
I n this Article
Gets or sets the secondary color of the title background.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BackSecondaryColor { get; set; }
member this.BackSecondaryColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value used for the secondary color of a background with hatching or gradient fill. The default value is Empty.
Attributes BindableAttribute TypeConverterAttribute
Remarks
This BackSecondaryColor property is one of several related properties that determine the secondary background color
of Chart objects, and is used when gradient colors are being applied.
You can set BackSecondaryColor to any valid ARGB (alpha, red, green, blue) value.
If hatching is used, the BackSecondaryColor property determines the color of the hatching lines for the title.
To use gradient colors for the background of a title:
Set the primary color with the BackColor property.
Set the secondary color with the BackSecondaryColor property.
Set the BackGradientStyle property to the desired gradient style.
Title.BorderColor Title.BorderColor
I n this Article
Gets or sets the border color of the title.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color BorderColor { get; set; }
member this.BorderColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that specifies the border color of the title. The default color is Empty.
Attributes BindableAttribute TypeConverterAttribute
Remarks
You can set the BorderColor property to any valid ARGB (alpha, red, green, blue) value.
Title.BorderDashStyle Title.BorderDashStyle
I n this Article
Gets or sets the border style of the title.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.ChartDashStyle BorderDashStyle { get; set; }
member this.BorderDashStyle : System.Windows.Forms.DataVisualization.Charting.ChartDashStyle with
get, set
Returns
ChartDashStyle ChartDashStyle
A ChartDashStyle enumeration value that determines the border style of the title.
Attributes BindableAttribute
Remarks
The BorderDashStyle property determines the line style to use for a border. The line can be solid, dotted, and so forth.
For other border styles, see the ChartDashStyle enumeration topic.
Title.BorderWidth Title.BorderWidth
I n this Article
Gets or sets the border width of the title.
[System.ComponentModel.Bindable(true)]
public int BorderWidth { get; set; }
member this.BorderWidth : int with get, set
Returns
Int32 Int32
An integer value that determines the border width, in pixels, of the title.
Attributes BindableAttribute
Title.Dispose Title.Dispose
I n this Article
Releases the unmanaged resources used by the Title and optionally releases the managed resources.
protected override void Dispose (bool disposing);
override this.Dispose : bool -> unit
Parameters
disposing Boolean Boolean
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Title.DockedToChartArea Title.DockedToChartArea
I n this Article
Gets or sets the name of the ChartArea where the title will be docked.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.LegendAr
eaNameConverter))]
public string DockedToChartArea { get; set; }
member this.DockedToChartArea : string with get, set
Returns
String String
A string value that represents the name of the ChartArea where this title will be docked. The default value is the
empty string.
Attributes BindableAttribute TypeConverterAttribute
Title.Docking Title.Docking
I n this Article
Gets or sets a value that determines where the title is docked.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.Docking Docking { get; set; }
member this.Docking : System.Windows.Forms.DataVisualization.Charting.Docking with get, set
Returns
Docking Docking
A Docking enumeration value that determines where the title is docked. The default value is Top.
Attributes BindableAttribute
Remarks
The Title can be docked to the top, left, bottom or right of either the entire chart image, or the inside or outside of a
chart area. If the IsDockedInsideChartArea property is set to false , docking applies to the entire chart image. If the
IsDockedInsideChartArea property is set to true , docking applies to the ChartArea object specified by the
DockedToChartArea property
This property has no effect if the Position property is not set to Auto.
Title.DockingOffset Title.DockingOffset
I n this Article
Gets or sets the positive or negative offset of the docked title position.
[System.ComponentModel.Bindable(true)]
public int DockingOffset { get; set; }
member this.DockingOffset : int with get, set
Returns
Int32 Int32
An integer value that specifies the positive or negative offset of the docked title position.
Attributes BindableAttribute
Title.Font Title.Font
I n this Article
Gets or sets the font for the title.
[System.ComponentModel.Bindable(true)]
public System.Drawing.Font Font { get; set; }
member this.Font : System.Drawing.Font with get, set
Returns
Font Font
A Font object that represents the font for the title. Defaults to "Microsoft Sans Serif, 8pt".
Attributes BindableAttribute
Remarks
Use a new Font object when setting this property. Assign the entire object to the property.
Title.ForeColor Title.ForeColor
I n this Article
Gets or sets the color of the title text.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color ForeColor { get; set; }
member this.ForeColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that is used to draw the color of the title text .
Attributes BindableAttribute TypeConverterAttribute
Remarks
The ForeColor property is used to set the title text color.
Title.IsDockedInsideChartArea Title.IsDockedInsideChart
Area
I n this Article
Gets or sets a flag that specifies whether the title should be docked within a ChartArea object.
[System.ComponentModel.Bindable(true)]
public bool IsDockedInsideChartArea { get; set; }
member this.IsDockedInsideChartArea : bool with get, set
Returns
Boolean Boolean
true if the title will be docked within a chart area; false if the title will be docked outside the chart area. The default
value is false .
Attributes BindableAttribute
Remarks
If the IsDockedInsideChartArea property is set to false , the title is docked to the outside edge of the plotted chart
areas; if this property is set to true , the title will be docked to the inside edge of the chart area. This property will have
no effect if the name of a ChartArea object is not assigned to the DockedToChartArea property.
Note This behavior only applies if the Position property is set to Auto. If this is not the case, setting the
IsDockedInsideChartArea property has no effect, because the position of the title is then determined by the Position
property value.
Title.Name Title.Name
I n this Article
Gets or sets the unique name of a Title object.
[System.ComponentModel.Bindable(true)]
public override string Name { get; set; }
member this.Name : string with get, set
Returns
String String
A string value that represents the unique name of the title object.
Attributes BindableAttribute
Remarks
The name of a title object must be unique; otherwise an exception will be thrown.
This property can be used as the indexer when you retrieve a Title object from the TitleCollection object.
If this property is set to a zero-length string, an exception will be thrown.
Title.Position Title.Position
I n this Article
Gets or sets an ElementPosition object, which can be used to get or set the position of the title.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.ElementP
ositionConverter))]
public System.Windows.Forms.DataVisualization.Charting.ElementPosition Position { get; set; }
member this.Position : System.Windows.Forms.DataVisualization.Charting.ElementPosition with get, set
Returns
ElementPosition ElementPosition
An ElementPosition value that represents the position of the title. The default value is Auto.
Attributes BindableAttribute TypeConverterAttribute
Remarks
If the Position property is automatic (that is, Title.Position.Auto = true ) the title position is calculated automatically by
the Chart control, taking into account the Docking, Alignment and IsDockedInsideChartArea property settings.
If it is not automatic, the Docking, DockedToChartArea and IsDockedInsideChartArea properties are ignored, and the
title position is solely determined by the value of the returned ElementPosition object.
Title.ShadowColor Title.ShadowColor
I n this Article
Gets or sets the shadow color for the title.
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ColorConverter))]
public System.Drawing.Color ShadowColor { get; set; }
member this.ShadowColor : System.Drawing.Color with get, set
Returns
Color Color
A Color value that specifies the shadow color for the title. The default color is Black.
Attributes BindableAttribute TypeConverterAttribute
Remarks
This property can be set to any valid ARGB (alpha, red, green, blue) value.
The alpha value can be used to achieve a "realistic" shadowing effect; try a color value of "128,0,0,0" for shadows.
To implement a shadow, set the ShadowOffset property to a value other than zero (0).
Title.ShadowOffset Title.ShadowOffset
I n this Article
Gets or sets the shadow offset, in pixels, of the title.
[System.ComponentModel.Bindable(true)]
public int ShadowOffset { get; set; }
member this.ShadowOffset : int with get, set
Returns
Int32 Int32
An integer value that represents the shadow offset, in pixels, of the title.
Attributes BindableAttribute
Remarks
To implement shadowing, set this property to a value other than zero (0). A positive value will result in a shadow that
shifts down and to the right; a negative value will result in a shadow that shifts up and to the left.
Title.Text Title.Text
I n this Article
Gets or sets the text for the title.
[System.ComponentModel.Bindable(true)]
public string Text { get; set; }
member this.Text : string with get, set
Returns
String String
A string value that represents the text for the title.
Attributes BindableAttribute
Title.TextOrientation Title.TextOrientation
I n this Article
Gets or sets the orientation of the text in the title.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.TextOrientation TextOrientation { get; set; }
member this.TextOrientation : System.Windows.Forms.DataVisualization.Charting.TextOrientation with
get, set
Returns
TextOrientation TextOrientation
A TextOrientation enumeration value that determines the orientation of the text in the title.
Attributes BindableAttribute
Title.TextStyle Title.TextStyle
I n this Article
Gets or sets the style of the text for the title.
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.TextStyle TextStyle { get; set; }
member this.TextStyle : System.Windows.Forms.DataVisualization.Charting.TextStyle with get, set
Returns
TextStyle TextStyle
A TextStyle enumeration value that determines the style of the text for the title. The default value is Default.
Attributes BindableAttribute
Remarks
There are five possible styles for title text: Default, Shadow, Emboss, Embed, and Frame. Refer to the table below for a
summary of these styles:
S T YLE D ES CR IPTIO N
Default Text is displayed using the desired font and color, with no
additional effects.
Shadow Text is displayed using the desired font and color with an
added shadow effect on the text.
Emboss Text is displayed using the desired font and color but drawn
with an embossing effect.
Embed Text is displayed using the desired font and color but drawn
with an embedding effect.
Frame Text is displayed using the desired font and color but drawn as
an outline of the text, that is, with no fill.
Title Title
I n this Article
Overloads
Title()
Initializes a new instance of the Title class.
Title(String) Title(String)
Initializes a new instance of the Title class with the specified
title text.
Title()
Initializes a new instance of the Title class.
public Title ();
Title(String) Title(String)
Initializes a new instance of the Title class with the specified title text.
public Title (string text);
new System.Windows.Forms.DataVisualization.Charting.Title : string ->
System.Windows.Forms.DataVisualization.Charting.Title
Parameters
text String String
The text for the title.
Parameters
text String String
The text for the title.
docking Docking Docking
A Docking enumeration value that determines where the title will be docked on the chart.
Parameters
text String String
The text for the title.
docking Docking Docking
A Docking enumeration value that determines where the title will be docked on the chart.
font Font Font
The title font.
color Color Color
The title color.
Title.ToolTip Title.ToolTip
I n this Article
Gets or sets the tooltip for the title.
[System.ComponentModel.Bindable(true)]
public string ToolTip { get; set; }
member this.ToolTip : string with get, set
Returns
String String
A string value that represents the tooltip for the title.
Attributes BindableAttribute
Title.Visible Title.Visible
I n this Article
Gets or sets the visibility flag of the title.
public virtual bool Visible { get; set; }
member this.Visible : bool with get, set
Returns
Boolean Boolean
true if the title is visible; otherwise, false .
TitleCollection TitleCollection Class
Represents a collection of Title objects.
D eclaration
public class TitleCollection :
System.Windows.Forms.DataVisualization.Charting.ChartNamedElementCollection<System.Windows.Forms
.DataVisualization.Charting.Title>
type TitleCollection = class
inherit ChartNamedElementCollection<Title>
I nheritance H ierarchy
Object Object
Collection<T> Collection<T>
ChartElementCollection<T> ChartElementCollection<T>
ChartNamedElementCollection<T> ChartNamedElementCollection<T>
Remarks
The TitleCollection class is implemented as the Titles collection property of the root Chart object.
Title objects can be appended, inserted or removed from the collection at design time and run time.
Methods
Add(String)
Add(String)
Adds a Title object with the specified name to the end of the collection.
TitleCollection.Add TitleCollection.Add
I n this Article
Adds a Title object with the specified name to the end of the collection.
public System.Windows.Forms.DataVisualization.Charting.Title Add (string name);
override this.Add : string -> System.Windows.Forms.DataVisualization.Charting.Title
Parameters
name String String
The name of the title to add to the collection.
Returns
Title Title
Index of the added object.
Remarks
A string value that represents the zero-based index of the added title.
ToolTipEventArgs ToolTipEventArgs Class
Used as a parameter object in the GetToolTipText event of the root Chart object.
D eclaration
public class ToolTipEventArgs : EventArgs
type ToolTipEventArgs = class
inherit EventArgs
I nheritance H ierarchy
Object Object
EventArgs EventArgs
Remarks
This class is exposed as the e parameter in the GetToolTipText event, and provides the mouse position, tooltip text, if
any, and details about the chart element over which the mouse cursor is held when the event is raised.
The GetToolTipText event is raised several seconds after the mouse cursor is held over a relevant chart element.
The ToolTipEventArgs class contains the following properties:
The X and Y properties, which are used to get the mouse coordinates.
The Text property, which is used to get the tooltip for the chart element that the event is raised for. Note that many of
the chart elements have a ToolTip , LegendToolTip , and/or LabelToolTip property that you can use to assign a
tooltip. These elements include legends, annotations, data points, series, axes, titles, custom labels, and strip lines. This
property can also be used to override the tooltip for a chart element, or to set a tooltip for a chart element that doesn't
have a ToolTip property.
The HitTestResult property, which provides information on the chart element for which the event was raised.
Constructors
ToolTipEventArgs(Int32, Int32, String, HitTestResult)
ToolTipEventArgs(Int32, Int32, String, HitTestResult)
Initializes a new instance of the ToolTipEventArgs class with the specified x , y , text and result parameters.
Properties
HitTestResult
HitTestResult
Gets a HitTestResult object, which provides information about the chart element that the GetToolTipText event was
raised for.
Text
Text
Gets or sets the tooltip, if any, of the chart element over which the mouse cursor is held. This property can also set
a tooltip for this chart element.
X
X
Gets the X coordinate of the point the mouse cursor is held over when the GetToolTipText event is raised.
Y
Y
Gets the Y coordinate of the point the mouse cursor is held over when the GetToolTipText event is raised.
ToolTipEventArgs.HitTestResult ToolTipEventArgs.HitTest
Result
I n this Article
Gets a HitTestResult object, which provides information about the chart element that the GetToolTipText event was
raised for.
public System.Windows.Forms.DataVisualization.Charting.HitTestResult HitTestResult { get; }
member this.HitTestResult : System.Windows.Forms.DataVisualization.Charting.HitTestResult
Returns
HitTestResult HitTestResult
A HitTestResult object that represents information for the element the GetToolTipText event was raised for.
Remarks
This property is exposed in the GetToolTipText event of the root Chart object.
The HitTestResult property can be used to get the object the event was raised for, the type of the chart element the
event was raised for, and so forth. For further details, see the HitTestResult class overview.
ToolTipEventArgs.Text ToolTipEventArgs.Text
I n this Article
Gets or sets the tooltip, if any, of the chart element over which the mouse cursor is held. This property can also set a
tooltip for this chart element.
Returns
String String
A string value that represents the tooltip text of the element the GetToolTipText event was raised for.
Remarks
This property is exposed in the GetToolTipText event of the root Chart object.
The Text property, which is used to get the tooltip for the chart element that the event is raised for. Note that many of
the chart elements have a ToolTip , LegendToolTip , and/or LabelToolTip property that you can use to assign a
tooltip. These elements include legends, annotations, data points, series, axes, titles, custom labels, and strip lines.
If you get this property, it will always return a zero-length string for any chart element items that do not have a tooltip.
You can set this property to:
Override the tooltip for any of the chart elements capable of assigning tooltips.
Assign a tooltip to a chart element that does not support tooltips.
ToolTipEventArgs ToolTipEventArgs
I n this Article
Initializes a new instance of the ToolTipEventArgs class with the specified x , y , text and result parameters.
Parameters
x Int32 Int32
X-coordinate of mouse.
y Int32 Int32
Y -coordinate of mouse.
text String String
The tooltip text.
result HitTestResult HitTestResult
The HitTestResult object.
ToolTipEventArgs.X ToolTipEventArgs.X
I n this Article
Gets the X coordinate of the point the mouse cursor is held over when the GetToolTipText event is raised.
public int X { get; }
member this.X : int
Returns
Int32 Int32
An integer value that represents the X coordinate of the mouse cursor.
Remarks
This property is exposed in the GetToolTipText event of the root Chart object.
Use the X property to get the X screen coordinate of the point the mouse cursor is held over when the GetToolTipText
event is raised.
Note that the X coordinate is measured in pixels; the point (0,0) corresponds to the top-left corner of the chart.
ToolTipEventArgs.Y ToolTipEventArgs.Y
I n this Article
Gets the Y coordinate of the point the mouse cursor is held over when the GetToolTipText event is raised.
public int Y { get; }
member this.Y : int
Returns
Int32 Int32
An integer that represents the Y coordinate of the mouse cursor.
Remarks
This property is exposed in the GetToolTipText event of the root Chart object.
Use the Y property to get the Y screen coordinate of the point the mouse cursor is held over when the GetToolTipText
event is raised.
Note that the Y coordinate is measured in pixels; the point (0,0) corresponds to the top-left corner of the chart.
TTestResult TTestResult Class
Stores the results of a T Test statistical formula.
D eclaration
public class TTestResult
type TTestResult = class
I nheritance H ierarchy
Object Object
Constructors
TTestResult()
TTestResult()
Properties
DegreeOfFreedom
DegreeOfFreedom
FirstSeriesMean
FirstSeriesMean
FirstSeriesVariance
FirstSeriesVariance
ProbabilityTOneTail
ProbabilityTOneTail
ProbabilityTTwoTail
ProbabilityTTwoTail
SecondSeriesVariance
SecondSeriesVariance
TCriticalValueOneTail
TCriticalValueOneTail
TCriticalValueTwoTail
TCriticalValueTwoTail
TValue
TValue
Returns
Double Double
A double value.
TTestResult.FirstSeriesMean TTestResult.FirstSeriesMean
I n this Article
Gets the mean of the first series.
public double FirstSeriesMean { get; }
member this.FirstSeriesMean : double
Returns
Double Double
A double value.
TTestResult.FirstSeriesVariance TTestResult.FirstSeries
Variance
I n this Article
Gets the variance of the first series.
Returns
Double Double
A double value.
TTestResult.ProbabilityTOneTail TTestResult.Probability
TOneTail
I n this Article
Gets the Probability T one tail value.
Returns
Double Double
A double value.
TTestResult.ProbabilityTTwoTail TTestResult.Probability
TTwoTail
I n this Article
Gets the Probability T two tail value.
Returns
Double Double
A double value.
TTestResult.SecondSeriesMean TTestResult.SecondSeries
Mean
I n this Article
Gets the mean of the second series.
Returns
Double Double
A double value.
TTestResult.SecondSeriesVariance TTestResult.Second
SeriesVariance
I n this Article
Gets the variance of the second series.
Returns
Double Double
A double value.
TTestResult.TCriticalValueOneTail TTestResult.TCritical
ValueOneTail
I n this Article
Gets the Critical T one tail value.
Returns
Double Double
A double value.
TTestResult.TCriticalValueTwoTail TTestResult.TCritical
ValueTwoTail
I n this Article
Gets the Critical T two tail value.
Returns
Double Double
A double value.
TTestResult
I n this Article
Initializes a new instance of the TTestResult class.
public TTestResult ();
TTestResult.TValue TTestResult.TValue
I n this Article
Gets the T value.
public double TValue { get; }
member this.TValue : double
Returns
Double Double
A double value.
VerticalLineAnnotation VerticalLineAnnotation Class
Represents a vertical line annotation.
D eclaration
public class VerticalLineAnnotation :
System.Windows.Forms.DataVisualization.Charting.LineAnnotation
type VerticalLineAnnotation = class
inherit LineAnnotation
I nheritance H ierarchy
Object Object
ChartElement ChartElement
ChartNamedElement ChartNamedElement
Annotation Annotation
LineAnnotation LineAnnotation
Constructors
VerticalLineAnnotation()
VerticalLineAnnotation()
Properties
AnnotationType
AnnotationType
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
public override string AnnotationType { get; }
member this.AnnotationType : string
Returns
String String
The annotation type.
Attributes BindableAttribute BrowsableAttribute
VerticalLineAnnotation
I n this Article
Initializes a new instance of the VerticalLineAnnotation class.
public VerticalLineAnnotation ();
ViewEventArgs ViewEventArgs Class
Provides event data that is used as a parameter object in the AxisViewChanged and AxisViewChanging events of the
root Chart object.
D eclaration
public class ViewEventArgs : EventArgs
type ViewEventArgs = class
inherit EventArgs
I nheritance H ierarchy
Object Object
EventArgs EventArgs
Remarks
This class is exposed as the e parameter in the AxisViewChanged and AxisViewChanging events. The
AxisViewChanging event is raised just before a new view is displayed, as a result of the end-user clicking and dragging
in a chart area. The AxisViewChanged event is raised just after the new view is created.
It is important to note that the position and size of a view cannot be set in the AxisViewChanged event because in this
case the view is already created.
The ViewEventArgs class contains the following properties:
The ChartArea property, which is used to get the ChartArea object in which the view is being displayed. The Name
property gets the name of the chart area. Other chart area properties can also be set.
The Axis property, which is used to get the Axis object with which the view is associated. To determine the type of axis,
which can be X, Y, X2 or Y2, use the AxisName property. Other axis properties can also be set.
The NewPosition property, which represents the new position of a view.
The NewSize property, which represents the new size of a view.
The NewSizeType property, which represents the unit of measurement for the size of a view.
Constructors
ViewEventArgs(Axis, Double)
ViewEventArgs(Axis, Double)
Initializes a new instance of the ViewEventArgs class with the specified axis and newPosition parameters.
Initializes a new instance of the ViewEventArgs class with the specified axis , newPosition , newSize and
newSizeType parameters.
Properties
Axis
Axis
ChartArea
ChartArea
NewPosition
NewPosition
NewSize
NewSize
NewSizeType
NewSizeType
Returns
Axis Axis
An Axis object that represents the axis that a view belongs to.
Remarks
This property is exposed in the AxisViewChanged and AxisViewChanging events of the root Chart object.
This property can be used to:
Determine the type of axis - X, X2, Y or Y2 - that the event is being raised for, using the AxisName property.
Get and set axis properties, such as LineColor.
ViewEventArgs.ChartArea ViewEventArgs.ChartArea
I n this Article
Gets the ChartArea object that a view belongs to.
public System.Windows.Forms.DataVisualization.Charting.ChartArea ChartArea { get; }
member this.ChartArea : System.Windows.Forms.DataVisualization.Charting.ChartArea
Returns
ChartArea ChartArea
A ChartArea object that represents the chart area a view belongs to.
Remarks
This property is exposed in the AxisViewChanged and AxisViewChanging events of the root Chart object.
The ChartArea property can be used to determine the chart area that the view belongs to, by accessing the Name
property. This property can also be used to get and set chart area properties.
ViewEventArgs.NewPosition ViewEventArgs.NewPosition
I n this Article
Gets the new position of a view along an axis.
public double NewPosition { get; set; }
member this.NewPosition : double with get, set
Returns
Double Double
A double value that represents the position of a view along an axis, which is either the bottom of a vertical view or the
left position of a horizontal view.
Remarks
This property is exposed in the AxisViewChanged and AxisViewChanging events of the root Chart object, and
represents the new position of a view.
The NewPosition property can be set to a new value in the AxisViewChanging event, but cannot be set to a new value
for the AxisViewChanged event because in this case the view is already created.
The NewPosition is always measured as an axis value.
ViewEventArgs.NewSize ViewEventArgs.NewSize
I n this Article
Gets or sets the size of a view along an axis.
public double NewSize { get; set; }
member this.NewSize : double with get, set
Returns
Double Double
A double value that represents the size of a view along an axis. The size is either the height of the vertical view or the
width of the horizontal view.
ViewEventArgs.NewSizeType ViewEventArgs.NewSize
Type
I n this Article
Gets the unit of measurement for the new size of a view.
Returns
DateTimeIntervalType DateTimeIntervalType
A DateTimeIntervalType enumeration value that represents the unit of measurement for the NewSize property, which
represents the width or height of a data view. The default value is Auto.
Remarks
When this property is set to Auto, the unit of measurement for the NewSize property is automatically determined by
the Chart control, and will be either a number or a day.
Recall that the NewSize property is always measured as an axis value. Make sure that if you explicitly set the size type,
the type matches the axis that the scrollbar belongs to. In other words, do not specify Minutes if the axis does not use
DateTime values.
Note that the NewSize property can be set to a new value in the AxisViewChanging event, but cannot be set to a new
value for the AxisViewChanged event because the view is already created.
ViewEventArgs ViewEventArgs
I n this Article
Overloads
ViewEventArgs(Axis, Double) ViewEventArgs(Axis, Double)
Initializes a new instance of the ViewEventArgs class with the
specified axis and newPosition parameters.
Parameters
axis Axis Axis
The axis of the scale view.
newPosition Double Double
The start position of the new scale view.
Parameters
axis Axis Axis
The axis of the scale view.
newPosition Double Double
The start position of the new scale view.
newSize Double Double
The new scale view size.
newSizeType DateTimeIntervalType DateTimeIntervalType
The unit of measurement for the size of the new scale view.
ZTestResult ZTestResult Class
Stores the results of a Z Test statistical formula.
D eclaration
public class ZTestResult
type ZTestResult = class
I nheritance H ierarchy
Object Object
Constructors
ZTestResult()
ZTestResult()
Properties
FirstSeriesMean
FirstSeriesMean
FirstSeriesVariance
FirstSeriesVariance
ProbabilityZOneTail
ProbabilityZOneTail
ProbabilityZTwoTail
ProbabilityZTwoTail
SecondSeriesMean
SecondSeriesMean
ZCriticalValueOneTail
ZCriticalValueOneTail
ZCriticalValueTwoTail
ZCriticalValueTwoTail
ZValue
ZValue
Returns
Double Double
A double value.
ZTestResult.FirstSeriesVariance ZTestResult.FirstSeries
Variance
I n this Article
Gets the variance of the first series.
Returns
Double Double
A double value.
ZTestResult.ProbabilityZOneTail ZTestResult.Probability
ZOneTail
I n this Article
Gets the Probability Z one tail value.
Returns
Double Double
A double value.
ZTestResult.ProbabilityZTwoTail ZTestResult.Probability
ZTwoTail
I n this Article
Gets the Probability Z two tail value.
Returns
Double Double
A double value.
ZTestResult.SecondSeriesMean ZTestResult.SecondSeries
Mean
I n this Article
Gets the mean of the second series.
Returns
Double Double
A double value.
ZTestResult.SecondSeriesVariance ZTestResult.Second
SeriesVariance
I n this Article
Gets the variance of the second series.
Returns
Double Double
A double value.
ZTestResult.ZCriticalValueOneTail ZTestResult.ZCritical
ValueOneTail
I n this Article
Gets the Critical Z one tail value.
Returns
Double Double
A double value.
ZTestResult.ZCriticalValueTwoTail ZTestResult.ZCritical
ValueTwoTail
I n this Article
Gets the Critical Z two tail value.
Returns
Double Double
A double value.
ZTestResult
I n this Article
Initializes a new instance of the ZTestResult class.
public ZTestResult ();
ZTestResult.ZValue ZTestResult.ZValue
I n this Article
Gets the Z value.
public double ZValue { get; }
member this.ZValue : double
Returns
Double Double
A double value.