Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.ChartView.dll
Syntax:
public class ChartTrackballController : ChartViewController, INotifyPropertyChanged
Inheritance: objectControllerChartViewControllerChartTrackballController
Implements:
Inherited Members
Constructors
Initializes a new instance of the ChartTrackballController class.
public ChartTrackballController()
Properties
Gets or sets a value indicating whether points should be drawn on the trackball line.
public bool DrawPoints { get; set; }
Gets the info element of the controller.
public TrackballInfoElement Element { get; }
Gets or sets the size to be used when IsFixedSize is set to true.
public virtual Size FixedSize { get; set; }
Gets or sets the offset of the info element.
public virtual Size InfoElementOffset { get; set; }
Gets or sets the size of the inner circle of the trackball points.
public virtual SizeF InnerPointSize { get; set; }
Gets or sets a value indicating whether trackball will move while the mouse hovers the info element.
public virtual bool InteractiveTrackball { get; set; }
If true the trackball will not move while the mouse is inside the bounds of the
info element, false.
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.
public virtual bool IsFixedSize { get; set; }
Gets or sets the width of the trackball line.
public virtual float LineWidth { get; set; }
Gets or sets the size of the outer circle of the trackball points.
public virtual SizeF OuterPointsSize { get; set; }
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}".
public string PointFormatString { get; set; }
Gets or sets the trackball points fill.
public virtual Color PointsFill { get; set; }
Methods
Creates lists of datapoints grouped by their X, Y or angle coordinate depending on the type of the chart.
protected virtual SortedDictionary<double, List<DataPointInfo>> BuildPointsDictionary()
SortedDictionary<double, List<DataPointInfo>>
The grouped collection of data points.
This method is called when the controller is added to the controllers collection of a chart view.
protected override void ControllerAdded(ChartView view)
The view this controller is added to.
Overrides:
This method is called when the controller is removed from the controllers collection of a chart view.
protected override void ControllerRemoved()
Overrides:
Creates the element that is displaying the trackball information.
protected virtual TrackballInfoElement CreateInfoElement()
An instance of the TrackballInfoElement
Gets the points along horizontal, vertical or radius line closest to the given location depending on the type of the chart.
protected virtual List<DataPointInfo> GetClosestPoints(PointF location)
The location near which to search.
Returns:List<DataPointInfo>
List of data point infos on the nearest vertical or horizontal line.
Gets the back color of a given data point from its element.
protected virtual Color GetColorForDataPoint(ChartSeries series, DataPoint point)
The series to which the point belongs.
pointDataPointThe point to get the color for.
Returns:The color of the point element.
Gets the text to be displayed in the trackball info element.
protected virtual string GetTrackballText(List<DataPointInfo> points)
A list of all the points that are on the trackball line.
Returns:The text to be displayed.
Initializes the Trackball controller with the default settings.
protected virtual void InitializeFields()
Changes the location of the trackball according to the location.
Raises the event.
protected virtual void OnLocationChanged(LocationChangedEventArgs e)
The LocationChangedEventArgs instance containing the event data.
Raises the event.
protected override ActionResult OnMouseMove(MouseEventArgs e)
The MouseEventArgs instance containing the event data.
Returns:Overrides:
Raises the event.
protected virtual void OnPenInitialized(PenInitializedEventArgs e)
The PenInitializedEventArgs instance containing the event data.
Raises the event.
protected virtual void OnTextNeeded(TextNeededEventArgs e)
The TextNeededEventArgs instance containing the event data.
Events
Occurs when the location of the trackball is changed.
public event LocationChangedEventHandler LocationChanged
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.
public event PenInitializedEventHandler PenInitialized
Occurs when the text of the trackball info element is changed.
public event TextNeededEventHandler TextNeeded