C# Class LitDev.LDChart

显示文件 Open project: litdev1/LitDev

Public Methods

Method Description
AddChart ( Primitive width, Primitive height ) : Primitive

Create a chart control. The current GraphicsWindow.BackgroundColor will be used for the background. The current GraphicsWindow.PenColor and Font properties will be used for the label text. For Example: GraphicsWindow.FontName = "Segoe UI" GraphicsWindow.FontBold = "False"

ColourMap ( Primitive chartName, Primitive hue, Primitive saturation, Primitive lightness, Primitive hsl, Primitive start, Primitive end, Primitive centralColour ) : void

Set colour mapping for the chart.

Highlight ( Primitive chartName, Primitive label, Primitive fraction ) : void

Highlight a chart value (move segment out).

Legend ( Primitive chartName, Primitive scale, Primitive legend, Primitive background ) : void

Set legend properties.

Properties ( Primitive chartName, Primitive style, Primitive scale ) : void

Set chart properties.

SetData ( Primitive chartName, Primitive data ) : void

Set data for a chart.

Update ( Primitive chartName ) : void

Redraw (update) a chart. This restores any highlighted segments or applies any modified chart properties.

Private Methods

Method Description
DoubleAnimateProperty ( IAnimatable animatable, DependencyProperty property, double end, double timespan ) : void

Method Details

AddChart() public static method

Create a chart control. The current GraphicsWindow.BackgroundColor will be used for the background. The current GraphicsWindow.PenColor and Font properties will be used for the label text. For Example: GraphicsWindow.FontName = "Segoe UI" GraphicsWindow.FontBold = "False"
public static AddChart ( Primitive width, Primitive height ) : Primitive
width Primitive The width of the chart.
height Primitive The height of the chart.
return Primitive

ColourMap() public static method

Set colour mapping for the chart.
public static ColourMap ( Primitive chartName, Primitive hue, Primitive saturation, Primitive lightness, Primitive hsl, Primitive start, Primitive end, Primitive centralColour ) : void
chartName Primitive The chart name.
hue Primitive A hue (colour 0 to 360), default 0 (red).
saturation Primitive A saturation (intensity 0 to 1), default 0.5.
lightness Primitive A lightness (brightness 0 to 1), default 0.5.
hsl Primitive The parameter to change for different segments, options are: /// "Hue" (default) rainbow colours /// "Saturation" increasing intensity of colour /// "Lightness" increasing brightness
start Primitive Starting value for colour variation in the range [0 to 1], default 0.
end Primitive Ending value for colour variation in the range [0 to 1], default 1.
centralColour Primitive An optional circular gradient color centered on chart, default "".
return void

Highlight() public static method

Highlight a chart value (move segment out).
public static Highlight ( Primitive chartName, Primitive label, Primitive fraction ) : void
chartName Primitive The chart name.
label Primitive The segment label.
fraction Primitive A fraction of the radius to move segment out (0 to return it).
return void

Legend() public static method

Set legend properties.
public static Legend ( Primitive chartName, Primitive scale, Primitive legend, Primitive background ) : void
chartName Primitive The chart name.
scale Primitive A scale factor for the legend and text labels, default 1
legend Primitive A legend style, options are: /// "None" no legend /// "Legend" separate legend /// "Overlay" names overlaying chart /// "Percent" percentages overlaying chart /// "Legend_Percent" (default) separate legend and percentages overlaying chart /// "
background Primitive The legend label text background is coloured, "True" or "False" (default).
return void

Properties() public static method

Set chart properties.
public static Properties ( Primitive chartName, Primitive style, Primitive scale ) : void
chartName Primitive The chart name.
style Primitive A style for the chart, options are: /// "Pie" (default) /// "Doughnut" /// "Bubble" /// "Bar" /// "Column"
scale Primitive A scale factor for the chart, default 1.
return void

SetData() public static method

Set data for a chart.
public static SetData ( Primitive chartName, Primitive data ) : void
chartName Primitive The chart name.
data Primitive The data to set, which is a 1D array, indices are item names. /// Example: /// data["Fred"] = 25 /// data["Mary"] = 15 /// data["John"] = 40 ///
return void

Update() public static method

Redraw (update) a chart. This restores any highlighted segments or applies any modified chart properties.
public static Update ( Primitive chartName ) : void
chartName Primitive The chart name.
return void