BaseRenderableSeries
Defines the Base class for all RenderableSeries within Ultrachart.
Inherits: ContentControl
Implements: IRenderableSeries, IRenderableSeriesBase, IDrawable, IXmlSerializable
Constructors
BaseRenderableSeries()
Initializes a new instance of the BaseRenderableSeries class.
Properties
AntiAliasing : bool
Gets or sets whether this series uses AntiAliasing when drawn
CurrentRenderPassData : IRenderPassData
Gets or sets the RenderPassData instance used for this render pass
DataSeries : IDataSeries
Gets or sets the DataSeries associated with this series
DisplaysDataAsXy : bool
If true, the data is displayed as XY, e.g. like a Scatter plot, not a line (time) series
DrawNaNAs : LineDrawMode
Gets or sets a value indicating how this renderable series will treat double.NaN. See LineDrawMode for available options
IsSelected : bool
Gets or sets the IsSelectedProperty.
IsValidForDrawing : bool
Gets a value indicating whether this BaseRenderableSeries is valid for drawing.
LegendMarkerTemplate : DataTemplate
Gets or sets the DataTemplate, which defines the Visual to be rendered on the UltrachartLegend as a series marker
PaletteProvider : IPaletteProvider
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 : IPointMarker
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 : ControlTemplate
Gets or sets the PointMarker ControlTemplate, which defines the point-marker Visual to be rendered on each datapoint of the series
ResamplingMode : ResamplingMode
Gets or sets the ResamplingMode used when drawing this series
ResamplingResolution : int
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 : FrameworkElement
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 : ControlTemplate
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 : Style
Gets or sets a style for selected series.
SeriesColor : Color
Gets or sets the SeriesColor.
Services : IServiceContainer
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 : int
Gets or sets the StrokeThickness of the line.
Methods
AssertDataPointType``1(string)
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(double, double, double) : bool
Returns True if the coordinate is between the lower and upper bounds supplied
- coord
- lowerBound
- upperBound
CreateRolloverMarker()
Creates a RolloverMarker from the RolloverMarkerTemplate property
GetChartRotationAngle(IRenderPassData) : double
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(ICoordinateCalculator<double>, IPointSeries, double) : int
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(ICoordinateCalculator<double>, IPointSeries, double, double) : int
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(int, Point, double, IComparable) : HitTestInfo
- rawPoint
- hitTestRadius
- is used to calculate HitTestInfo.IsHit
- nearestDataPointIndex
- hitXValue
GetIsValidForDrawing() : bool
Gets a value indicating whether this BaseRenderableSeries is valid for drawing.
GetParentSurface() : IUltrachartSurface
Gets the parent IUltrachartSurface for this BaseRenderableSeries
GetPointMarker() : IPointMarker
Returns the PointMarker used by this series
GetSchema() : XmlSchema
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(HitTestInfo) : double
When overridden in derived classes, returns the lower value of a compound data point, which is defined by the passed coordinate
GetSeriesBodyUpperDataBound(HitTestInfo) : double
When overridden in derived classes, returns the upper value of a compound data point, which is defined by the passed coordinate
GetSeriesBodyWidth(HitTestInfo) : double
When overridden in derived classes, returns the width of a single bar, which is defined by the passed coordinate
GetSeriesInfo(HitTestInfo) : SeriesInfo
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
GetYRange(IRange, bool) : IRange
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(IRange) : IRange
Returns the data range of the assosiated IDataSeries on Y direction The X-Axis Range currently in view
GetYZeroCoord() : double
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(Point, bool) : HitTestInfo
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(Point, double, bool) : HitTestInfo
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(IRenderContext2D, IRenderPassData)
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(Point, HitTestInfo, double) : HitTestInfo
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(Point, Rect, HitTestInfo) : bool
When overridden in derived classes, performs the hit-test check on the bounding rect of a single series bar
- pt
- boundaries
- nearestHitPoint
IsHitTest(Point, HitTestInfo, double, Point, Point) : bool
When overridden in derived classes, performs hit test on series using interpolated values
- rawPoint
- nearestHitResult
- hitTestRadius
- previousDataPoint
- nextDataPoint
NearestHitResult(Point, double, SearchMode, bool) : HitTestInfo
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(IDataSeries, IDataSeries)
Called when the DataSeries property changes - i.e. a new IDataSeries has been set
- oldDataSeries
- The old IDataSeries
- newDataSeries
- The new IDataSeries
OnDataSeriesDependencyPropertyChanged()
Called when the DataSeries dependency property changes.
OnInvalidateParentSurface(DependencyObject, DependencyPropertyChangedEventArgs)
When called, invalidates the parent UltrachartSurface
- d
- The DependencyObject that raised the event.
- e
- The DependencyPropertyChangedEventArgs instance containing the event data.
OnInvalidateParentSurface()
Raises the InvalidateUltrachartMessage which causes the parent UltrachartSurface to invalidate
OnParentSurfaceViewportSizeChanged()
Called when the parent surface viewport size changes, immediately before a draw pass
OnResamplingModeChanged()
Called when resampling mode changes
OnSeriesColorChanged()
Called when the SeriesColor dependency property changes. Allows derived types to do caching
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(float, float, bool) : Point
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(Point, bool) : Point
Used internally: Transposes a Point depending on whether the current UltrachartSurface is being drawn vertically or not
- point
- isVerticalChart
VerticalSliceHitTest(Point, bool) : HitTestInfo
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
Events
SelectionChanged : EventHandler
Event raised whenever IsSelected property changed
Fields
AntiAliasingProperty : DependencyProperty
Defines the AntiAliasing DependencyProperty
DataSeriesIndexProperty : DependencyProperty
Defines the DataSeriesIndex DependencyProperty
DataSeriesProperty : DependencyProperty
Defines the DataSeries DependencyProperty
DefaultDatapointWidth : int
Default datapoint width used when there is only one point in point series
DefaultHitTestRadius : double
A default radius used in the Boolean) method for interpolation, in RoloverModifier and instead of PointMarker size when it is not set
DrawNaNAsProperty : DependencyProperty
Defines the DrawNaNAs DependencyProperty
IsSelectedProperty : DependencyProperty
Defines the IsSelected DependencyProperty
IsVisibleProperty : DependencyProperty
Defines the IsVisible DependencyProperty
LegendMarkerTemplateProperty : DependencyProperty
Defines the LegendMarkerTemplate DependencyProperty
PaletteProviderProperty : DependencyProperty
Defines the PaletteProvider DependencyProperty
PointMarkerProperty : DependencyProperty
Defines the PointMarker DependencyProperty
PointMarkerTemplateProperty : DependencyProperty
Defines the PointMarkerTemplate DependencyProperty
ResamplingModeProperty : DependencyProperty
Defines the ResamplingMode DependencyProperty
RolloverMarkerTemplateProperty : DependencyProperty
Defines the RolloverMarkerTemplate DependencyProperty
SelectedSeriesStyleProperty : DependencyProperty
Defines the SelectedSelectedSeriesStyle DependencyProperty
SeriesColorProperty : DependencyProperty
Defines the SeriesColor DependencyProperty
StrokeThicknessProperty : DependencyProperty
Defines the StrokeThickness DependencyProperty
XAxisIdProperty : DependencyProperty
Defines the AxisAlignment DependencyProperty
YAxisIdProperty : DependencyProperty
Defines the AxisAlignment DependencyProperty
ZeroLineYProperty : DependencyProperty
Defines the ZeroLineY DependencyProperty