Class ChartTrackballController
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.ChartView.dll
Syntax
public class ChartTrackballController : ChartViewController, INotifyPropertyChanged
Constructors
ChartTrackballController()
Initializes a new instance of the ChartTrackballController class.
Declaration
public ChartTrackballController()
Properties
DrawPoints
Gets or sets a value indicating whether points should be drawn on the trackball line.
Declaration
public bool DrawPoints { get; set; }
Property Value
System.Boolean
|
Element
Gets the info element of the controller.
Declaration
public TrackballInfoElement Element { get; }
Property Value
TrackballInfoElement
|
FixedSize
Gets or sets the size to be used when IsFixedSize is set to true.
Declaration
public virtual Size FixedSize { get; set; }
Property Value
System.Drawing.Size
|
InfoElementOffset
Gets or sets the offset of the info element.
Declaration
public virtual Size InfoElementOffset { get; set; }
Property Value
System.Drawing.Size
|
InnerPointSize
Gets or sets the size of the inner circle of the trackball points.
Declaration
public virtual SizeF InnerPointSize { get; set; }
Property Value
System.Drawing.SizeF
|
InteractiveTrackball
Gets or sets a value indicating whether trackball will move while the mouse hovers the info element.
Declaration
public virtual bool InteractiveTrackball { get; set; }
Property Value
System.Boolean
If |
IsFixedSize
Gets or sets a value indicating whether this trackball info element is with fixed size. You have to set the FixedSize property to specify the size.
Declaration
public virtual bool IsFixedSize { get; set; }
Property Value
System.Boolean
|
LineColor
Gets or sets the color of the line.
Declaration
public virtual Color LineColor { get; set; }
Property Value
System.Drawing.Color
|
LineWidth
Gets or sets the width of the trackball line.
Declaration
public virtual float LineWidth { get; set; }
Property Value
System.Single
|
OuterPointsSize
Gets or sets the size of the outer circle of the trackball points.
Declaration
public virtual SizeF OuterPointsSize { get; set; }
Property Value
System.Drawing.SizeF
|
PointFormatString
Gets or sets a format string which will be used to format the text for each data point in the info element. The default value is "{0}:{1}".
Declaration
public string PointFormatString { get; set; }
Property Value
System.String
|
PointsFill
Gets or sets the trackball points fill.
Declaration
public virtual Color PointsFill { get; set; }
Property Value
System.Drawing.Color
|
Methods
BuildPointsDictionary()
Creates lists of datapoints grouped by their X, Y or angle coordinate depending on the type of the chart.
Declaration
protected virtual SortedDictionary<double, List<DataPointInfo>> BuildPointsDictionary()
Returns
System.Collections.Generic.SortedDictionary<System.Double, System.Collections.Generic.List<DataPointInfo>>
The grouped collection of data points. |
ControllerAdded(ChartView)
This method is called when the controller is added to the controllers collection of a chart view.
Declaration
protected override void ControllerAdded(ChartView view)
Parameters
ChartView
view
The view this controller is added to. |
Overrides
ControllerRemoved()
This method is called when the controller is removed from the controllers collection of a chart view.
Declaration
protected override void ControllerRemoved()
Overrides
CreateInfoElement()
Creates the element that is displaying the trackball information.
Declaration
protected virtual TrackballInfoElement CreateInfoElement()
Returns
TrackballInfoElement
An instance of the TrackballInfoElement |
GetCartesianTrackballElementLocation(PointF)
Gets the location where the info element should be positioned.
Declaration
protected virtual PointF GetCartesianTrackballElementLocation(PointF location)
Parameters
System.Drawing.PointF
location
The mouse location. |
Returns
System.Drawing.PointF
Returns the position of the upper left corner of the info element. |
GetClosestPoints(PointF)
Gets the points along horizontal, vertical or radius line closest to the given location depending on the type of the chart.
Declaration
protected virtual List<DataPointInfo> GetClosestPoints(PointF location)
Parameters
System.Drawing.PointF
location
The location near which to search. |
Returns
System.Collections.Generic.List<DataPointInfo>
List of data point infos on the nearest vertical or horizontal line. |
GetColorForDataPoint(ChartSeries, DataPoint)
Gets the back color of a given data point from its element.
Declaration
protected virtual Color GetColorForDataPoint(ChartSeries series, DataPoint point)
Parameters
ChartSeries
series
The series to which the point belongs. |
DataPoint
point
The point to get the color for. |
Returns
System.Drawing.Color
The color of the point element. |
GetPointText(DataPoint)
Gets the text for a specific data point.
Declaration
protected virtual string GetPointText(DataPoint point)
Parameters
DataPoint
point
The point. |
Returns
System.String
The formatted text for the point. |
GetRadialTrackballElementLocation(PointF)
Gets the location where the info element should be positioned.
Declaration
protected virtual PointF GetRadialTrackballElementLocation(PointF location)
Parameters
System.Drawing.PointF
location
The mouse location. |
Returns
System.Drawing.PointF
Returns the position of the upper left corner of the info element. |
GetTrackballElementLocation(PointF)
Gets the trackball element location.
Declaration
protected virtual PointF GetTrackballElementLocation(PointF location)
Parameters
System.Drawing.PointF
location
The mouse location. |
Returns
System.Drawing.PointF
The location for the trackball element. |
GetTrackballText(List<DataPointInfo>)
Gets the text to be displayed in the trackball info element.
Declaration
protected virtual string GetTrackballText(List<DataPointInfo> points)
Parameters
System.Collections.Generic.List<DataPointInfo>
points
A list of all the points that are on the trackball line. |
Returns
System.String
The text to be displayed. |
InitializeFields()
Initializes the Trackball controller with the default settings.
Declaration
protected virtual void InitializeFields()
MoveTrackball(PointF)
Changes the location of the trackball according to the location.
Declaration
protected virtual void MoveTrackball(PointF location)
Parameters
System.Drawing.PointF
location
The location. |
OnDraw(EventArgs)
Raises the Draw event.
Declaration
protected override ActionResult OnDraw(EventArgs e)
Parameters
System.EventArgs
e
The System.EventArgs instance containing the event data. |
Returns
ActionResult
|
Overrides
OnLocationChanged(LocationChangedEventArgs)
Raises the LocationChanged event.
Declaration
protected virtual void OnLocationChanged(LocationChangedEventArgs e)
Parameters
LocationChangedEventArgs
e
The LocationChangedEventArgs instance containing the event data. |
OnMouseEnter(EventArgs)
Raises the MouseEnter event.
Declaration
protected override ActionResult OnMouseEnter(EventArgs e)
Parameters
System.EventArgs
e
The System.EventArgs instance containing the event data. |
Returns
ActionResult
|
Overrides
OnMouseLeave(EventArgs)
Raises the MouseLeave event.
Declaration
protected override ActionResult OnMouseLeave(EventArgs e)
Parameters
System.EventArgs
e
The System.EventArgs instance containing the event data. |
Returns
ActionResult
|
Overrides
OnMouseMove(MouseEventArgs)
Raises the MouseMove event.
Declaration
protected override ActionResult OnMouseMove(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
The System.Windows.Forms.MouseEventArgs instance containing the event data. |
Returns
ActionResult
|
Overrides
OnPenInitialized(PenInitializedEventArgs)
Raises the PenInitialized event.
Declaration
protected virtual void OnPenInitialized(PenInitializedEventArgs e)
Parameters
PenInitializedEventArgs
e
The PenInitializedEventArgs instance containing the event data. |
OnTextNeeded(TextNeededEventArgs)
Raises the TextNeeded event.
Declaration
protected virtual void OnTextNeeded(TextNeededEventArgs e)
Parameters
TextNeededEventArgs
e
The TextNeededEventArgs instance containing the event data. |
Events
LocationChanged
Occurs when the location of the trackball is changed.
Declaration
public event LocationChangedEventHandler LocationChanged
Event Type
LocationChangedEventHandler
|
PenInitialized
Occurs after initializing the pen object used to draw the line of the track ball. The event allows additional settings, like dash-style, caps, etc. to be appplied on the pen.
Declaration
public event PenInitializedEventHandler PenInitialized
Event Type
PenInitializedEventHandler
|
TextNeeded
Occurs when the text of the trackball info element is changed.
Declaration
public event TextNeededEventHandler TextNeeded
Event Type
TextNeededEventHandler
|