ClassChartTrackballController
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.ChartView.dll
Syntax:
public class ChartTrackballController : ChartViewController, INotifyPropertyChanged
Inheritance: objectControllerChartViewControllerChartTrackballController
Implements:
Inherited Members
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.
Element
Gets the info element of the controller.
Declaration
public TrackballInfoElement Element { get; }
Property Value
FixedSize
Gets or sets the size to be used when IsFixedSize is set to true.
InfoElementOffset
Gets or sets the offset of the info element.
Declaration
public virtual Size InfoElementOffset { get; set; }
Property Value
InnerPointSize
Gets or sets the size of the inner circle of the trackball points.
Declaration
public virtual SizeF InnerPointSize { get; set; }
Property Value
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
If true the trackball will not move while the mouse is inside the bounds of the
info element, false.
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.
LineColor
Gets or sets the color of the line.
LineWidth
Gets or sets the width of the trackball line.
OuterPointsSize
Gets or sets the size of the outer circle of the trackball points.
Declaration
public virtual SizeF OuterPointsSize { get; set; }
Property Value
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}".
PointsFill
Gets or sets the trackball points fill.
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
SortedDictionary<double, 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
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
An instance of the TrackballInfoElement
GetCartesianTrackballElementLocation(PointF)
Gets the location where the info element should be positioned.
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
location
The location near which to search.
Returns
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
series
The series to which the point belongs.
point
The point to get the color for.
Returns
The color of the point element.
GetPointText(DataPoint)
Gets the text for a specific data point.
GetRadialTrackballElementLocation(PointF)
Gets the location where the info element should be positioned.
GetTrackballElementLocation(PointF)
Gets the trackball element location.
GetTrackballText(List<DataPointInfo>)
Gets the text to be displayed in the trackball info element.
Declaration
protected virtual string GetTrackballText(List<DataPointInfo> points)
Parameters
points
List<DataPointInfo>
A list of all the points that are on the trackball line.
Returns
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
location
The location.
OnDraw(EventArgs)
Raises the event.
Declaration
protected override ActionResult OnDraw(EventArgs e)
Parameters
e
The EventArgs instance containing the event data.
Returns
Overrides
OnLocationChanged(LocationChangedEventArgs)
Raises the event.
Declaration
protected virtual void OnLocationChanged(LocationChangedEventArgs e)
Parameters
e
The LocationChangedEventArgs instance containing the event data.
OnMouseEnter(EventArgs)
Raises the event.
Declaration
protected override ActionResult OnMouseEnter(EventArgs e)
Parameters
e
The EventArgs instance containing the event data.
Returns
Overrides
OnMouseLeave(EventArgs)
Raises the event.
Declaration
protected override ActionResult OnMouseLeave(EventArgs e)
Parameters
e
The EventArgs instance containing the event data.
Returns
Overrides
OnMouseMove(MouseEventArgs)
Raises the event.
Declaration
protected override ActionResult OnMouseMove(MouseEventArgs e)
Parameters
e
The MouseEventArgs instance containing the event data.
Returns
Overrides
OnPenInitialized(PenInitializedEventArgs)
Raises the event.
Declaration
protected virtual void OnPenInitialized(PenInitializedEventArgs e)
Parameters
e
The PenInitializedEventArgs instance containing the event data.
OnTextNeeded(TextNeededEventArgs)
Raises the event.
Declaration
protected virtual void OnTextNeeded(TextNeededEventArgs e)
Parameters
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 Value
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 Value
TextNeeded
Occurs when the text of the trackball info element is changed.
Declaration
public event TextNeededEventHandler TextNeeded
Event Value