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 Chart
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.
|
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.
Declaration
public virtual Size FixedSize { get; set; }
Property Value
System.
|
InfoElementOffset
Gets or sets the offset of the info element.
Declaration
public virtual Size InfoElementOffset { get; set; }
Property Value
System.
|
InnerPointSize
Gets or sets the size of the inner circle of the trackball points.
Declaration
public virtual SizeF InnerPointSize { get; set; }
Property Value
System.
|
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. 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.
|
LineColor
Gets or sets the color of the line.
Declaration
public virtual Color LineColor { get; set; }
Property Value
System.
|
LineWidth
Gets or sets the width of the trackball line.
Declaration
public virtual float LineWidth { get; set; }
Property Value
System.
|
OuterPointsSize
Gets or sets the size of the outer circle of the trackball points.
Declaration
public virtual SizeF OuterPointsSize { get; set; }
Property Value
System.
|
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.
|
PointsFill
Gets or sets the trackball points fill.
Declaration
public virtual Color PointsFill { get; set; }
Property Value
System.
|
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. 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
Chart 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
Trackball An instance of the Trackball |
GetCartesianTrackballElementLocation(PointF)
Gets the location where the info element should be positioned.
Declaration
protected virtual PointF GetCartesianTrackballElementLocation(PointF location)
Parameters
System. The mouse location. |
Returns
System. 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. The location near which to search. |
Returns
System. 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
Chart The series to which the point belongs. |
Data The point to get the color for. |
Returns
System. The color of the point element. |
GetPointText(DataPoint)
Gets the text for a specific data point.
Declaration
protected virtual string GetPointText(DataPoint point)
Parameters
Data The point. |
Returns
System. 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. The mouse location. |
Returns
System. 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. The mouse location. |
Returns
System. 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. A list of all the points that are on the trackball line. |
Returns
System. 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. The location. |
OnDraw(EventArgs)
Raises the Draw event.
Declaration
protected override ActionResult OnDraw(EventArgs e)
Parameters
System. The System. |
Returns
Overrides
OnLocationChanged(LocationChangedEventArgs)
Raises the Location
Declaration
protected virtual void OnLocationChanged(LocationChangedEventArgs e)
Parameters
Location The Location |
OnMouseEnter(EventArgs)
Raises the Mouse
Declaration
protected override ActionResult OnMouseEnter(EventArgs e)
Parameters
System. The System. |
Returns
Overrides
OnMouseLeave(EventArgs)
Raises the Mouse
Declaration
protected override ActionResult OnMouseLeave(EventArgs e)
Parameters
System. The System. |
Returns
Overrides
OnMouseMove(MouseEventArgs)
Raises the Mouse
Declaration
protected override ActionResult OnMouseMove(MouseEventArgs e)
Parameters
System. The System. |
Returns
Overrides
OnPenInitialized(PenInitializedEventArgs)
Raises the Pen
Declaration
protected virtual void OnPenInitialized(PenInitializedEventArgs e)
Parameters
Pen The Pen |
OnTextNeeded(TextNeededEventArgs)
Raises the Text
Declaration
protected virtual void OnTextNeeded(TextNeededEventArgs e)
Parameters
Text The Text |
Events
LocationChanged
Occurs when the location of the trackball is changed.
Declaration
public event LocationChangedEventHandler LocationChanged
Event Type
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
TextNeeded
Occurs when the text of the trackball info element is changed.
Declaration
public event TextNeededEventHandler TextNeeded