Pre loader

SciChart WPF v8.0 Released!

SciChart WPF v8.0 Released!

SciChart WPF is now ten years young and still remains the highest rated WPF Chart Control, and best WPF chart on the market!

Today we are pleased to announce continued improvement to our flagship product: SciChart WPF: v8.0. This update (v8.0.0 build 27737) includes a number of features & improvements. To find out what is new, read on below!

What’s New in SciChart v8.0?

Version 8.0 at a glance:

  1. New 3D Axis Label, Title positioning algorithm in SciChart 3D
  2. Configurable Orientation for Axis Labels and Titles in SciChart 3D
  3. Added Styling for Axis Titles in SciChart 3D
  4. Configurable 3D Axis Cube Sides/Wall/Axis visibility
  5. Faster VisualXcceleratorEngine Startup, Async Startup and auto cleanup
  6. Multiple UI Threads Support for the VisualXccelerator Renderer
  7. Multiple Application Domains Support for the VisualXccelerator Renderer
  8. Improved 2D Text Drawing API
  9. Key Bindings for ChartModifiers
  10. Updated Homepage for the SciChart WPF Examples App
  11. WPF Examples Export with NuGet Packages
  12. Reworked a 3D Example
  13. 5x Faster Line Chart loading with Slim Line Series
  14. New DPI-Aware SciChartSurface Example in Sandbox
  15. Other Features & Improvements
  16. Documentation Updates
  17. Bug Fixes
  18. Bug Fixes Since v8 Beta
  19. Breaking Changes

1. New 3D Axis Label, Title positioning algorithm in SciChart 3D

Totally reworked positioning of Axis Labels and Axis Titles in SciChart 3D in order to provide better experience. Multiple cases of labels and titles overlapping have been resolved with the new positioning system:

2. Configurable Orientation for Axis Labels and Titles in SciChart 3D

Added the AxisTitleOrientation and TickLabelOrientation properties to the Axis3D class. They allow to specify desired orientation for the Axis Title and Axis Labels: Auto, Horizontal, Vertical (Vertical is not available for Axis Labels). Vertical and Horizontal orientation modes are relative to the screen boundaries:

These properties can be set in code as shown in the code snippet below:

<s3D:SciChart3DSurface WorldDimensions="200,100,200">
  <s3D:SciChart3DSurface.XAxis>
    <s3D:NumericAxis3D AxisTitle="X-Axis" AxisTitleOrientation="Horizontal" TickLabelOrientation="Horizontal" />
  </s3D:SciChart3DSurface.XAxis>
  <s3D:SciChart3DSurface.YAxis>
    <s3D:NumericAxis3D AxisTitle="Y-Axis" AxisTitleOrientation="Vertical" TickLabelOrientation="Horizontal" />
  </s3D:SciChart3DSurface.YAxis>
  <s3D:SciChart3DSurface.ZAxis>
    <s3D:NumericAxis3D AxisTitle="Z-Axis" AxisTitleOrientation="Auto" TickLabelOrientation="Auto" />
  </s3D:SciChart3DSurface.ZAxis>
</s3D:SciChart3DSurface>

3. Added Styling for Axis Titles in SciChart 3D

In earlier versions of SciChart 3D, Axis Title could not be styled separately from Axis Labels. Now, styling of Axis3D Titles is supported via the TitleStyle property in the Axis3D class. A custom Style with TargetType=”TextBlock” should be provided for styling the Axis Title. At the moment, styling options are limited to FontFamily, FontSize and Foreground settings.

The new styling is demonstrated in the “Style 3D Chart” example:

The code snippet below demonstrates how to provide a custom Style for an Axis3D Title:

<!-- Declare Axis Style with a Title Style -->
<Style x:Key="YAxisStyle" TargetType="s3D:AxisBase3D">
  <Setter Property="TitleStyle">
    <Setter.Value>
      <Style TargetType="TextBlock">
        <Setter Property="Foreground" Value="{StaticResource ExtraThemeStrokeBrush_5}" />
        <Setter Property="FontSize" Value="18" />
        <Setter Property="FontFamily" Value="Verdana" />
      </Style>
    </Setter.Value>
  </Setter>
</Style>

...

<!-- Apply Axis Styles to the SciChart3DSurface -->
<s3D:SciChart3DSurface WorldDimensions="200,100,200">
  <s3D:SciChart3DSurface.XAxis>
    <s3D:NumericAxis3D AxisTitle="X-Axis" Style="{StaticResource XAxisStyle}" />
  </s3D:SciChart3DSurface.XAxis>
  <s3D:SciChart3DSurface.YAxis>
    <s3D:NumericAxis3D AxisTitle="Y-Axis" Style="{StaticResource YAxisStyle}" />
  </s3D:SciChart3DSurface.YAxis>
  <s3D:SciChart3DSurface.ZAxis>
    <s3D:NumericAxis3D AxisTitle="Z-Axis" Style="{StaticResource ZAxisStyle}" />
  </s3D:SciChart3DSurface.ZAxis>
</s3D:SciChart3DSurface>

4. Configurable 3D Axis Cube

Axis Cube Planes can be hidden via the AxisPlanes API, which is represented by three static classes ZxAxisPlane, XyAxisPlane, ZyAxisPlane in SciChart.Charting3D.Visuals.AxisLabels namespace. The classes define AxisPlaneVisibilityMode and IsPlaneVisible attached properties. They allow configuring visibility for individual planes of the 3D Axis Cube by specifying whether an Axis Plane should appear by setting  the IsPlaneVisible property and also choosing the visible side of the Axis Plane via the AxisPlaneVisibilityMode property. This side visibility setting has three options: Negative, Positive or Auto, which correspond to the directions of World Coordinates in SciChart 3D.

This is demonstrated in the “Add Geometry to a 3D Chart” example:

The usage in code is as follows:

<s3D:SciChart3DSurface x:Name="sciChart3DSurface"
   WorldDimensions="400,400,400"
   s3D:ZxAxisPlane.AxisPlaneVisibilityMode="NegativeSide"
   s3D:XyAxisPlane.IsPlaneVisible="False"
   s3D:ZyAxisPlane.IsPlaneVisible="False">
<!-- Other SciChart3DSurface settings here -->
</s3D:SciChart3DSurface>

5. Faster VisualXcceleratorEngine Startup, Async Startup and auto cleanup

Added API to manually control VisualXccelerator Engine. It does all drawing when VisualXccelerator renderer (hardware-accelerated renderer) is used.

The new API allows for improving startup speed of applications that use SciChart with VisualXccelerator renderer and provides more control over the Engine life time. Specifically, it is possible to start/restart the engine, choose when to stop it and inspect its status and configuration options during the runtime.

There is no explicit way to shut down the engine. This is done intentionally, since stopping the engine during rendering pass would cause a runtime error and result in a non-recoverable crash. However, setting the VisualXcceleratorEngine.UseAutoShutdown property to “True” makes the engine to shut down immefiately if there is no SciChartSurface using it. Otherwise, the engine will shut down when the last renderer instance that is using it is disposed or finalized.

The new methods and properties have been added to the SciChart.Charting.VisualXcceleratorEngine static class:

For example, this API is used to configure the VisualXccelerator Engine in the Bootstrapper of SciChart Examples Demo, as shown in the code snippet below. The full source code can be found in Sandbox on our GitHub:

try
{
  VisualXcceleratorEngine.UseAutoShutdown = false;
  VisualXcceleratorEngine.RestartEngine();
}
catch
{
  // Suppress Vx init errors. All rendering will occur with a fallback
}

6. Multiple UI Threads Support for the VisualXccelerator Renderer

The VisualXccelerator renderer now supports multiple UI threads. We reworked SciChart API on the C# side that was used to control the VisualXccelerator Engine, adding appropriate synchronization mechanisms and thus allowing multi-threaded rendering. However, please note that underlying VisualXccelerator Engine works in synchronous manner and rendering is still synchronous in the SciChart native code.

This example on SciChart GitHub demonstrates how to create a WPF Application with a couple of Windows, where each Window has its own UI thread. Both Windows show SciChart charts that can be configured to use specific renderer via a Style for SciChartSurface found in App.xaml.

7. Multiple Application Domains Support for the VisualXccelerator Renderer

Application Domains is a .NET mechanism that allows isolating multiple Applications within a single native process.

Before SciChart v8, VisualXccelerator Engine that is used for SciChart 3D and hardware-accelerated rendering in SciChart 2D did not allow being shared across multiple Application Domains. Since SciChart v8, the engine allows being used in an application that utilizes multiple Application Domains.

However, such support is limited due to the essence of Application Domains, which is isolation at the managed layer. No communication is possible between different Application Domains which makes rendering synchronization impossible. And since renderign with VisualXccelerator Engine is synchronous in its nature, it doesn’t support parallel rendering calls which may be the case when multiple Application Domains use SciChart with the hardware-accelerated renderer.

This example on SciChart GitHub demonstrates how to use SciChart in a solution that uses multiple Application Domains.

8. Improved 2D Text Drawing API

Added the IRenderContext2D.MeasureText(string, float, FontFamily, FontWeight, FontStyle) method to the IRenderContext2D API.
It provides the means for measuring text size for the particualr renderer in use. The method should be used together with the IRenderContext2D.DrawText(Point, string, float, FontFamily, FontWeight, FontStyle, Color) method to find the size of a text and determine whether it should be drawn of not.
For example, this is how Heatmap uses these methods to draw text labels in cells:

var cellText = RenderableSeries.FormatDataValue(zValue, xInd, yInd);
var textSize = renderContext.MeasureText(cellText, fontSize, fontFamily, fontWeight, fontStyle);
if (textSize.Width < cellRect.Width && textSize.Height < cellRect.Height)
{ 
  var textPoint = new Point 
  { 
    X = cellRect.Left + (cellRect.Width - textSize.Width) / 2,
    Y = cellRect.Top + (cellRect.Height - textSize.Height) / 2 
  };
  renderContext.DrawText(textPoint, cellText, fontSize, fontFamily, fontWeight, fontStyle, cellTextColor);
}

9. Key Bindings for ChartModifiers

Added the ExecuteWhen property to ChartModifiers that allows specifying a key modifier. When the key is pressed, ChartModifier will be enabled to execute its action.
This code snippet shows how to specify key modifiers in XAML:

<s:SciChartSurface.ChartModifier>
  <s:ModifierGroup>
    <s:RubberBandXyZoomModifier ExecuteWhen="Ctrl" />
    <s:ZoomPanModifier ExecuteWhen="Shift" />
    <s:CursorModifier ExecuteWhen="Alt" />
    <s:ZoomExtentsModifier />
  </s:ModifierGroup>
</s:SciChartSurface.ChartModifier>

10. Updated Homepage for the SciChart WPF Examples App

Download the demo installer today to see the new-look examples app. Don’t forget you can also clone it on Github here: github.com/abtsoftware/scichart.wpf.examples.

11. WPF Examples Export with NuGet Packages

When exporting examples, there is a new option added that allows to reference the latest SciChart packages from NuGet. This is a handy option to start quickly with a new application that uses SciChart, for creating a demo project, or for making a small example to send to our support:

12. Reworked a 3D Example

The “Add Geometry to a 3D Chart” example has been reworked to demonstrate usage of the Coordinate Transformation API and the new Axis Planes API in SciChart 3D.

13. 5x Faster Line Chart loading with Slim Line Series

Added a new example that demonstrates a custom SlimLineRenderableSeries.

It can be used in performance-demanding scenarios where display of large amount of line series (tens of thousands) is required. The SlimLineRenderableSeries does not derive from the WPF UI types and therefore has an advantage in construction time. This helps to improve chart loading time significantly (can be up to x5 times) in the use-case mentioned above. On the other hand, the drawback of this approach is that SlimLineRenderableSeries cannot participate in Binding and thus may be considered not suitable for MVVM scenarios.

The example can be found on SciChart GitHub.

14. New DPI-Aware SciChartSurface Example in Sandbox

Added a new example that demonstrates how to configure a 2D chart to render scaled-down.

From time to time our customers ask how to make a resolution-independent chart. This is important for use-cases where multiple scaling levels (or displays) have to be supported by an application that contains charts. When at high-scaling levels, default SciChart charts may appear blurry because it relies on raster graphics.

While SciChart doesn’t support such use-cases out of the box, there is a solution available. It is to scale SciChartSurface down using WPF capabilities (applying a ScaleTransform). This appoach is demonstrated in our new example that can be found on SciChart GitHub:

15. Other Features & Improvements

  • Visibility of RenderableSeries can be controlled through the Visibility property
  • Improved AnnotationCreationModifier to not change internally the selectable and editable state of a new Annotation
  • Improved error handling in SciChart 2D and 3D

16. Documentation Updates

17. Bug Fixes

  • SC-6761, SC-6971 Fixed intermittent misalignment between Axis ticks & gridlines with VisualXccelerator Renderer in SciChart 2D
  • SC-7350 Fixed AnnotationCreationModifier to stop setting IsSelected, IsEditable internally to mark a created annotation
  • SC-7226 Fixed a crash in SciChartSurface c-tor when VxRenderer is not supported
  • SC-7299 Fixed a crash in XyzDataSeries<int> with FastBubbleRenderableSeries.AutoZRange=”True”
  • SC-7318 Fixed an issue when XAxis remained cached by RenderableSeries even after being removed from SciChartSurface
  • SC-7047 Fixed an issue with 3DAxis.PlaneBorder not applying when Right-Handed coordinate system
  • SC-7454 Fixed incorrect behavior of XyAxisPlane.DrawLabelsMode when Z-Axis is pointing upward
  • SC-7475 Fixed an issue when Text Color was ignored in custom TextEntities if chart background was assigned a light color

18. Bug Fixes Since v8 Beta

  • SC-7613 Fixed an issue with hit-testing of Waterfall 3D Series
  • SC-7613 Fixed an issue when selected slices of Waterfall 3D Series would change after the chart is rotated
  • SC-7527 Fixed an issue in SciChart 3D when Axis Plane Border would appear incorrectly with Right-Handed Coordinate System
  • SC-7547 Fixed an issue when Tooltips would not appear for Stacked Column Series with CategoryDateTimeAxis
  • SC-7608 Fixed an issue Rollover and Legend would wort incorrectly with CategoryDateTimeAxis in some use-cases
  • SC-7609 Fixed an issue when a series that used HlcDataSeries would not appear with CategoryDateTimeAxis
  • SC-7563 Fixed an issue when ChartModifiers with overlays (like RolloverModifier) would remain on top of a chart after the used ModifierKey was released
  • SC-7493 Fixed an issue when a series that used OhlcDataSeries would appear with gaps when there is large number of data points
  • SC-7567 Fixed an issue when SciChartToolbar2D (Examples Demo) would produce a NullReferenceException when used with SciChart MVVM API for Axes

19. Breaking Changes

This is a list of breaking changes in SciChart SDK v8.0.

Changes in SciChart 3D APIs

  • Behavior change: Totally reworked positioning of Axis Labels and Axis Titles in SciChart 3D in order to provide better experience and resolve cases of labels and titles overlapping
  • Obsolete property: Axis3D.TickLabelAlignment property has been made Obsolete. Please use the TickLabelOrientation property instead. See more details here
  • Obsolete property: SciChart3DSurface.AxisPlaneVisibilityMode property has been made Obsolete. To change visibility of World Box planes please set AxisPlaneVisibilityMode and IsPlaneVisible attached properties on SciChartSurface. See more details here
  • API change: Added a new parameter to the CameraController.Update() method. The updated method signature is CameraController.Update(bool hasChanges = true)
  • API change: Method signature changes in some SCRT*** classes due to VisualXccelerator Engine update. Although these classes are part of the public API, they are used internally most of the time

Changes in SciChart 2D APIs

  • Behavior change: Changed default behavior of AnnotationCreationModifier. Now it doesn’t change internal state of a new Annotation by setting IsEditable and IsSelected properties. These properties can be set separately in an AnnotationCreationModifier.AnnotationCreated event handler
  • Obsolete property: Static property VisualXcceleratorEngine.UseAlternativeFillSource has been marked Obsolete. Fill source is resolved per instance now, so the property has been replaced by the instance property VisualXcceleratorRenderSurface.UseAlternativeFillSource
  • API change: Added a new parameter to the IAxisPanel.DrawTicks(TickCoordinate, float) method. This change impacts AxisPanel and PolarAxisPanel classes and all implementors of the IAxisPanel interface. The updated method signature is IAxisPanel.DrawTicks(TickCoordinates tickCoords, float offset, bool isSoftwareMode)
  • API change: Removed the Dispatcher parameter from the RenderTimer class constructor
  • API change: Changed the signature of ChartModifierBase.MatchesExecuteOn(MouseButtons mouseButtons, ExecuteOn executeOn) method: added two MouseModifier parameters. The updated method signature is ChartModifierBase.MatchesExecuteOn(MouseButtons mouseButtons, MouseModifier modifierKey, ExecuteOn executeOn, MouseModifier executeOnModifier)
  • API change: Reworked the API of VisualXcceleratorRenderSurface class. Removed the VisualXcceleratorRenderSurface(VxRenderSettings) constructor. Now, rendering settings for the VisualXccelerator renderer can be provided through the VisualXcceleratorEngine static class. Please find more details here

Changes in the IRenderContext API

  • API change: Removed the Rect parameter (second parameter) from the IRenderContext2D.DrawSprite(ISprite2D srcSprite, Rect srcRect, Point destPoint) method. It was not used internally but might have forced users to calculate Sprite boundaries before calling it. The updated method signature is IRenderContext.DrawSprite(ISprite2D srcSprite, Point destPoint)
  • API change: Removed the Rect parameter (second parameter) from the IRenderContext2D.DrawSprites(ISprite2D sprite2D, Rect srcRect, IEnumerable<Point> points) method. It was not used internally but might have forced users to calculate Sprite boundaries before calling it. The updated method signature is IRenderContext.DrawSprites(ISprite2D sprite2D, IEnumerable<Point> points)
  • API change: IRenderContext2D.DrawText(Rect, Color, float, string, FontFamily, FontWeight, FontStyle) has been made Obsolete. It was problematic because there was no means to measure text size provided by the API. In SciChart v8.0, new method has been added that allows measuring text size. Please use IRenderContext2D.DrawText(Point, string, float, FontFamily, FontWeight, FontStyle, Color) and IRenderContext2D.MeasureText(string, float, FontFamily, FontWeight, FontStyle) instead. See this section for more details
  • API change: Added a new method to the IVxRenderContext interface: IVxRenderContext.BeginFrame(). When using IRenderContext API for drawing with VisualXccelerator renderer, the IVxRenderContext.BeginFrame() method must be called before any drawing operations. When using other SciChart drawing APIs such as Custom RenderableSeries API, this is not required because the method is called by SciChart internally. Please see the “Using RenderContext API” example in Sandbox on our GitHub for a usage example

Where to get it

SciChart WPF v8.0 is available by:

  • Downloading the installer from our scichart.com/downloads page
  • Using Install-Package or Update-Package from NuGet
  • By cloning and compiling the examples source code on GitHub
  • By cloning or downloading the SciChart source code on GitHub (source code customers only)

Please ensure you uninstall the previous version(s) of SciChart before installing the latest version as this can prevent some issues in the upgrade process!

Leaving Feedback

We welcome your feedback! Please let us know what you think about our new features, examples and improvements. You can contact our friendly, helpful team at any time!

 

By Andrew Burnett-Thompson | Oct 24, 2023
CEO / Founder of SciChart. Masters (MEng) and PhD in Electronics & Signal Processing.Follow me on LinkedIn for more SciChart content, or twitter at @drandrewbt.

Leave a Reply