Class
ChartTrackballController

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.ChartView.dll

Syntax:

cs-api-definition
public class ChartTrackballController : ChartViewController, INotifyPropertyChanged

Inheritance: objectControllerChartViewControllerChartTrackballController

Implements: INotifyPropertyChanged

Inherited Members ChartViewController.OnMouseDown(MouseEventArgs)ChartViewController.OnMouseCaptureChanged(EventArgs)ChartViewController.OnMouseClick(MouseEventArgs)ChartViewController.OnMouseDoubleClick(MouseEventArgs)ChartViewController.OnMouseHover(EventArgs)ChartViewController.OnMouseUp(MouseEventArgs)ChartViewController.OnMouseWheel(MouseEventArgs)ChartViewController.OnKeyDown(KeyEventArgs)ChartViewController.OnKeyPress(KeyPressEventArgs)ChartViewController.OnKeyUp(KeyEventArgs)ChartViewController.OnGesture(GestureEventArgs)ChartViewController.OnZoomGesture(ZoomGestureEventArgs)ChartViewController.OnRotateGesture(RotateGestureEventArgs)ChartViewController.OnPanGesture(PanGestureEventArgs)ChartViewController.OnTwoFingerTapGesture(GestureEventArgs)ChartViewController.OnPressAndTapGesture(PressAndTapGestureEventArgs)ChartViewController.ExecuteCore(object, object)ChartViewController.ViewChartViewController.AreaController.EmptyController.OnPropertyChanged(string)Controller.ProcessNextController.PropertyChanged

Constructors

ChartTrackballController()

Initializes a new instance of the ChartTrackballController class.

Declaration

cs-api-definition
public ChartTrackballController()

Properties

DrawPoints

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

Declaration

cs-api-definition
public bool DrawPoints { get; set; }

Property Value

bool

Element

Gets the info element of the controller.

Declaration

cs-api-definition
public TrackballInfoElement Element { get; }

Property Value

TrackballInfoElement

FixedSize

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

Declaration

cs-api-definition
public virtual Size FixedSize { get; set; }

Property Value

Size

InfoElementOffset

Gets or sets the offset of the info element.

Declaration

cs-api-definition
public virtual Size InfoElementOffset { get; set; }

Property Value

Size

InnerPointSize

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

Declaration

cs-api-definition
public virtual SizeF InnerPointSize { get; set; }

Property Value

SizeF

InteractiveTrackball

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

Declaration

cs-api-definition
public virtual bool InteractiveTrackball { get; set; }

Property Value

bool

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.

Declaration

cs-api-definition
public virtual bool IsFixedSize { get; set; }

Property Value

bool

LineColor

Gets or sets the color of the line.

Declaration

cs-api-definition
public virtual Color LineColor { get; set; }

Property Value

Color

LineWidth

Gets or sets the width of the trackball line.

Declaration

cs-api-definition
public virtual float LineWidth { get; set; }

Property Value

float

OuterPointsSize

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

Declaration

cs-api-definition
public virtual SizeF OuterPointsSize { get; set; }

Property Value

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

cs-api-definition
public string PointFormatString { get; set; }

Property Value

string

PointsFill

Gets or sets the trackball points fill.

Declaration

cs-api-definition
public virtual Color PointsFill { get; set; }

Property Value

Color

Methods

BuildPointsDictionary()

Creates lists of datapoints grouped by their X, Y or angle coordinate depending on the type of the chart.

Declaration

cs-api-definition
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

cs-api-definition
protected override void ControllerAdded(ChartView view)

Parameters

view

ChartView

The view this controller is added to.

Overrides ChartViewController.ControllerAdded(ChartView)

ControllerRemoved()

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

Declaration

cs-api-definition
protected override void ControllerRemoved()

Overrides ChartViewController.ControllerRemoved()

CreateInfoElement()

Creates the element that is displaying the trackball information.

Declaration

cs-api-definition
protected virtual TrackballInfoElement CreateInfoElement()

Returns

TrackballInfoElement

An instance of the TrackballInfoElement

GetCartesianTrackballElementLocation(PointF)

Gets the location where the info element should be positioned.

Declaration

cs-api-definition
protected virtual PointF GetCartesianTrackballElementLocation(PointF location)

Parameters

location

PointF

The mouse location.

Returns

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

cs-api-definition
protected virtual List<DataPointInfo> GetClosestPoints(PointF location)

Parameters

location

PointF

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

cs-api-definition
protected virtual Color GetColorForDataPoint(ChartSeries series, DataPoint point)

Parameters

series

ChartSeries

The series to which the point belongs.

point

DataPoint

The point to get the color for.

Returns

Color

The color of the point element.

GetPointText(DataPoint)

Gets the text for a specific data point.

Declaration

cs-api-definition
protected virtual string GetPointText(DataPoint point)

Parameters

point

DataPoint

The point.

Returns

string

The formatted text for the point.

GetRadialTrackballElementLocation(PointF)

Gets the location where the info element should be positioned.

Declaration

cs-api-definition
protected virtual PointF GetRadialTrackballElementLocation(PointF location)

Parameters

location

PointF

The mouse location.

Returns

PointF

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

GetTrackballElementLocation(PointF)

Gets the trackball element location.

Declaration

cs-api-definition
protected virtual PointF GetTrackballElementLocation(PointF location)

Parameters

location

PointF

The mouse location.

Returns

PointF

The location for the trackball element.

GetTrackballText(List<DataPointInfo>)

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

Declaration

cs-api-definition
protected virtual string GetTrackballText(List<DataPointInfo> points)

Parameters

points

List<DataPointInfo>

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

Returns

string

The text to be displayed.

InitializeFields()

Initializes the Trackball controller with the default settings.

Declaration

cs-api-definition
protected virtual void InitializeFields()

MoveTrackball(PointF)

Changes the location of the trackball according to the location.

Declaration

cs-api-definition
protected virtual void MoveTrackball(PointF location)

Parameters

location

PointF

The location.

OnDraw(EventArgs)

Raises the event.

Declaration

cs-api-definition
protected override ActionResult OnDraw(EventArgs e)

Parameters

e

EventArgs

The EventArgs instance containing the event data.

Returns

ActionResult

Overrides ChartViewController.OnDraw(EventArgs)

OnLocationChanged(LocationChangedEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnLocationChanged(LocationChangedEventArgs e)

Parameters

e

LocationChangedEventArgs

The LocationChangedEventArgs instance containing the event data.

OnMouseEnter(EventArgs)

Raises the event.

Declaration

cs-api-definition
protected override ActionResult OnMouseEnter(EventArgs e)

Parameters

e

EventArgs

The EventArgs instance containing the event data.

Returns

ActionResult

Overrides ChartViewController.OnMouseEnter(EventArgs)

OnMouseLeave(EventArgs)

Raises the event.

Declaration

cs-api-definition
protected override ActionResult OnMouseLeave(EventArgs e)

Parameters

e

EventArgs

The EventArgs instance containing the event data.

Returns

ActionResult

Overrides ChartViewController.OnMouseLeave(EventArgs)

OnMouseMove(MouseEventArgs)

Raises the event.

Declaration

cs-api-definition
protected override ActionResult OnMouseMove(MouseEventArgs e)

Parameters

e

MouseEventArgs

The MouseEventArgs instance containing the event data.

Returns

ActionResult

Overrides ChartViewController.OnMouseMove(MouseEventArgs)

OnPenInitialized(PenInitializedEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnPenInitialized(PenInitializedEventArgs e)

Parameters

e

PenInitializedEventArgs

The PenInitializedEventArgs instance containing the event data.

OnTextNeeded(TextNeededEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnTextNeeded(TextNeededEventArgs e)

Parameters

e

TextNeededEventArgs

The TextNeededEventArgs instance containing the event data.

Events

LocationChanged

Occurs when the location of the trackball is changed.

Declaration

cs-api-definition
public event LocationChangedEventHandler LocationChanged

Event Value

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

cs-api-definition
public event PenInitializedEventHandler PenInitialized

Event Value

PenInitializedEventHandler

TextNeeded

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

Declaration

cs-api-definition
public event TextNeededEventHandler TextNeeded

Event Value

TextNeededEventHandler