Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ChartGraphics Class

Provides numerous conversion functions and exposes a GDI+ Graphics object.

System.Object
  System.Web.UI.DataVisualization.Charting.ChartElement
    System.Web.UI.DataVisualization.Charting.ChartGraphics

Namespace:  System.Web.UI.DataVisualization.Charting
Assembly:  System.Web.DataVisualization (in System.Web.DataVisualization.dll)
public class ChartGraphics : ChartElement

The ChartGraphics type exposes the following members.

  NameDescription
Public propertyGraphicsGets or sets a GDI+ Graphics object that can be used for drawing purposes.
Public propertyTagGets or sets an object associated with this chart element. (Inherited from ChartElement.)
Top
  NameDescription
Public methodDispose()Releases the resources used by the ChartElement. (Inherited from ChartElement.)
Protected methodDispose(Boolean)Releases unmanaged and, optionally, managed resources. (Overrides ChartElement.Dispose(Boolean).)
Public methodEqualsDetermines whether the specified Object is equal to the current ChartElement. (Inherited from ChartElement.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetAbsolutePointTakes a PointF object and converts its relative coordinates to absolute coordinates.
Public methodGetAbsoluteRectangleTakes a RectangleF object and converts its relative coordinates to absolute coordinates.
Public methodGetAbsoluteSizeTakes a SizeF object that uses relative coordinates and returns a SizeF object that uses absolute coordinates.
Public methodGetHashCodeReturns a hash function for a particular type. (Inherited from ChartElement.)
Public methodGetPositionFromAxisTakes a given axis value for a specified axis and returns the relative pixel value.
Public methodGetRelativePointTakes a PointF object that uses absolute coordinates and returns a PointF object that uses relative coordinates.
Public methodGetRelativeRectangleTakes a RectangleF structure that is using absolute coordinates and returns a RectangleF object that uses relative coordinates.
Public methodGetRelativeSizeTakes a SizeF object in absolute coordinates and returns a SizeF object that uses relative coordinates.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current Object. (Inherited from ChartElement.)
Top

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 ChartPaintEventArgsclass, which makes it easy to perform custom drawing in the PrePaint and PostPaint events.

Important noteImportant

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.

.NET Framework

Supported in: 4.5.1, 4.5, 4

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.