Table of Contents

Class ViewSmith

Namespace
LightningChartLib.WinForms.Charting.Views.ViewSmith
Assembly
LightningChart.WinForms.Charting.NET4.dll

ViewSmith class inherits ViewSmithBase.

[TypeConverter(typeof(ExpandableObjectConverter))]
public class ViewSmith : ViewSmithBase, IChartNode, IDisposable
Inheritance
ViewSmith
Implements
Inherited Members

Constructors

ViewSmith()

public ViewSmith()

ViewSmith(LightningChart)

public ViewSmith(LightningChart owner)

Parameters

owner LightningChart

Properties

Axis

Smith axis.

public AxisSmith Axis { get; set; }

Property Value

AxisSmith

DataCursor

Data cursor shows series data value at or near mouse position.

public DataCursorSmith DataCursor { get; set; }

Property Value

DataCursorSmith

ZoomCenter

View center coordinates.

public PointSmith ZoomCenter { get; set; }

Property Value

PointSmith

Methods

CalcRadius(double)

Calculates radius in pixels for given zoom factor.

protected override double CalcRadius(double zoomFactor)

Parameters

zoomFactor double

LightningChartLib.WinForms.Charting.Views.ViewRound.ViewRoundBase.m_dZoomScale

Returns

double

Radius in pixels.

Construct()

One time initialization method, called from all constructors.

protected override void Construct()

DeviceButtonClickCheck(ObjectType, UserInteractiveDeviceEventArgs, UserInteractiveDeviceEventType, bool, bool)

Check if user interactive device button was clicked.

protected override bool DeviceButtonClickCheck(View2D.ObjectType type, UserInteractiveDeviceEventArgs eventArguments, UserInteractiveDeviceEventType eventType, bool bIsOutsideGraphArea, bool Front = true)

Parameters

type View2D.ObjectType
eventArguments UserInteractiveDeviceEventArgs
eventType UserInteractiveDeviceEventType
bIsOutsideGraphArea bool
Front bool

Returns

bool

DeviceButtonDownCheck(ObjectType, UserInteractiveDeviceEventArgs, bool, bool)

Virtual method to override if the class wants to handle user interactive device button down event of axis on proper time.

protected override bool DeviceButtonDownCheck(View2D.ObjectType type, UserInteractiveDeviceEventArgs eventArguments, bool bIsOutsideGraphArea, bool front = true)

Parameters

type View2D.ObjectType
eventArguments UserInteractiveDeviceEventArgs
bIsOutsideGraphArea bool
front bool

Returns

bool

True if the event was consumed.

Remarks

This version does nothing.

DeviceButtonUpCheck(ObjectType, UserInteractiveDeviceEventArgs, UserInteractiveDeviceEventType, bool, ref bool, ref bool, bool)

Checks if the user interactive device button up event applies to the given item.

protected override void DeviceButtonUpCheck(View2D.ObjectType type, UserInteractiveDeviceEventArgs eventArguments, UserInteractiveDeviceEventType eventType, bool bIsOutsideGraphArea, ref bool bMousedObjectFirst, ref bool bExit, bool front = true)

Parameters

type View2D.ObjectType
eventArguments UserInteractiveDeviceEventArgs
eventType UserInteractiveDeviceEventType
bIsOutsideGraphArea bool
bMousedObjectFirst bool
bExit bool
front bool

Dispose(bool)

Clean up any resources being used.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true if managed resources should be disposed, otherwise false.

FireBeforePanningEvent(PointUnitCircle)

Event launcher for zoom events.

protected override bool FireBeforePanningEvent(PointUnitCircle newCenter)

Parameters

newCenter PointUnitCircle

Returns

bool

FirePannedEvent(PointUnitCircle)

Called after successful panning. Launches the after event.

protected override bool FirePannedEvent(PointUnitCircle oldCenter)

Parameters

oldCenter PointUnitCircle

Returns

bool

GetDataBounds()

Getter of the bounding box for the series data in PX.

protected override RectangleXYF GetDataBounds()

Returns

RectangleXYF

GetViewCornerValues(out PointSmith, out PointSmith)

Getter of the current views top-left and bottom-right corner axis values.

public void GetViewCornerValues(out PointSmith leftTopCorner, out PointSmith rightBottomCorner)

Parameters

leftTopCorner PointSmith

Views top-left corner axis values.

rightBottomCorner PointSmith

Views bottom-right corner axis values.

GetViewCornerValues(out PointSmith, out PointSmith, out PointSmith, out PointSmith)

Getter of the current views top-left, bottom-left, top-right and bottom-right corner axis values.

public void GetViewCornerValues(out PointSmith leftTopCorner, out PointSmith rightTopCorner, out PointSmith rightBottomCorner, out PointSmith leftBottomCorner)

Parameters

leftTopCorner PointSmith

Views top-left corner axis values.

rightTopCorner PointSmith

Views top-right corner axis values.

rightBottomCorner PointSmith

Views bottom-right corner axis values.

leftBottomCorner PointSmith

Views bottom-left corner axis values.

HandleDeviceMoved(ObjectType, UserInteractiveDeviceEventArgs, bool, UserInteractiveObject, bool)

Handler for the user interactive device movements.

protected override bool HandleDeviceMoved(View2D.ObjectType type, UserInteractiveDeviceEventArgs eventArguments, bool bIsOutsideGraphArea, UserInteractiveObject mibHandled, bool front = true)

Parameters

type View2D.ObjectType
eventArguments UserInteractiveDeviceEventArgs
bIsOutsideGraphArea bool
mibHandled UserInteractiveObject
front bool

Returns

bool

HandleMarginsChanged()

Handler gets Graph segment information

protected override void HandleMarginsChanged()

HandleViewChanged()

Virtual method that is called when zoom or panning properties have changed. The Chart update cycle has not been ended yet. Implement to react to the event.

protected override void HandleViewChanged()

OnDeserialized(StreamingContext)

OnDeserialized is called just after the object has been deserialized

[OnDeserialized]
protected void OnDeserialized(StreamingContext context)

Parameters

context StreamingContext

Context

UserDeviceCheckStarting()

User interactive device has been moved.

protected override void UserDeviceCheckStarting()

Zoom(PointSmith, PointSmith)

Zooms the view to given rectangle, defined by the axis values of the diagonal corners of the rectangle. If the rectangle is of wrong aspect ratio, center point of the given rectangle is followed.

public void Zoom(PointSmith corner1, PointSmith corner2)

Parameters

corner1 PointSmith

One corner axis values.

corner2 PointSmith

One corner axis values.

ZoomCenterChanged()

Reacts to changes in the base ZoomCenter (UC) property, updates local Smith zoom center. To be called each time the ZoomCenter is modified or modification is detected in the base class.

protected override void ZoomCenterChanged()

Events

BeforePanning

Panning is about to start.

public event ViewSmith.BeforePanningEventHandler BeforePanning

Event Type

ViewSmith.BeforePanningEventHandler

Panned

Panning has ended.

public event ViewSmith.PannedEventHandler Panned

Event Type

ViewSmith.PannedEventHandler