BaseRenderableSeries

StockSharp.Xaml.Charting.Visuals.RenderableSeries

Defines the Base class for all RenderableSeries within Ultrachart.

Inherits: ContentControl

Implements: IRenderableSeries, IRenderableSeriesBase, IDrawable, IXmlSerializable

Constructors

BaseRenderableSeries
protected BaseRenderableSeries()
baseRenderableSeries = BaseRenderableSeries()

Initializes a new instance of the BaseRenderableSeries class.

Properties

AntiAliasing
public bool AntiAliasing { get; set; }
value = baseRenderableSeries.AntiAliasing
baseRenderableSeries.AntiAliasing = value

Gets or sets whether this series uses AntiAliasing when drawn

CurrentRenderPassData
public IRenderPassData CurrentRenderPassData { get; set; }
value = baseRenderableSeries.CurrentRenderPassData
baseRenderableSeries.CurrentRenderPassData = value

Gets or sets the RenderPassData instance used for this render pass

DataSeries
public IDataSeries DataSeries { get; set; }
value = baseRenderableSeries.DataSeries
baseRenderableSeries.DataSeries = value

Gets or sets the DataSeries associated with this series

DisplaysDataAsXy
public virtual bool DisplaysDataAsXy { get; private set; }
value = baseRenderableSeries.DisplaysDataAsXy
baseRenderableSeries.DisplaysDataAsXy = value

If true, the data is displayed as XY, e.g. like a Scatter plot, not a line (time) series

DrawNaNAs
public LineDrawMode DrawNaNAs { get; set; }
value = baseRenderableSeries.DrawNaNAs
baseRenderableSeries.DrawNaNAs = value

Gets or sets a value indicating how this renderable series will treat double.NaN. See LineDrawMode for available options

IsSelected
public bool IsSelected { get; set; }
value = baseRenderableSeries.IsSelected
baseRenderableSeries.IsSelected = value

Gets or sets the IsSelectedProperty.

IsValidForDrawing
internal virtual bool IsValidForDrawing { get; }
value = baseRenderableSeries.IsValidForDrawing

Gets a value indicating whether this BaseRenderableSeries is valid for drawing.

IsVisible
public bool IsVisible { get; set; }
value = baseRenderableSeries.IsVisible
baseRenderableSeries.IsVisible = value

Gets or sets whether the series is visible when drawn

LegendMarkerTemplate
public DataTemplate LegendMarkerTemplate { get; set; }
value = baseRenderableSeries.LegendMarkerTemplate
baseRenderableSeries.LegendMarkerTemplate = value

Gets or sets the DataTemplate, which defines the Visual to be rendered on the UltrachartLegend as a series marker

PaletteProvider
public IPaletteProvider PaletteProvider { get; set; }
value = baseRenderableSeries.PaletteProvider
baseRenderableSeries.PaletteProvider = value

Gets or Sets an optional IPaletteProvider instance, which may be used to override specific data-point colors during rendering. For more details, see the IPaletteProvider documentation

PointMarker
public IPointMarker PointMarker { get; set; }
value = baseRenderableSeries.PointMarker
baseRenderableSeries.PointMarker = value

Gets or sets a BasePointMarker instance directly on the BaseRenderableSeries. When a BasePointMarker is present, then the markers will be drawn at each data-point in the series

PointMarkerTemplate
public ControlTemplate PointMarkerTemplate { get; set; }
value = baseRenderableSeries.PointMarkerTemplate
baseRenderableSeries.PointMarkerTemplate = value

Gets or sets the PointMarker ControlTemplate, which defines the point-marker Visual to be rendered on each datapoint of the series

ResamplingMode
public ResamplingMode ResamplingMode { get; set; }
value = baseRenderableSeries.ResamplingMode
baseRenderableSeries.ResamplingMode = value

Gets or sets the ResamplingMode used when drawing this series

ResamplingResolution
public int ResamplingResolution { get; set; }
value = baseRenderableSeries.ResamplingResolution
baseRenderableSeries.ResamplingResolution = value

Gets or sets the resampling resolution. The default is 2, which results in Nyquist resampling. Lower values are not permitted. Higher values result in potentially more visually accurate rendering, but at the expense of performance

RolloverMarker
public FrameworkElement RolloverMarker { get; }
value = baseRenderableSeries.RolloverMarker

Gets a cached Framework Element which is used as a Rollover Marker. This is generated from a ControlTemplate in xaml via the RolloverMarkerTemplateProperty DependencyProperty

RolloverMarkerTemplate
public ControlTemplate RolloverMarkerTemplate { get; set; }
value = baseRenderableSeries.RolloverMarkerTemplate
baseRenderableSeries.RolloverMarkerTemplate = value

Gets or sets the RolloverMarker ControlTemplate, which defines the Visual to be rendered on the series when the RolloverModifier is enabled and the user moves the mouse.

SelectedSeriesStyle
public Style SelectedSeriesStyle { get; set; }
value = baseRenderableSeries.SelectedSeriesStyle
baseRenderableSeries.SelectedSeriesStyle = value

Gets or sets a style for selected series.

SeriesColor
public Color SeriesColor { get; set; }
value = baseRenderableSeries.SeriesColor
baseRenderableSeries.SeriesColor = value

Gets or sets the SeriesColor.

Services
public IServiceContainer Services { get; set; }
value = baseRenderableSeries.Services
baseRenderableSeries.Services = value

Gets the ServiceContainer which provides access to services throughout Ultrachart. ServiceContainers are created one per UltrachartSurface instance, and shared between peripheral components such as AxisBase, BaseRenderableSeries, ChartModifierBase instances. For a full list of available services, see the remarks on ServiceContainer

StrokeThickness
public int StrokeThickness { get; set; }
value = baseRenderableSeries.StrokeThickness
baseRenderableSeries.StrokeThickness = value

Gets or sets the StrokeThickness of the line.

XAxis
public IAxis XAxis { get; set; }
value = baseRenderableSeries.XAxis
baseRenderableSeries.XAxis = value

Gets or sets the XAxis that this IRenderableSeries is associated with

XAxisId
public string XAxisId { get; set; }
value = baseRenderableSeries.XAxisId
baseRenderableSeries.XAxisId = value

Gets or sets the ID of the X-Axis which this renderable series is measured against

YAxis
public IAxis YAxis { get; set; }
value = baseRenderableSeries.YAxis
baseRenderableSeries.YAxis = value

Gets or sets the YAxis that this IRenderableSeries is associated with

YAxisId
public string YAxisId { get; set; }
value = baseRenderableSeries.YAxisId
baseRenderableSeries.YAxisId = value

Gets or sets the ID of the Y-Axis which this renderable series is measured against

ZeroLineY
public double ZeroLineY { get; set; }
value = baseRenderableSeries.ZeroLineY
baseRenderableSeries.ZeroLineY = value

Gets or sets the value which determines the zero line in Y direction. Used to set the bottom of a column, or the zero line in a mountain

Methods

AssertDataPointType``1
protected void AssertDataPointType<TSeriesPoint>(string dataSeriesType)
baseRenderableSeries.AssertDataPointType(dataSeriesType)

Used internally by the renderer. Asserts that the input data-type is of the correct format for the current BaseRenderableSeries

dataSeriesType
Type of the data series.
CheckIsInBounds
protected static bool CheckIsInBounds(double coord, double lowerBound, double upperBound)
result = BaseRenderableSeries.CheckIsInBounds(coord, lowerBound, upperBound)

Returns True if the coordinate is between the lower and upper bounds supplied

coord
lowerBound
upperBound
CreateRolloverMarker
protected virtual void CreateRolloverMarker()
baseRenderableSeries.CreateRolloverMarker()

Creates a RolloverMarker from the RolloverMarkerTemplate property

GetChartRotationAngle
protected double GetChartRotationAngle(IRenderPassData renderPassData)
result = baseRenderableSeries.GetChartRotationAngle(renderPassData)

Used Internally: Gets the rotation angle of the chart, which is 0 degrees or 90 degrees depending on whether the parent UltrachartSurface has swapped X and Y Axes or not.

renderPassData
The current IRenderPassData
GetDatapointWidth
public int GetDatapointWidth(ICoordinateCalculator<double> xCoordinateCalculator, IPointSeries pointSeries, double widthFraction)
result = baseRenderableSeries.GetDatapointWidth(xCoordinateCalculator, pointSeries, widthFraction)

Gets the width of data-points, used to compute column and OHLC bar widths

xCoordinateCalculator
The current x coordinate calculator.
pointSeries
The current IPointSeries being rendered.
widthFraction
The width fraction from 0.0 to 1.0, where 0.0 is infinitey small, 0.5 takes up half the available width and 1.0 means a data-point is the full width between points
GetDatapointWidth
public int GetDatapointWidth(ICoordinateCalculator<double> xCoordinateCalculator, IPointSeries pointSeries, double barsAmount, double widthFraction)
result = baseRenderableSeries.GetDatapointWidth(xCoordinateCalculator, pointSeries, barsAmount, widthFraction)

Gets the width of data-points, used to compute column and OHLC bar widths

xCoordinateCalculator
The current x coordinate calculator.
pointSeries
The current IPointSeries being rendered.
barsAmount
Amount of bars within viewport
widthFraction
The width fraction from 0.0 to 1.0, where 0.0 is infinitey small, 0.5 takes up half the available width and 1.0 means a data-point is the full width between points
GetHitTestInfo
protected HitTestInfo GetHitTestInfo(int nearestDataPointIndex, Point rawPoint, double hitTestRadius, IComparable hitXValue)
result = baseRenderableSeries.GetHitTestInfo(nearestDataPointIndex, rawPoint, hitTestRadius, hitXValue)
rawPoint
hitTestRadius
is used to calculate HitTestInfo.IsHit
nearestDataPointIndex
hitXValue
GetIsValidForDrawing
protected virtual bool GetIsValidForDrawing()
result = baseRenderableSeries.GetIsValidForDrawing()

Gets a value indicating whether this BaseRenderableSeries is valid for drawing.

GetParentSurface
protected internal IUltrachartSurface GetParentSurface()
result = baseRenderableSeries.GetParentSurface()

Gets the parent IUltrachartSurface for this BaseRenderableSeries

GetPointMarker
protected IPointMarker GetPointMarker()
result = baseRenderableSeries.GetPointMarker()

Returns the PointMarker used by this series

GetSchema
public XmlSchema GetSchema()
result = baseRenderableSeries.GetSchema()

Returns an XmlSchema that describes the XML representation of the object that is produced by the WriteXml method and consumed by the ReadXml method

GetSeriesBodyLowerDataBound
protected virtual double GetSeriesBodyLowerDataBound(HitTestInfo nearestHitPoint)
result = baseRenderableSeries.GetSeriesBodyLowerDataBound(nearestHitPoint)

When overridden in derived classes, returns the lower value of a compound data point, which is defined by the passed coordinate

GetSeriesBodyUpperDataBound
protected virtual double GetSeriesBodyUpperDataBound(HitTestInfo nearestHitPoint)
result = baseRenderableSeries.GetSeriesBodyUpperDataBound(nearestHitPoint)

When overridden in derived classes, returns the upper value of a compound data point, which is defined by the passed coordinate

GetSeriesBodyWidth
protected virtual double GetSeriesBodyWidth(HitTestInfo nearestHitPoint)
result = baseRenderableSeries.GetSeriesBodyWidth(nearestHitPoint)

When overridden in derived classes, returns the width of a single bar, which is defined by the passed coordinate

GetSeriesInfo
public virtual SeriesInfo GetSeriesInfo(HitTestInfo hitTestInfo)
result = baseRenderableSeries.GetSeriesInfo(hitTestInfo)

Converts the result of a Hit-Test operation (HitTestInfo) to a SeriesInfo class, which may be used as a ViewModel when outputting series values as bindings. SeriesInfo is used by the RolloverModifier, CursorModifier and UltrachartLegend classes

hitTestInfo
GetXRange
public virtual IRange GetXRange()
result = baseRenderableSeries.GetXRange()

Returns the data range of the assosiated IDataSeries on X direction

GetYRange
public virtual IRange GetYRange(IRange xRange, bool getPositiveRange)
result = baseRenderableSeries.GetYRange(xRange, getPositiveRange)

Returns the data range of the assosiated IDataSeries on Y direction The X-Axis Range currently in viewIndicates whether to return positive YRange only

GetYRange
public IRange GetYRange(IRange xRange)
result = baseRenderableSeries.GetYRange(xRange)

Returns the data range of the assosiated IDataSeries on Y direction The X-Axis Range currently in view

GetYZeroCoord
protected virtual double GetYZeroCoord()
result = baseRenderableSeries.GetYZeroCoord()

Returns a value that determines the position of Y zero line on a chart. Significant for the series types that render negative data points differently, such as the FastColumnRenderableSeries, FastMountainRenderableSeries, FastImpulseRenderableSeries.

Returns: The value in pixels indicating the position of zero line

HitTest
public HitTestInfo HitTest(Point rawPoint, bool interpolate)
result = baseRenderableSeries.HitTest(rawPoint, interpolate)

Performs a hit-test at the specific mouse point (X,Y coordinate on the parent UltrachartSurface) with the default HitTestRadius, returning a HitTestInfo struct with the results

rawPoint
The mouse point on the parent UltrachartSurface
interpolate
If true, use interpolation to perform a hit-test between data-points, or on the area if a , or

Returns: A HitTestInfo struct with the results

HitTest
public virtual HitTestInfo HitTest(Point rawPoint, double hitTestRadius, bool interpolate)
result = baseRenderableSeries.HitTest(rawPoint, hitTestRadius, interpolate)

Performs a hit-test at the specific mouse point (X,Y coordinate on the parent UltrachartSurface) using passed , returning a HitTestInfo struct with the results

rawPoint
The mouse point on the parent UltrachartSurface
hitTestRadius
The radius in pixels to determine whether a mouse is over a data-point
interpolate
If true, use interpolation to perform a hit-test between data-points, or on the area if a , or

Returns: A HitTestInfo struct with the results

InternalDraw
protected abstract void InternalDraw(IRenderContext2D renderContext, IRenderPassData renderPassData)
baseRenderableSeries.InternalDraw(renderContext, renderPassData)

Draws the series using the IRenderContext2D and the IRenderPassData passed in

renderContext
The render context. This is a graphics object which has methods to draw lines, quads and polygons to the screen
renderPassData
The render pass data. Contains a resampled IPointSeries, the IndexRange of points on the screen and the current YAxis and XAxis ICoordinateCalculator to convert data-points to screen points
InterpolatePoint
protected virtual HitTestInfo InterpolatePoint(Point rawPoint, HitTestInfo nearestHitResult, double hitTestRadius)
result = baseRenderableSeries.InterpolatePoint(rawPoint, nearestHitResult, hitTestRadius)

Interpolation function called by Boolean) when the inpolate flag is true

rawPoint
Mouse point
nearestHitResult
Non-interpolated HitTestInfo
hitTestRadius
The value, which indicates distance used to consider whether the series is hit or not

Returns: Intepolated HitTestInfo

IsBodyHit
protected virtual bool IsBodyHit(Point pt, Rect boundaries, HitTestInfo nearestHitPoint)
result = baseRenderableSeries.IsBodyHit(pt, boundaries, nearestHitPoint)

When overridden in derived classes, performs the hit-test check on the bounding rect of a single series bar

pt
boundaries
nearestHitPoint
IsHitTest
protected virtual bool IsHitTest(Point rawPoint, HitTestInfo nearestHitResult, double hitTestRadius, Point previousDataPoint, Point nextDataPoint)
result = baseRenderableSeries.IsHitTest(rawPoint, nearestHitResult, hitTestRadius, previousDataPoint, nextDataPoint)

When overridden in derived classes, performs hit test on series using interpolated values

rawPoint
nearestHitResult
hitTestRadius
previousDataPoint
nextDataPoint
NearestHitResult
protected virtual HitTestInfo NearestHitResult(Point mouseRawPoint, double hitTestRadiusInPixels, SearchMode searchMode, bool considerYCoordinateForDistanceCalculation)
result = baseRenderableSeries.NearestHitResult(mouseRawPoint, hitTestRadiusInPixels, searchMode, considerYCoordinateForDistanceCalculation)

Called by Boolean) to get the nearest (non-interpolated) HitTestInfo to the mouse point

mouseRawPoint
The mouse point
hitTestRadiusInPixels
The radius (in pixels) to use when determining if the is over a data-point
searchMode
The search mode.
considerYCoordinateForDistanceCalculation
if set to true then perform a true euclidean distance to find the nearest hit result.

Returns: The HitTestInfo result

OnDataSeriesDependencyPropertyChanged
protected virtual void OnDataSeriesDependencyPropertyChanged(IDataSeries oldDataSeries, IDataSeries newDataSeries)
baseRenderableSeries.OnDataSeriesDependencyPropertyChanged(oldDataSeries, newDataSeries)

Called when the DataSeries property changes - i.e. a new IDataSeries has been set

oldDataSeries
The old IDataSeries
newDataSeries
The new IDataSeries
OnDataSeriesDependencyPropertyChanged
protected virtual void OnDataSeriesDependencyPropertyChanged()
baseRenderableSeries.OnDataSeriesDependencyPropertyChanged()

Called when the DataSeries dependency property changes.

OnInvalidateParentSurface
protected static void OnInvalidateParentSurface(DependencyObject d, DependencyPropertyChangedEventArgs e)
BaseRenderableSeries.OnInvalidateParentSurface(d, e)

When called, invalidates the parent UltrachartSurface

d
The DependencyObject that raised the event.
e
The DependencyPropertyChangedEventArgs instance containing the event data.
OnInvalidateParentSurface
public virtual void OnInvalidateParentSurface()
baseRenderableSeries.OnInvalidateParentSurface()

Raises the InvalidateUltrachartMessage which causes the parent UltrachartSurface to invalidate

OnParentSurfaceViewportSizeChanged
protected virtual void OnParentSurfaceViewportSizeChanged()
baseRenderableSeries.OnParentSurfaceViewportSizeChanged()

Called when the parent surface viewport size changes, immediately before a draw pass

OnResamplingModeChanged
protected virtual void OnResamplingModeChanged()
baseRenderableSeries.OnResamplingModeChanged()

Called when resampling mode changes

OnSeriesColorChanged
protected virtual void OnSeriesColorChanged()
baseRenderableSeries.OnSeriesColorChanged()

Called when the SeriesColor dependency property changes. Allows derived types to do caching

ReadXml
public virtual void ReadXml(XmlReader reader)
baseRenderableSeries.ReadXml(reader)

Generates BaseRenderableSeries from its XML representation.

reader
StockSharp#Xaml#Charting#Visuals#IDrawable#OnDraw(IRenderContext2D, IRenderPassData)

Called when the instance is drawn

renderContext
The IRenderContext2D used for drawing
renderPassData
The current render pass data
TransformPoint
protected Point TransformPoint(float x, float y, bool isVerticalChart)
result = baseRenderableSeries.TransformPoint(x, y, isVerticalChart)

Transposes a point (swaps X, Y) if the flag is true

x
The X-Value
y
The Y-Value
isVerticalChart
A flag indicating the orientation of the chart

Returns: The transposed point

TransformPoint
protected Point TransformPoint(Point point, bool isVerticalChart)
result = baseRenderableSeries.TransformPoint(point, isVerticalChart)

Used internally: Transposes a Point depending on whether the current UltrachartSurface is being drawn vertically or not

point
isVerticalChart
VerticalSliceHitTest
public HitTestInfo VerticalSliceHitTest(Point rawPoint, bool interpolate)
result = baseRenderableSeries.VerticalSliceHitTest(rawPoint, interpolate)

Performs a hit-test at the specific mouse point with zero hit-test radius. Method considers only X value and returns a HitTestInfo struct based on the data point with the closest X value

rawPoint
The mouse point on the parent UltrachartSurface
interpolate
If true, use interpolation to perform a hit-test between data-points, or on the area if a , or

Returns: A HitTestInfo struct with the results

WriteXml
public virtual void WriteXml(XmlWriter writer)
baseRenderableSeries.WriteXml(writer)

Converts BaseRenderableSeries into its XML representation.

writer

Events

SelectionChanged
public event EventHandler SelectionChanged
baseRenderableSeries.SelectionChanged += handler

Event raised whenever IsSelected property changed

Fields

AntiAliasingProperty
public static readonly DependencyProperty AntiAliasingProperty
value = BaseRenderableSeries.AntiAliasingProperty

Defines the AntiAliasing DependencyProperty

DataSeriesIndexProperty
public static readonly DependencyProperty DataSeriesIndexProperty
value = BaseRenderableSeries.DataSeriesIndexProperty

Defines the DataSeriesIndex DependencyProperty

DataSeriesProperty
public static readonly DependencyProperty DataSeriesProperty
value = BaseRenderableSeries.DataSeriesProperty

Defines the DataSeries DependencyProperty

DefaultDatapointWidth
private const int DefaultDatapointWidth
value = BaseRenderableSeries.DefaultDatapointWidth

Default datapoint width used when there is only one point in point series

DefaultHitTestRadius
public const double DefaultHitTestRadius
value = BaseRenderableSeries.DefaultHitTestRadius

A default radius used in the Boolean) method for interpolation, in RoloverModifier and instead of PointMarker size when it is not set

DrawNaNAsProperty
public static readonly DependencyProperty DrawNaNAsProperty
value = BaseRenderableSeries.DrawNaNAsProperty

Defines the DrawNaNAs DependencyProperty

IsSelectedProperty
public static readonly DependencyProperty IsSelectedProperty
value = BaseRenderableSeries.IsSelectedProperty

Defines the IsSelected DependencyProperty

IsVisibleProperty
public static readonly DependencyProperty IsVisibleProperty
value = BaseRenderableSeries.IsVisibleProperty

Defines the IsVisible DependencyProperty

LegendMarkerTemplateProperty
public static readonly DependencyProperty LegendMarkerTemplateProperty
value = BaseRenderableSeries.LegendMarkerTemplateProperty

Defines the LegendMarkerTemplate DependencyProperty

PaletteProviderProperty
public static readonly DependencyProperty PaletteProviderProperty
value = BaseRenderableSeries.PaletteProviderProperty

Defines the PaletteProvider DependencyProperty

PointMarkerProperty
public static readonly DependencyProperty PointMarkerProperty
value = BaseRenderableSeries.PointMarkerProperty

Defines the PointMarker DependencyProperty

PointMarkerTemplateProperty
public static readonly DependencyProperty PointMarkerTemplateProperty
value = BaseRenderableSeries.PointMarkerTemplateProperty

Defines the PointMarkerTemplate DependencyProperty

ResamplingModeProperty
public static readonly DependencyProperty ResamplingModeProperty
value = BaseRenderableSeries.ResamplingModeProperty

Defines the ResamplingMode DependencyProperty

RolloverMarkerTemplateProperty
public static readonly DependencyProperty RolloverMarkerTemplateProperty
value = BaseRenderableSeries.RolloverMarkerTemplateProperty

Defines the RolloverMarkerTemplate DependencyProperty

SelectedSeriesStyleProperty
public static readonly DependencyProperty SelectedSeriesStyleProperty
value = BaseRenderableSeries.SelectedSeriesStyleProperty

Defines the SelectedSelectedSeriesStyle DependencyProperty

SeriesColorProperty
public static readonly DependencyProperty SeriesColorProperty
value = BaseRenderableSeries.SeriesColorProperty

Defines the SeriesColor DependencyProperty

StrokeThicknessProperty
public static readonly DependencyProperty StrokeThicknessProperty
value = BaseRenderableSeries.StrokeThicknessProperty

Defines the StrokeThickness DependencyProperty

XAxisIdProperty
public static readonly DependencyProperty XAxisIdProperty
value = BaseRenderableSeries.XAxisIdProperty

Defines the AxisAlignment DependencyProperty

YAxisIdProperty
public static readonly DependencyProperty YAxisIdProperty
value = BaseRenderableSeries.YAxisIdProperty

Defines the AxisAlignment DependencyProperty

ZeroLineYProperty
public static readonly DependencyProperty ZeroLineYProperty
value = BaseRenderableSeries.ZeroLineYProperty

Defines the ZeroLineY DependencyProperty