C# Класс System.Drawing.PieChart.PieChart3D

Object representing a pie chart.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
m_edgeColorType EdgeColorType
m_edgeLineWidth float
m_fitToBoundingRectangle bool
m_font System.Drawing.Font
m_foreColor Color
m_heightBoundingRect float
m_highlightedIndex int
m_initialAngle float
m_pieSlices System.Drawing.PieChart.PieSlice[]
m_pieSlicesMapping System.Collections.ArrayList
m_shadowStyle ShadowStyle
m_sliceColors Color[]
m_sliceRelativeDisplacements float[]
m_sliceRelativeHeight float
m_texts string[]
m_values decimal[]
m_widthBoundingRect float
m_xBoundingRect float
m_yBoundingRect float

Открытые методы

Метод Описание
Dispose ( ) : void

Disposes of all pie slices.

Draw ( Graphics graphics ) : void

Draws the chart.

FindPieSliceUnderPoint ( PointF point ) : int

Searches the chart to find the index of the pie slice which contains point given. Search order goes in the direction opposite to drawing order.

PieChart3D ( RectangleF boundingRectangle, decimal values, Color sliceColors, float sliceRelativeHeight ) : System

Initializes a new instance of PieChart3D with given bounds, array of values and corresponding colors.

PieChart3D ( RectangleF boundingRectangle, decimal values, float sliceRelativeHeight ) : System

Initializes a new instance of PieChart3D with given bounds, array of values and pie slice thickness.

PieChart3D ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, decimal values ) : System

Initializes an instance of a flat PieChart3D with specified bounds, values to chart and relative thickness.

PieChart3D ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, decimal values, Color sliceColors, float sliceRelativeHeight ) : System

Initializes a new instance of PieChart3D with given bounds, array of values and relative pie slice height.

PieChart3D ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, decimal values, Color sliceColors, float sliceRelativeHeight, string texts ) : System

Initializes a new instance of PieChart3D with given bounds, array of values and relative pie slice height.

PieChart3D ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, decimal values, float sliceRelativeHeight ) : System

Initializes an instance of PieChart3D with specified bounds, values to chart and relative thickness.

PieChart3D ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, decimal values, float sliceRelativeHeight, string texts ) : System

Initializes a new instance of PieChart3D with given bounds, array of values and relative pie slice height.

PlaceTexts ( Graphics graphics ) : void

Draws strings by individual slices. Position of the text is calculated by overridable GetTextPosition method of the PieSlice type.

Защищенные методы

Метод Описание
CreatePieSlice ( float boundingRectLeft, float boundingRectTop, float boundingRectWidth, float boundingRectHeight, float sliceHeight, float startAngle, float sweepAngle, Color color, ShadowStyle shadowStyle, EdgeColorType edgeColorType, float edgeLineWidth ) : PieSlice

Creates a PieSlice object.

CreatePieSliceHighlighted ( float boundingRectLeft, float boundingRectTop, float boundingRectWidth, float boundingRectHeight, float sliceHeight, float startAngle, float sweepAngle, Color color, ShadowStyle shadowStyle, EdgeColorType edgeColorType, float edgeLineWidth ) : PieSlice

Creates highlighted PieSlice object.

DrawBottoms ( Graphics graphics ) : void

Draws bottom sides of all pie slices.

DrawSliceSides ( Graphics graphics ) : void

Draws outer peripheries of all slices.

DrawTops ( Graphics graphics ) : void

Draws top sides of all pie slices.

GetFittingRectangle ( ) : RectangleF

Finds the smallest rectangle int which chart fits entirely.

GetSliceDisplacement ( float angle, float displacementFactor ) : SizeF

Calculates the displacement for given angle.

InitializePieSlices ( ) : void

Initializes pies.

PieChart3D ( ) : System

Initializes an empty instance of PieChart3D.

ReadjustSlices ( RectangleF newBoundingRectangle ) : void

Readjusts each slice for new bounding rectangle.

Приватные методы

Метод Описание
AreDisplacementsValid ( float displacements ) : bool

Helper function used in assertions. Checks the validity of slice displacements.

GetForemostPieSlice ( PieSlice pieSlices ) : int

Return the index of the foremost pie slice i.e. the one crossing 90 degrees boundary.

IsDisplacementValid ( float value ) : bool

Helper function used in assertions. Checks the validity of a slice displacement.

Описание методов

CreatePieSlice() защищенный Метод

Creates a PieSlice object.
protected CreatePieSlice ( float boundingRectLeft, float boundingRectTop, float boundingRectWidth, float boundingRectHeight, float sliceHeight, float startAngle, float sweepAngle, Color color, ShadowStyle shadowStyle, EdgeColorType edgeColorType, float edgeLineWidth ) : PieSlice
boundingRectLeft float /// x-coordinate of the upper-left corner of the rectangle that is /// used to draw the top surface of the slice. ///
boundingRectTop float /// y-coordinate of the upper-left corner of the rectangle that is /// used to draw the top surface of the slice. ///
boundingRectWidth float /// Width of the rectangle that is used to draw the top surface of /// the slice. ///
boundingRectHeight float /// Height of the rectangle that is used to draw the top surface of /// the slice. ///
sliceHeight float /// Slice height. ///
startAngle float /// Starting angle. ///
sweepAngle float /// Sweep angle. ///
color Color /// Color used for slice rendering. ///
shadowStyle ShadowStyle /// Shadow style used for slice rendering. ///
edgeColorType EdgeColorType /// Edge lines color type. ///
edgeLineWidth float /// Edge lines width. ///
Результат PieSlice

CreatePieSliceHighlighted() защищенный Метод

Creates highlighted PieSlice object.
protected CreatePieSliceHighlighted ( float boundingRectLeft, float boundingRectTop, float boundingRectWidth, float boundingRectHeight, float sliceHeight, float startAngle, float sweepAngle, Color color, ShadowStyle shadowStyle, EdgeColorType edgeColorType, float edgeLineWidth ) : PieSlice
boundingRectLeft float /// x-coordinate of the upper-left corner of the rectangle that is /// used to draw the top surface of the slice. ///
boundingRectTop float /// y-coordinate of the upper-left corner of the rectangle that is /// used to draw the top surface of the slice. ///
boundingRectWidth float /// Width of the rectangle that is used to draw the top surface of /// the slice. ///
boundingRectHeight float /// Height of the rectangle that is used to draw the top surface of /// the slice. ///
sliceHeight float /// Slice height. ///
startAngle float /// Starting angle. ///
sweepAngle float /// Sweep angle. ///
color Color /// Color used for slice rendering. ///
shadowStyle ShadowStyle /// Shadow style used for slice rendering. ///
edgeColorType EdgeColorType /// Edge lines color type. ///
edgeLineWidth float /// Edge lines width. ///
Результат PieSlice

Dispose() публичный Метод

Disposes of all pie slices.
public Dispose ( ) : void
Результат void

Draw() публичный Метод

Draws the chart.
public Draw ( Graphics graphics ) : void
graphics System.Drawing.Graphics /// Graphics object used for drawing. ///
Результат void

DrawBottoms() защищенный Метод

Draws bottom sides of all pie slices.
protected DrawBottoms ( Graphics graphics ) : void
graphics System.Drawing.Graphics /// Graphics used for drawing. ///
Результат void

DrawSliceSides() защищенный Метод

Draws outer peripheries of all slices.
protected DrawSliceSides ( Graphics graphics ) : void
graphics System.Drawing.Graphics /// Graphics used for drawing. ///
Результат void

DrawTops() защищенный Метод

Draws top sides of all pie slices.
protected DrawTops ( Graphics graphics ) : void
graphics System.Drawing.Graphics /// Graphics used for drawing. ///
Результат void

FindPieSliceUnderPoint() публичный Метод

Searches the chart to find the index of the pie slice which contains point given. Search order goes in the direction opposite to drawing order.
public FindPieSliceUnderPoint ( PointF point ) : int
point System.Drawing.PointF /// PointF point for which pie slice is searched for. ///
Результат int

GetFittingRectangle() защищенный Метод

Finds the smallest rectangle int which chart fits entirely.
protected GetFittingRectangle ( ) : RectangleF
Результат System.Drawing.RectangleF

GetSliceDisplacement() защищенный Метод

Calculates the displacement for given angle.
protected GetSliceDisplacement ( float angle, float displacementFactor ) : SizeF
angle float /// Angle (in degrees). ///
displacementFactor float /// Displacement factor. ///
Результат System.Drawing.SizeF

InitializePieSlices() защищенный Метод

Initializes pies.
protected InitializePieSlices ( ) : void
Результат void

PieChart3D() защищенный Метод

Initializes an empty instance of PieChart3D.
protected PieChart3D ( ) : System
Результат System

PieChart3D() публичный Метод

Initializes a new instance of PieChart3D with given bounds, array of values and corresponding colors.
public PieChart3D ( RectangleF boundingRectangle, decimal values, Color sliceColors, float sliceRelativeHeight ) : System
boundingRectangle System.Drawing.RectangleF /// Bounding rectangle. ///
values decimal /// Array of values to chart. ///
sliceColors Color /// Colors used for rendering individual slices. ///
sliceRelativeHeight float /// Pie slice relative height. ///
Результат System

PieChart3D() публичный Метод

Initializes a new instance of PieChart3D with given bounds, array of values and pie slice thickness.
public PieChart3D ( RectangleF boundingRectangle, decimal values, float sliceRelativeHeight ) : System
boundingRectangle System.Drawing.RectangleF /// Bounding rectangle. ///
values decimal /// Array of values to initialize with. ///
sliceRelativeHeight float
Результат System

PieChart3D() публичный Метод

Initializes an instance of a flat PieChart3D with specified bounds, values to chart and relative thickness.
public PieChart3D ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, decimal values ) : System
xBoundingRect float /// x-coordinate of the upper-left corner of the rectangle that /// bounds the chart. ///
yBoundingRect float /// y-coordinate of the upper-left corner of the rectangle that /// bounds the chart. ///
widthBoundingRect float /// Width of the rectangle that bounds the chart. ///
heightBoundingRect float /// Height of the rectangle that bounds the chart. ///
values decimal /// An array of decimal values to chart. ///
Результат System

PieChart3D() публичный Метод

Initializes a new instance of PieChart3D with given bounds, array of values and relative pie slice height.
public PieChart3D ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, decimal values, Color sliceColors, float sliceRelativeHeight ) : System
xBoundingRect float /// x-coordinate of the upper-left corner of the rectangle bounding /// the chart. ///
yBoundingRect float /// y-coordinate of the upper-left corner of the rectangle bounding /// the chart. ///
widthBoundingRect float /// Width of the rectangle bounding the chart. ///
heightBoundingRect float /// Height of the rectangle bounding the chart. ///
values decimal /// An array of decimal values to chart. ///
sliceColors Color /// An array of colors used to render slices. ///
sliceRelativeHeight float /// Thickness of the slice to chart relative to the height of the /// bounding rectangle. ///
Результат System

PieChart3D() публичный Метод

Initializes a new instance of PieChart3D with given bounds, array of values and relative pie slice height.
public PieChart3D ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, decimal values, Color sliceColors, float sliceRelativeHeight, string texts ) : System
xBoundingRect float /// x-coordinate of the upper-left corner of the rectangle bounding /// the chart. ///
yBoundingRect float /// y-coordinate of the upper-left corner of the rectangle bounding /// the chart. ///
widthBoundingRect float /// Width of the rectangle bounding the chart. ///
heightBoundingRect float /// Height of the rectangle bounding the chart. ///
values decimal /// An array of decimal values to chart. ///
sliceColors Color /// An array of colors used to render slices. ///
sliceRelativeHeight float /// Thickness of the slice to chart relative to the height of the /// bounding rectangle. ///
texts string /// An array of strings that are displayed on corresponding slice. ///
Результат System

PieChart3D() публичный Метод

Initializes an instance of PieChart3D with specified bounds, values to chart and relative thickness.
public PieChart3D ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, decimal values, float sliceRelativeHeight ) : System
xBoundingRect float /// x-coordinate of the upper-left corner of the rectangle bounding /// the chart. ///
yBoundingRect float /// y-coordinate of the upper-left corner of the rectangle bounding /// the chart. ///
widthBoundingRect float /// Width of the rectangle bounding the chart. ///
heightBoundingRect float /// Height of the rectangle bounding the chart. ///
values decimal /// An array of decimal values to chart. ///
sliceRelativeHeight float /// Thickness of the pie slice to chart relative to the height of the /// bounding rectangle. ///
Результат System

PieChart3D() публичный Метод

Initializes a new instance of PieChart3D with given bounds, array of values and relative pie slice height.
public PieChart3D ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, decimal values, float sliceRelativeHeight, string texts ) : System
xBoundingRect float /// x-coordinate of the upper-left corner of the rectangle bounding /// the chart. ///
yBoundingRect float /// y-coordinate of the upper-left corner of the rectangle bounding /// the chart. ///
widthBoundingRect float /// Width of the rectangle bounding the chart. ///
heightBoundingRect float /// Height of the rectangle bounding the chart. ///
values decimal /// An array of decimal values to chart. ///
sliceRelativeHeight float /// Thickness of the slice to chart relative to the height of the /// bounding rectangle. ///
texts string /// An array of strings that are displayed on corresponding slice. ///
Результат System

PlaceTexts() публичный Метод

Draws strings by individual slices. Position of the text is calculated by overridable GetTextPosition method of the PieSlice type.
public PlaceTexts ( Graphics graphics ) : void
graphics System.Drawing.Graphics /// Graphics object. ///
Результат void

ReadjustSlices() защищенный Метод

Readjusts each slice for new bounding rectangle.
protected ReadjustSlices ( RectangleF newBoundingRectangle ) : void
newBoundingRectangle System.Drawing.RectangleF /// RectangleF representing new boundary. ///
Результат void

Описание свойств

m_edgeColorType защищенное свойство

Edge color type used for rendering.
protected EdgeColorType m_edgeColorType
Результат EdgeColorType

m_edgeLineWidth защищенное свойство

Edge line width.
protected float m_edgeLineWidth
Результат float

m_fitToBoundingRectangle защищенное свойство

Should the chart fit the bounding rectangle exactly.
protected bool m_fitToBoundingRectangle
Результат bool

m_font защищенное свойство

Font used to display texts.
protected Font,System.Drawing m_font
Результат System.Drawing.Font

m_foreColor защищенное свойство

Fore color used to display texts.
protected Color m_foreColor
Результат Color

m_heightBoundingRect защищенное свойство

Height of the bounding rectangle.
protected float m_heightBoundingRect
Результат float

m_highlightedIndex защищенное свойство

Index of the currently highlighted pie slice.
protected int m_highlightedIndex
Результат int

m_initialAngle защищенное свойство

Initial angle from which chart is drawn.
protected float m_initialAngle
Результат float

m_pieSlices защищенное свойство

Array of ordered pie slices constituting the chart, starting from 270 degrees axis.
protected PieSlice[],System.Drawing.PieChart m_pieSlices
Результат System.Drawing.PieChart.PieSlice[]

m_pieSlicesMapping защищенное свойство

Collection of reordered pie slices mapped to original order.
protected ArrayList,System.Collections m_pieSlicesMapping
Результат System.Collections.ArrayList

m_shadowStyle защищенное свойство

Shadow style.
protected ShadowStyle m_shadowStyle
Результат ShadowStyle

m_sliceColors защищенное свойство

Array of colors used for rendering.
protected Color[] m_sliceColors
Результат Color[]

m_sliceRelativeDisplacements защищенное свойство

Array of relative displacements from the common center.
protected float[] m_sliceRelativeDisplacements
Результат float[]

m_sliceRelativeHeight защищенное свойство

Slice relative height.
protected float m_sliceRelativeHeight
Результат float

m_texts защищенное свойство

Array of description texts.
protected string[] m_texts
Результат string[]

m_values защищенное свойство

Array of values to be presented by the chart.
protected decimal[] m_values
Результат decimal[]

m_widthBoundingRect защищенное свойство

Width of the bounding rectangle.
protected float m_widthBoundingRect
Результат float

m_xBoundingRect защищенное свойство

x-coordinate of the top left corner of the bounding rectangle.
protected float m_xBoundingRect
Результат float

m_yBoundingRect защищенное свойство

y-coordinate of the top left corner of the bounding rectangle.
protected float m_yBoundingRect
Результат float