New to Telerik UI for WinFormsStart a free 30-day trial

Definition

Constructors

Initializes a new instance of the ChartTrackballController class.

C#
public ChartTrackballController()

Properties

Gets or sets a value indicating whether points should be drawn on the trackball line.

C#
public bool DrawPoints { get; set; }

Gets the info element of the controller.

C#
public TrackballInfoElement Element { get; }

Gets or sets the size to be used when IsFixedSize is set to true.

C#
public virtual Size FixedSize { get; set; }

Gets or sets the offset of the info element.

C#
public virtual Size InfoElementOffset { get; set; }

Gets or sets the size of the inner circle of the trackball points.

C#
public virtual SizeF InnerPointSize { get; set; }

Gets or sets a value indicating whether trackball will move while the mouse hovers the info element.

C#
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.

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.

C#
public virtual bool IsFixedSize { get; set; }

Gets or sets the color of the line.

C#
public virtual Color LineColor { get; set; }

Gets or sets the width of the trackball line.

C#
public virtual float LineWidth { get; set; }

Gets or sets the size of the outer circle of the trackball points.

C#
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}".

C#
public string PointFormatString { get; set; }

Gets or sets the trackball points fill.

C#
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.

C#
protected virtual SortedDictionary<double, List<DataPointInfo>> BuildPointsDictionary()
Returns:

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.

C#
protected override void ControllerAdded(ChartView view)
Parameters:viewChartView

The view this controller is added to.

Overrides: ChartViewController.ControllerAdded(ChartView)

This method is called when the controller is removed from the controllers collection of a chart view.

C#
protected override void ControllerRemoved()

Overrides: ChartViewController.ControllerRemoved()

Creates the element that is displaying the trackball information.

C#
protected virtual TrackballInfoElement CreateInfoElement()
Returns:

TrackballInfoElement

An instance of the TrackballInfoElement

Gets the location where the info element should be positioned.

C#
protected virtual PointF GetCartesianTrackballElementLocation(PointF location)
Parameters:locationPointF

The mouse location.

Returns:

PointF

Returns the position of the upper left corner of the info element.

Gets the points along horizontal, vertical or radius line closest to the given location depending on the type of the chart.

C#
protected virtual List<DataPointInfo> GetClosestPoints(PointF location)
Parameters:locationPointF

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.

C#
protected virtual Color GetColorForDataPoint(ChartSeries series, DataPoint point)
Parameters:seriesChartSeries

The series to which the point belongs.

pointDataPoint

The point to get the color for.

Returns:

Color

The color of the point element.

Gets the text for a specific data point.

C#
protected virtual string GetPointText(DataPoint point)
Parameters:pointDataPoint

The point.

Returns:

string

The formatted text for the point.

Gets the location where the info element should be positioned.

C#
protected virtual PointF GetRadialTrackballElementLocation(PointF location)
Parameters:locationPointF

The mouse location.

Returns:

PointF

Returns the position of the upper left corner of the info element.

Gets the trackball element location.

C#
protected virtual PointF GetTrackballElementLocation(PointF location)
Parameters:locationPointF

The mouse location.

Returns:

PointF

The location for the trackball element.

Gets the text to be displayed in the trackball info element.

C#
protected virtual string GetTrackballText(List<DataPointInfo> points)
Parameters:pointsList<DataPointInfo>

A list of all the points that are on the trackball line.

Returns:

string

The text to be displayed.

Initializes the Trackball controller with the default settings.

C#
protected virtual void InitializeFields()

Changes the location of the trackball according to the location.

C#
protected virtual void MoveTrackball(PointF location)
Parameters:locationPointF

The location.

Raises the event.

C#
protected override ActionResult OnDraw(EventArgs e)
Parameters:eEventArgs

The EventArgs instance containing the event data.

Returns:

ActionResult

Overrides: ChartViewController.OnDraw(EventArgs)

Raises the event.

C#
protected virtual void OnLocationChanged(LocationChangedEventArgs e)
Parameters:eLocationChangedEventArgs

The LocationChangedEventArgs instance containing the event data.

Raises the event.

C#
protected override ActionResult OnMouseEnter(EventArgs e)
Parameters:eEventArgs

The EventArgs instance containing the event data.

Returns:

ActionResult

Overrides: ChartViewController.OnMouseEnter(EventArgs)

Raises the event.

C#
protected override ActionResult OnMouseLeave(EventArgs e)
Parameters:eEventArgs

The EventArgs instance containing the event data.

Returns:

ActionResult

Overrides: ChartViewController.OnMouseLeave(EventArgs)

Raises the event.

C#
protected override ActionResult OnMouseMove(MouseEventArgs e)
Parameters:eMouseEventArgs

The MouseEventArgs instance containing the event data.

Returns:

ActionResult

Overrides: ChartViewController.OnMouseMove(MouseEventArgs)

Raises the event.

C#
protected virtual void OnPenInitialized(PenInitializedEventArgs e)
Parameters:ePenInitializedEventArgs

The PenInitializedEventArgs instance containing the event data.

Raises the event.

C#
protected virtual void OnTextNeeded(TextNeededEventArgs e)
Parameters:eTextNeededEventArgs

The TextNeededEventArgs instance containing the event data.

Events

Occurs when the location of the trackball is changed.

C#
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.

C#
public event PenInitializedEventHandler PenInitialized

Occurs when the text of the trackball info element is changed.

C#
public event TextNeededEventHandler TextNeeded