UltrachartSurface
Provides a high performance chart surface with a single RenderSurfaceBase viewport for rendering multiple IRenderableSeries, multiple X and Y IAxis instances, with IDataSeries bindings, mulitple ChartModifierBase derived behaviour modifiers and multiple AnnotationBase UIElement Annotations
Inherits: UltrachartSurfaceBase
Implements: IUltrachartSurface, IUltrachartSurfaceBase, ISuspendable, IInvalidatableElement, IUltrachartController, IDisposable, IXmlSerializable
Constructors
internal UltrachartSurface(IServiceContainer mockServices)
ultrachartSurface = UltrachartSurface(mockServices)
Internal Ctor used for tests
- mockServices
public UltrachartSurface()
ultrachartSurface = UltrachartSurface()
Initializes a new instance of the UltrachartSurface class.
Properties
public Canvas AdornerLayerCanvas { get; }
value = ultrachartSurface.AdornerLayerCanvas
Gets the Adorner Layer over the chart
public ICommand AnimateZoomExtentsCommand { get; set; }
value = ultrachartSurface.AnimateZoomExtentsCommand
ultrachartSurface.AnimateZoomExtentsCommand = value
Gets or sets the Animate zoom extents command, which when invoked, causes the UltrachartSurface to zoom to extents using animation
public IAnnotationCanvas AnnotationOverlaySurface { get; }
value = ultrachartSurface.AnnotationOverlaySurface
Gets the Annotation Canvas over the chart
public AnnotationCollection Annotations { get; set; }
value = ultrachartSurface.Annotations
ultrachartSurface.Annotations = value
Gets the AnnotationCollection which provides renderable annotations over the UltrachartSurface
public IAnnotationCanvas AnnotationUnderlaySurface { get; }
value = ultrachartSurface.AnnotationUnderlaySurface
Gets the Annotation Canvas under the chart
public bool AutoRangeOnStartup { get; set; }
value = ultrachartSurface.AutoRangeOnStartup
ultrachartSurface.AutoRangeOnStartup = value
Gets or sets a value indicating whether Ultrachart will attempt to perform a one-time AutoRange on startup
public AxisArea AxisAreaBottom { get; }
value = ultrachartSurface.AxisAreaBottom
Gets the Bottom AxisArea, which contains the Axes which have AxisAlignment set to Bottom
public AxisArea AxisAreaLeft { get; }
value = ultrachartSurface.AxisAreaLeft
Gets the Left AxisArea, which contains the Axes which have AxisAlignment set to Left
public AxisArea AxisAreaRight { get; }
value = ultrachartSurface.AxisAreaRight
Gets the Right AxisArea, which contains the Axes which have AxisAlignment set to Right
public AxisArea AxisAreaTop { get; }
value = ultrachartSurface.AxisAreaTop
Gets the Top AxisArea, which contains the Axes which have AxisAlignment set to Top
public ItemsPanelTemplate BottomAxesPanelTemplate { get; set; }
value = ultrachartSurface.BottomAxesPanelTemplate
ultrachartSurface.BottomAxesPanelTemplate = value
Gets or sets the template that defines the panel which controls the layout of bottom-aligned axes
public AxisArea CenterXAxisArea { get; }
value = ultrachartSurface.CenterXAxisArea
Gets the center AxisArea which contains XAxes with IsCenterAxis flag equals to true
public AxisArea CenterYAxisArea { get; }
value = ultrachartSurface.CenterYAxisArea
Gets the center AxisArea which contains YAxes with IsCenterAxis flag equals to true
public IChartModifier ChartModifier { get; set; }
value = ultrachartSurface.ChartModifier
ultrachartSurface.ChartModifier = value
Gets or sets the current ChartModifier, which alters the behaviour of the chart
public bool ClipOverlayAnnotations { get; set; }
value = ultrachartSurface.ClipOverlayAnnotations
ultrachartSurface.ClipOverlayAnnotations = value
Gets or sets whether annotations over the chart should clip to bounds or not. Default value is True
public bool ClipUnderlayAnnotations { get; set; }
value = ultrachartSurface.ClipUnderlayAnnotations
ultrachartSurface.ClipUnderlayAnnotations = value
Gets or sets whether annotations under the chart should clip to bounds or not. Default value is true
public IGridLinesPanel GridLinesPanel { get; }
value = ultrachartSurface.GridLinesPanel
Gets the GridLinesPanel where gridlines are drawn
public Style GridLinesPanelStyle { get; set; }
value = ultrachartSurface.GridLinesPanelStyle
ultrachartSurface.GridLinesPanelStyle = value
Gets or sets the GridLinesPanel style.
public bool IsPolarChart { get; private set; }
value = ultrachartSurface.IsPolarChart
ultrachartSurface.IsPolarChart = value
Gets whether this UltrachartSurface is a polar chart or not
public ItemsPanelTemplate LeftAxesPanelTemplate { get; set; }
value = ultrachartSurface.LeftAxesPanelTemplate
ultrachartSurface.LeftAxesPanelTemplate = value
Gets or sets the template that defines the panel which controls the layout of left-aligned axes
public ObservableCollection<IRenderableSeries> RenderableSeries { get; set; }
value = ultrachartSurface.RenderableSeries
ultrachartSurface.RenderableSeries = value
Gets the collection of RenderableSeries that this UltrachartSurface draws.
public Style RenderSurfaceStyle { get; set; }
value = ultrachartSurface.RenderSurfaceStyle
ultrachartSurface.RenderSurfaceStyle = value
Gets or sets the RenderSurface style.
public ItemsPanelTemplate RightAxesPanelTemplate { get; set; }
value = ultrachartSurface.RightAxesPanelTemplate
ultrachartSurface.RightAxesPanelTemplate = value
Gets or sets the template that defines the panel which controls the layout of right-aligned axes
public ObservableCollection<IRenderableSeries> SelectedRenderableSeries { get; private set; }
value = ultrachartSurface.SelectedRenderableSeries
ultrachartSurface.SelectedRenderableSeries = value
Gets the collection of RenderableSeries that are selected.
public ObservableCollection<IChartSeriesViewModel> SeriesSource { get; set; }
value = ultrachartSurface.SeriesSource
ultrachartSurface.SeriesSource = value
The SeriesSource property allows data-binding to a collection of IChartSeriesViewModel instances, for pairing of DataSeries with IRenderableSeries
internal IStackedColumnsWrapper StackedColumnsWrapper { get; set; }
value = ultrachartSurface.StackedColumnsWrapper
ultrachartSurface.StackedColumnsWrapper = value
Gets StackedColumnsWrapper that allows user to customize drawing of StackedColumnRenderableSeries
internal IStackedMountainsWrapper StackedMountainsWrapper { get; set; }
value = ultrachartSurface.StackedMountainsWrapper
ultrachartSurface.StackedMountainsWrapper = value
Gets StackedMountainsWrapper that allows user to customize drawing of StackedMountainRenderableSeries
public ItemsPanelTemplate TopAxesPanelTemplate { get; set; }
value = ultrachartSurface.TopAxesPanelTemplate
ultrachartSurface.TopAxesPanelTemplate = value
Gets or sets the template that defines the panel which controls the layout of top-aligned axes
public static string VersionAndLicenseInfo { get; }
value = UltrachartSurface.VersionAndLicenseInfo
Returns version and license info as a formatted string
public IViewportManager ViewportManager { get; set; }
value = ultrachartSurface.ViewportManager
ultrachartSurface.ViewportManager = value
Gets or sets the ViewportManager instance on the chart, which handles behavior of the viewport on render
public AxisCollection XAxes { get; set; }
value = ultrachartSurface.XAxes
ultrachartSurface.XAxes = value
Gets the collection of X-Axis IAxis that this UltrachartSurface measures against
public IAxis XAxis { get; set; }
value = ultrachartSurface.XAxis
ultrachartSurface.XAxis = value
Gets or sets the primary XAxis on the UltrachartSurface (default side=Bottom)
public AxisCollection YAxes { get; set; }
value = ultrachartSurface.YAxes
ultrachartSurface.YAxes = value
Gets the collection of Y-Axis IAxis that this UltrachartSurface measures against
public IAxis YAxis { get; set; }
value = ultrachartSurface.YAxis
ultrachartSurface.YAxis = value
Gets or sets the primary YAxis on the UltrachartSurface (default side=Right)
public ICommand ZoomExtentsCommand { get; set; }
value = ultrachartSurface.ZoomExtentsCommand
ultrachartSurface.ZoomExtentsCommand = value
Gets or sets the zoom extents command, which when invoked, causes the UltrachartSurface to zoom to extents
Methods
public void AnimateZoomExtents(TimeSpan duration)
ultrachartSurface.AnimateZoomExtents(duration)
Zooms to extents with the specified animation duration
- duration
- The duration of animation when zooming to extents
public void AnimateZoomExtentsX(TimeSpan duration)
ultrachartSurface.AnimateZoomExtentsX(duration)
Zooms the chart to the extents of the data in the X-Direction, using animation with the specified duration
- duration
- The duration of the animation
public void AnimateZoomExtentsY(TimeSpan duration)
ultrachartSurface.AnimateZoomExtentsY(duration)
Zooms the chart to the extents of the data in the Y-Direction, accounting for the current data in view in the X-direction
- duration
public void AttachDataSeries(IDataSeries dataSeries)
ultrachartSurface.AttachDataSeries(dataSeries)
Attaches listeners for DataSeries.DataSeriesChanged
- dataSeries
public void ClearSeries()
ultrachartSurface.ClearSeries()
Removes all DataSeries from the Ultrachart
public void DecrementSuspend()
ultrachartSurface.DecrementSuspend()
Called by IUpdateSuspender each time a target suspender is disposed. When the final target suspender has been disposed, ResumeUpdates is called
public void DetachDataSeries(IDataSeries dataSeries)
ultrachartSurface.DetachDataSeries(dataSeries)
Detaches listeners for DataSeries.DataSeriesChanged
- dataSeries
public BitmapSource ExportToBitmapSource()
result = ultrachartSurface.ExportToBitmapSource()
Export snapshot of current UltrachartSurface to BitmapSource
public void ExportToFile(string fileName, ExportType exportType)
ultrachartSurface.ExportToFile(fileName, exportType)
Saves snapshot of current UltrachartSurface to file
- fileName
- exportType
- Defines format of file to export
public Rect GetBoundsRelativeTo(IHitTestable relativeTo)
result = ultrachartSurface.GetBoundsRelativeTo(relativeTo)
Gets the bounds of the current HitTestable element relative to another HitTestable element
- relativeTo
- The relative to.
public XmlSchema GetSchema()
result = ultrachartSurface.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
public IRange GetWindowedYRange(IAxis yAxis, IRange xRange)
result = ultrachartSurface.GetWindowedYRange(yAxis, xRange)
Equivalent of calling YAxis.GetMaximumRange() however returns the max range only for that axis (by the data-series on it) "windowed" = "displayed in current viewport" uses GrowBy()
- yAxis
- xRange
public bool IsPointWithinBounds(Point point)
result = ultrachartSurface.IsPointWithinBounds(point)
Returns true if the Point is within the bounds of the current HitTestable element
- point
- The point to test
Returns: true if the Point is within the bounds
protected override Size MeasureOverride(Size constraint)
result = ultrachartSurface.MeasureOverride(constraint)
Called to remeasure a control.
- constraint
- The maximum size that the method can return.
Returns: The size of the control, up to the maximum specified by .
public override void OnApplyTemplate()
ultrachartSurface.OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in an application. For more information, see Remarks.
public Size OnArrangeUltrachart()
result = ultrachartSurface.OnArrangeUltrachart()
Preparations for a render pass, called internally, returns the viewport size
Returns: The required Viewport Size
public void OnAxisAlignmentChanged(IAxis axis, AxisAlignment oldValue)
ultrachartSurface.OnAxisAlignmentChanged(axis, oldValue)
Called internally by Ultrachart when AxisAlignment changes. Allows the UltrachartSurface to reposition the axis, args.g. at the top, left, bottom, right
- axis
- oldValue
protected override void OnDataContextChanged(DependencyPropertyChangedEventArgs e)
ultrachartSurface.OnDataContextChanged(e)
Called when the UltrachartSurfaceBase DataContext changes.
- e
- The DependencyPropertyChangedEventArgs instance containing the event data.
public void OnIsCenterAxisChanged(IAxis axis)
ultrachartSurface.OnIsCenterAxisChanged(axis)
Called internally by Ultrachart when IsCenterAxis changes. Allows the UltrachartSurface to place the axis in the center of chart
- axis
public override void OnUltrachartRendered()
ultrachartSurface.OnUltrachartRendered()
Raises the Rendered event, fired at the end of a render pass immediately before presentation to the screen
protected override void OnUltrachartSurfaceLoaded()
ultrachartSurface.OnUltrachartSurfaceLoaded()
Called when the UltrachartSurfaceBase is loaded. Perform initialization operations here.
protected override void OnUltrachartSurfaceSizeChanged()
ultrachartSurface.OnUltrachartSurfaceSizeChanged()
Called when the UltrachartSurfaceBase Size changes. Perform render surface resize or redraw operations here
protected override void OnUltrachartSurfaceUnloaded()
ultrachartSurface.OnUltrachartSurfaceUnloaded()
Called when the UltrachartSurfaceBase is Unloaded and removed from the visual tree. Perform cleanup operations here
public void Print(string description)
ultrachartSurface.Print(description)
Outputs current UltrachartSurface to printer
- description
- Description of printing job
public virtual void ReadXml(XmlReader reader)
ultrachartSurface.ReadXml(reader)
Generates UltrachartSurface from its XML representation.
- reader
protected override void RegisterServices(IServiceContainer serviceContainer)
ultrachartSurface.RegisterServices(serviceContainer)
Called in the constructor of UltrachartSurfaceBase, gives derived classes the opportunity to register services per UltrachartSurfaceBase instance
Returns: The populated IServiceContainer. Must not return null. Return at least an empty ServiceContainer
public void ResumeUpdates(IUpdateSuspender updateSuspender)
ultrachartSurface.ResumeUpdates(updateSuspender)
Resumes updates on the target, intended to be called by IUpdateSuspender
public IUpdateSuspender SuspendUpdates()
result = ultrachartSurface.SuspendUpdates()
Suspends drawing updates on the target until the returned object is disposed, when a final draw call will be issued
Returns: The disposable Update Suspender
public Point TranslatePoint(Point point, IHitTestable relativeTo)
result = ultrachartSurface.TranslatePoint(point, relativeTo)
Translates the point relative to the other hittestable element
- point
- The point.
- relativeTo
- The relative to.
public virtual void WriteXml(XmlWriter writer)
ultrachartSurface.WriteXml(writer)
Converts UltrachartSurface into its XML representation.
- writer
public virtual void ZoomExtents()
ultrachartSurface.ZoomExtents()
Zooms the chart to the extents of the data, plus any X or Y Grow By fraction set on the X and Y Axes
public void ZoomExtentsX()
ultrachartSurface.ZoomExtentsX()
Zooms the chart to the extents of the data in the X-Direction
public void ZoomExtentsY()
ultrachartSurface.ZoomExtentsY()
Zooms the chart to the extents of the data in the Y-Direction, accounting for the current data in view in the X-direction
Events
public event EventHandler AnnotationsCollectionNewCollectionAssigned
ultrachartSurface.AnnotationsCollectionNewCollectionAssigned += handler
Event raised when Annotations DependencyProperty is changed
public event EventHandler<AxisAlignmentChangedEventArgs> AxisAlignmentChanged
ultrachartSurface.AxisAlignmentChanged += handler
Event raised when alignment of any axis changed
public event EventHandler XAxesCollectionNewCollectionAssigned
ultrachartSurface.XAxesCollectionNewCollectionAssigned += handler
Event raised when XAxes DependnecyProperty is changed
public event EventHandler YAxesCollectionNewCollectionAssigned
ultrachartSurface.YAxesCollectionNewCollectionAssigned += handler
Event raised when YAxes DependnecyProperty is changed
Fields
public static readonly DependencyProperty AnimateZoomExtentsCommandProperty
value = UltrachartSurface.AnimateZoomExtentsCommandProperty
Defines the ZoomExtentsCommand DependencyProperty
public static readonly DependencyProperty AnnotationsProperty
value = UltrachartSurface.AnnotationsProperty
Defines the Annotations DependencyProperty
public static readonly DependencyProperty AutoRangeOnStartupProperty
value = UltrachartSurface.AutoRangeOnStartupProperty
Defines the AutoRangeOnStartup DependencyProperty
public static readonly DependencyProperty BottomAxesPanelTemplateProperty
value = UltrachartSurface.BottomAxesPanelTemplateProperty
Defines the RightAxisPanelTemplate DependencyProperty
public static readonly DependencyProperty ChartModifierProperty
value = UltrachartSurface.ChartModifierProperty
Defines the ChartModifier DependencyProperty
public static readonly DependencyProperty ClipOverlayAnnotationsProperty
value = UltrachartSurface.ClipOverlayAnnotationsProperty
Defines the ClipOverlayAnnotations DepedencyProperty
public static readonly DependencyProperty ClipUnderlayAnnotationsProperty
value = UltrachartSurface.ClipUnderlayAnnotationsProperty
Defines the ClipUnderlayAnnotations DependencyProperty
public static readonly DependencyProperty GridLinesPanelStyleProperty
value = UltrachartSurface.GridLinesPanelStyleProperty
Defines the GridLinesPanelStyle DependencyProperty
public static readonly DependencyProperty IsPolarChartProperty
value = UltrachartSurface.IsPolarChartProperty
Defines the IsPolarChart DependencyProperty
public static readonly DependencyProperty LeftAxesPanelTemplateProperty
value = UltrachartSurface.LeftAxesPanelTemplateProperty
Defines the LeftAxisPanelTemplate DependencyProperty
public static readonly DependencyProperty RenderableSeriesProperty
value = UltrachartSurface.RenderableSeriesProperty
Defines the RenderableSeries DependencyProperty
public static readonly DependencyProperty RenderSurfaceStyleProperty
value = UltrachartSurface.RenderSurfaceStyleProperty
Defines the RenderSurfaceStyle DependencyProperty
public static readonly DependencyProperty RightAxesPanelTemplateProperty
value = UltrachartSurface.RightAxesPanelTemplateProperty
Defines the RightAxisPanelTemplate DependencyProperty
public static readonly DependencyProperty SelectedRenderableSeriesProperty
value = UltrachartSurface.SelectedRenderableSeriesProperty
Defines the SelectedRenderableSeries DependencyProperty
public static readonly DependencyProperty SeriesSourceProperty
value = UltrachartSurface.SeriesSourceProperty
Defines the SeriesSource DependencyProperty
public static readonly DependencyProperty TopAxesPanelTemplateProperty
value = UltrachartSurface.TopAxesPanelTemplateProperty
Defines the RightAxisPanelTemplate DependencyProperty
public static readonly DependencyProperty ViewportManagerProperty
value = UltrachartSurface.ViewportManagerProperty
Defines the ViewportManager DependencyProperty
public static readonly DependencyProperty XAxesProperty
value = UltrachartSurface.XAxesProperty
Defines the YAxes DependencyProperty
public static readonly DependencyProperty XAxisProperty
value = UltrachartSurface.XAxisProperty
Defines the XAxis DependencyProperty
public static readonly DependencyProperty YAxesProperty
value = UltrachartSurface.YAxesProperty
Defines the YAxes DependencyProperty
public static readonly DependencyProperty YAxisProperty
value = UltrachartSurface.YAxisProperty
Defines the YAxis DependencyProperty
public static readonly DependencyProperty ZoomExtentsCommandProperty
value = UltrachartSurface.ZoomExtentsCommandProperty
Defines the ZoomExtentsCommand DependencyProperty