RSS Feed
News
Jan
17
DirectX WPF Chart Compatibility
Posted by Andrew on 17 January 2017 10:40 AM

SciChart now features an optional DirectX10 based renderer. This is currently included as an add-on to the SciChart High Performance WPF Charts library. For more info about the renderer plugins that SciChart provides, please see the articles High Quality vs. High Speed vs. DirectX Renderer Plugins as well as How Fast is SciChart’s DirectX WPF Chart.

Once we move away from the happy, safe world of .NET and into unmanaged code, we need to take a few extra steps to ensure compatibility! This post aims to address compatibility issues with using the Direct3D10RenderSurface, a premium add-on to SciChart High Performance WPF Charts.


Direct3D10RenderSurface System Requirements

Operating System Requirements

The SciChart Direct3D10RenderSurface requires Windows Vista, 7, 8, 8.1 or higher.

Hardware Requirements

The SciChart Direct3D10RenderSurface requires a DirectX10 compatible GPU.

You can check the DirectX version your GPU supports by running the DXDiag.exe application, found under your windows start menu.

Prerequisites

The SciChart Direct3D10Renderer has a dependency on D3DX9_43.dll and D3DX10_43.dll.

D3DX9 and 10 are extensions to DirectX and are not installed with Windows as standard.


Deploying your SciChart Application with the Direct3D10RenderSurface

Developer PCs and End-User PCs have the same system requirements to run the SciChart DirectX Renderer. To ensure your SciChart application can use the Direct3D10RenderSurface wherever available, and downgrade to software renderer when not available, please follow these steps:

1. Enable the DirectX Renderer

Follow the example at Easy Fallback from DirectX to Software Rendering without code behind:

<SciChartSurface DirectXHelper.TryApplyDirectXRenderer="True">

...
</SciChartSurface>
2. Distribute SharpDX 2.6.2 with your Application

The Direct3D10RenderSurface also has a dependency on SharpDX v2.6.3 (a Managed Wrapper for DirectX, licensed under the MIT License).

Please make sure the following DLLs are in your output directory (where your application exe resides) when deploying applications with DirectX. SharpDX is also available on NuGet.

  • SharpDX.D3DCompiler.dll (part of SharpDX v2.6.3)
  • SharpDX.Direct3D9.dll
  • SharpDX.Direct3D10.dll
  • SharpDX.dll
  • SharpDX.DXGI.dll

SharpDX_Dependencies

3. Ensure the DirectX Runtime is installed on End-User PCs

All End-User PCs must have the DirectX Runtime installed. The package is included in the SciChart v3.2.4 or later installation directory at %InstallDir%\Prerequisites\DirectX.

You will need to include the DirectX Prerequisites and install DXSetup.exe on end-user PCs when you deploy your application*. To silently install the DirectX Runtime on end-user PC’s, please run the following command line in your application deployment process:

EXEC DXSetup.exe /silent

SciChart DirectX Prerequisites Installer

*Microsoft permits you to redistribute the above files with your end-user applications royalty free. The licensing terms for DXSetup can be found in the licensing agreement of the DirectX End-User Runtimes (June 2010)


Frequently Asked Questions

Q: How can I check at runtime if the DirectX renderer is supported on my PC?

A: You can use the Direct3D10CompatibilityHelper class!

Usage:

/// <summary>
/// A helper class which can be used to detect if the Direct3D10 enhancements to SciChart can run on the current hardware & operating system
/// </summary>
public static class Direct3D10CompatibilityHelper
{
   /// <summary>
   /// Supported operating systems include Windows Vista, Windows 7, Windows 8, 8.1 and up. Windows XP, 2000, 2003 are not supported.
   /// </summary>
   public static bool IsSupportedOperatingSystem { get; }

   /// <summary>
   /// Determines if the DirectX10 Runtime Libraries can be found in the C:\Windows\System32 and C:\Windows\SysWow64 folders. If the libraries are not present, we recommend
   /// installing the DirectX Runtime from %SciChart Install Dir%/Prerequisites/DirectX.
   /// This installs platform specific libraries (x86, x64) and SciChart dynamically chooses the correct DirectX version at runtime
   /// </summary>
   public static bool HasDirectX10RuntimeInstalled { get; }

   /// <summary>
   /// Determines if the current GPU supports DirectX10 or later
   /// </summary>
   public static bool HasDirectX10CapableGpu { get; }

   /// <summary>
   /// Determines if the current hardware & software configuration fully supports DirectX10 or later
   /// </summary>
   public static bool SupportsDirectX10 { get { return IsSupportedOperatingSystem && HasDirectX10RuntimeInstalled && HasDirectX10CapableGpu; } }
}
Q: Do I have to install the DirectX Runtime on every End-User PC?

A: SciChart actually only requires D3DX9_43.dll and D3DX10_43.dll

The way to deploy them is by including DXSetup.exe and related files (found in the %SciChartInstallDir%\Prerequisites\DirectX folder) with your application deployment. You can run DXSetup on end-user PCs by calling the command line

EXEC DXSetup.exe /silent

Please note: The licensing terms for the DirectX Runtime restrict you from packaging or embedding the required DLLs with your application, but allows distributing DXSetup and associated files in the %SciChartInstallDir%/Prerequisites/DirectX folder. You must run the DXSetup installer on end-user PCs to remain compliant with Microsofts terms.

Q: Does the DirectX Renderer Work over Remote Desktop?

A: We use D3DImage, which is a Microsoft control that allows sharing of DirectX content with WPF, avoiding airspace issues and allowing fast interop between WPF’s DirectX9 and DirectX10 rendering.

Unfortunately D3DImage has a bug, a nasty one. It won’t work over remote desktop if your application is .NET4.0! It will work over Remote Desktop on .NET4.5 and above.

Since SciChart v4 we have developed a workaround where SciChart DirectX will now work over remote desktop. This is automatic and no changes need to be applied to your code.

Q: I am experiencing flicker with DirectX in my application

Please see this FAQ which talks about how to resolve the problem of Flickering Charts in SciChart.

Q: How much faster is the DirectX Renderer than the Software Renderer?

A: The answer will depend on your exact hardware, software configuration and what you are doing with the chart. In our tests we found the DirectX Renderer to be on average 3.92x faster than the High Speed software renderer, and with superior visual quality (sub-pixel antialiasing).

Not bad for a drop-in upgrade!

 

Got Feedback?

DirectX is a big part of our future, so we want to make this work for you. If you experience compatibility issues or other problems using the DirectX renderer, then please do get in contact with your feedback. We would love to be of assistance.

 

The post DirectX WPF Chart Compatibility appeared first on WPF Charts, iOS and Android Charts | SciChart.


Read more »



Nov
10
SciChart WPF: New set of tutorials now online
Posted by Andrew on 10 November 2016 03:42 PM

If you are new to SciChart WPF, or have recently started using it, it’s well worth taking a look at our new set of tutorials for SciChart WPF!

These include the following topics:

Tutorials include:

By the end of the tutorials you should end up with a multi-chart, multi-axis chart, with realtime updates and annotations, scrollbars, zooming and panning behaviour, tooltips and legends, which looks a little like this:

multiple-charts-linked-events

If you are experienced with SciChart WPF, it’s worth having a look to give us your feedback.

Also, if you have any feedback for us about topics to include for future tutorials that would also be greatly appreciated.

Thank you!
[SciChart Team]

 

The post SciChart WPF: New set of tutorials now online appeared first on WPF Charts, iOS and Android Charts | SciChart.


Read more »



Jun
16
Getting Started with SciChart Android
Posted by Andrew on 16 June 2016 09:18 PM

Ok so you’ve downloaded and installed the SciChart Android Charts Trial. Great! Now what?
Check out this Quickest of the QuickStart Guide below which shows you how to open the Examples Suite and see what SciChart Android can do.

// Learning by Example – The Examples Suite

browse-android-examples-videoBoth the SciChart Zip archive and Source-Code version feature a rich examples suite with over 30+ examples, including full text search, source-code exports and more. You can find out more at the Android Chart Examples page.

We also have a full walkthrough of starting and using the Examples Suite in the Android SciChart Documentation that you can find when unzipping the Android Charts SDK – whether you’re using Source-Code version or you just downloaded the Zip archive.

// Viewing and Exporting Example

android-show-source-codeIf that’s not enough, the entire Examples Suite source-code is shipped with the SciChart Android in both Source-Code and “Zip” versions.

Our examples suite allows you to not only view source-code but also export individual examples to stand alone Android Studio project.

// Starting your SciChart Android Trial

When you download and compile our SciChart Android Examples, you will see an error message that you must apply a trial license. To get a trial license key and apply it to the SciChart Android Examples, or to your own apps, please follow the steps from Licensing SciChart Android

// I just want to build a Simple Line Chart

HeatmapChart_framedOk, so check out our Four Part Tutorial on Creating a new Android Chart Application with SciChart. It will walk you through the basics, right from setting up a development environment through to creating your first Android App, adding a Fragment (a view) and a SciChartSurface with X,Y Axis and one Renderable Series.

Or, if you want something quicker, take a look at The Android Line Chart Example, which shows how to add a single line series with some XY data to the chart.

// Great, but I Have a Question about …

Screen Shot 2016-06-16 at 14.40.39
We believe you will not find better-supported chart controls than SciChart!

If you have a question, please feel free to ask at our Forums page. This is a Q&A forum page where we aim to answer all queries promptly.

But if you have a specific sales or technical question, you can Contact us anytime and one of our staff will get back to you. We aim to answer all requests within 1-business day.

Thanks and enjoy!

The post Getting Started with SciChart Android appeared first on SciChart - WPF Charts.


Read more »



Jun
15
Getting Started with SCICHART iOS
Posted by Yaroslav Pelyukh on 15 June 2016 03:05 PM

Make yourself a coffee and let’s get started with SciChart iOS!

Quickest of the Quick Start Guide

Ok so you’ve downloaded and installed the SciChart iOS Trial. Great! Now what?
Check out this Quickest of the QuickStart Guide below which shows you how to open the Examples Suite and see what SciChart iOS can do.

Simulator Screen Shot 14 Jun 2016, 18.01.34_iphone6_silver_portrait

 

Learning by Example – The Examples Suite

Both the SciChart Zip archive and Source-Code version feature a rich examples suite with over 15+ examples, including full text search, source-code exports and more. You can find out more at the SciChart iOS Examples Suite page.

We also have a full walkthrough of starting and using the Examples Suite in the iOS SciChart Documentation that you can find in the SciChart folder – whether you’re using Source-Code version or you just downloaded the Zip archive.

Simulator Screen Shot Jun 15, 2016, 18.45.57_iphone6_silver_portrait copyViewing and Exporting Example

If that’s not enough, the entire Examples Suite source-code is shipped with the SciChart iOS in both Source-Code and “Zip” versions.

Our examples suite allows you to not only view source-code but also export individual examples to stand alone xcodeproj.

 

iOS-Line-Chart-fnlI just want to build a Simple Line Chart

Ok, so check out Creating your first SciChartSurface. It will walk you through the basics, including setting up a SciChartSurface, setting up X and Y Axes.

Then, take a look at The Line Series Type, which shows how to add a single line series with some XY data to the chart. Finally see our short section on adding Zoom Behaviour and a Tooltip and you’re all set!

 

Screen Shot 2016-06-16 at 14.40.39Great, but I Have a Question about …

We believe you will not find a better-supported than SciChart!

If you have a question, please feel free to ask at our Forums page. This is a Q&A forum page where we aim to answer all queries promptly.

But if you have a specific sales or technical question, you can Contact us anytime and one of our staff will get back to you. We aim to answer all requests within 1-business day.

Thanks and enjoy!

The post Getting Started with SCICHART iOS appeared first on SciChart.


Read more »



Jan
18
Upgrade guide from SciChart v3.x to SciChart v4.x
Posted by Andrew on 18 January 2016 10:43 AM

So a lot of people are checking out the SciChart v4 BETA. That’s great! Except, of those who contacted us, no-one seemed to be aware that we’ve actually created a tool to help you migrate from v3.x to v4.x. This could save you a *lot* of time as there are significant API changes in the SciChart v4 SDK. The following is a guide to help you upgrade quickly from v3.x to v4.x.

Upgrading from v3.x of SciChart WPF to v4

At SciChart we follow Semantic Versioning. This means that major version changes (v3, v4, v5) have breaking API changes and will require changes to your project to compile. Minor versions (e.g. v3.3, v3.4) or patches (v3.4.1, v3.4.2) should be backward compatible drop-in replacements.

Since v4.x has major API changes, we have built a tool to help you do the bulk of the update. This is the SciChart.UpdaterTool!

Installing the SciChart.UpdaterTool (Visual Studio 2012, 2013, 2015)

The SciChart Updater Tool is now available as a Visual Studio add-in via the Visual Studio gallery. To download and install it, go to Tools -> Extensions and Updates and search for ‘SciChart.UpdaterTool’ in the Visual Studio Gallery.

The SciChart.UpdaterTool on Visual Studio Gallery

The SciChart.UpdaterTool on Visual Studio Gallery

After installation you will need to restart Visual Studio. The SciChart.UpdaterTool should now be available via the Tools menu in Visual Studio.

Installing the SciChart.UpdaterTool (Visual Studio 2010)

The SciChart UpdaterTool is copied to the Install directory when you install SciChart v4.x from the MSI Installer. This basically copies the contents of the %InstallDir%/SciChart.UpdaterTool to %CurrentUser%/Documents/Visual Studio/Addins

SciChart.UpdaterTool

If for any reason this fails, you can try running the Install_Addin.bat batch file manually, or, copying the SciChart.UpdaterTool files over to %CurrentUser%/Documents/Visual Studio/Addins manually.

SciChart.UpdaterTool2

Using the SciChart.UpdaterTool

As a tutorial, we are going to update the Examples from v3.6 of SciChart to use v4.x with the updater tool. To follow the tutorial, open the Abt.Controls.SciChart.Wpf.Example.sln, or, use your own Visual Studio solution which references v3.x of SciChart.

SciChart.UpdaterTool3

Starting the SciChart.UpdaterTool

To start the SciChart.UpdaterTool, after opening a Visual Studio project which uses SciChart v3.x go to Tools -> SciChart Updater.

Note: If the SciChart Updater addin is not available, go back to step #1 and run the Install_Addin.bat batch file.

SciChart.UpdaterTool4

This should start the updater GUI

SciChart.UpdaterTool5

  1. Choose your projects to update. By default the updater chooses all projects which reference SciChart. If you do not see any projects here, then either your project does not reference SciChart, or, another problem has occurred.
  2. By default the SciChart Updater Tool creates a backup of your files. You can deselect this option if you are operating under version control.
  3. You need to choose the Package sources. This can be a local file / folder or NuGet feed.

Updating from local DLL files

To update your project referencing local DLL files, select ‘Folder’ as the package source, and navigate to the directory where SciChart v4 DLLs are installed. By default, this is C:\Program Files (x86)\SciChart Ltd\SciChart SDK\Lib\net40 (for .NET4.0).

SciChart.UpdaterTool6

Updating from NuGet feed

To update your project referencing our packages from NuGet, select ‘NuGet’ as the package source, and check the NuGet feed. This should be https://www.myget.org/F/abtsoftware/api/v2 for Visual Studio 2012, 2013, and https://www.myget.org/F/abtsoftware/api/v3/index.json for Visual Studio 2015.

SciChart.UpdaterTool7

Running the SciChart Updater Tool

We’re going to run ours from installed-files. So, selecting the SciChart DLL folder, hit the ‘Upgrade’ button.

The updater should start. It may output some warnings at the start (if you have a previous backup). These can be ignored.

SciChart.UpdaterTool8

The updater then reports on files being upgraded.

SciChart.UpdaterTool9

Finally, warnings are shown at the end of the process, once the update has completed.

SciChart.UpdaterTool10

Fixing Build Errors after using SciChart.UpdaterTool

The SciChart.UpdaterTool unfortunately doesn’t do all the work (it does do about 90%!). The last few steps are manual.

We can start by building our project and seeing what errors occur. Also, what warnings were output by the SciChart.UpdaterTool.

SciChart.UpdaterTool11

Build Error: The property ‘FastHeatMapRenderableSeries’ does not exist in XML namespace ‘http://schemas.abtsoftware.co.uk/scichart’

This error occurs because of an API Change to HeatmapColorMap. The HeatmapColorMap.FastHeatmapRenderableSeries property is deprecated and has been removed.

SciChart.UpdaterTool12

To upgrade your code, please do the following.

Before

<s:HeatmapColourMap Margin="30" HorizontalAlignment="Left" VerticalAlignment="Top" FastHeatMapRenderableSeries="{Binding ElementName=heatmapSeries}" Opacity="0.8" Orientation="Vertical" />

After

<s:HeatmapColourMap Margin="30"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Top"
                    ColorMap="{Binding ElementName=heatmapSeries, Path=ColorMap}"
                    Minimum="{Binding ElementName=heatmapSeries, Path=Minimum}"
                    Maximum="{Binding ElementName=heatmapSeries, Path=Maximum}"
                    Opacity="0.8"
                    Orientation="Vertical" />

Build Error: The property ‘AxisLabelTemplateSelector’ does not exist in XML namespace ‘http://schemas.abtsoftware.co.uk/scichart’

This error occurs because of changes to the CursorModifier. We no longer use AxisLabelTemplateSelectors to change axis labels on a per-axis type basis, but instead, have an attached property which is placed on the axis.

SciChart.UpdaterTool13

For now, we will simply remove this attribute temporarily.

SciChart.UpdaterTool14

To put it back, please see the updated documentation about the CursorModifier AxisLabelTemplate Attached Property.

Build Error: The type or namespace name ‘PaletteProviderBase’ could not be found (are you missing a using directive or an assembly reference?)

SciChart.UpdaterTool also reports this as a warning: File RedIfOverThresholdPaletteProvider.cs contains PaletteProviderBase. This class no longer exists.

From v3.x to v4.x PaletteProviderBase, IPaletteProvider have been significantly refactored. You will need to adjust your PaletteProvider implementations following the updated documentation for PaletteProviders in v4.

As a quick guideline, there is no longer a base-class for PaletteProividers, and the base interface IPaletteProvider has only one method on it. To implement a new palette provider, you may need to implement the following interfaces:

  • IStrokePaletteProvider: for lines, and series which have a stroke
  • IFillPaletteProvider: for series which have a fill
  • IPointMarkerPaletteProvider: for series which have a point-marker
Example: RedIfOverThresholdPaletteProvider

Before

using SciChart.Charting.ChartModifiers;
using SciChart.Charting.Visuals.RenderableSeries;
using SciChart.Charting.Numerics;
using System;
using System.Windows.Media;
using SciChart.Charting.Model.DataSeries;

namespace SciChart.Example.Examples.IWantTo.AnnotateAChart.DragHorizontalThreshold
{
    /// <summary>
    /// Defines a paletter provider to return a red color if the Y-Value is over a threshold value
    /// </summary>
    public class RedIfOverThresholdPaletteProvider : PaletteProviderBase
    {
        public double Threshold { get; set; }

        public override Color? GetColor(IRenderableSeries series, double xValue, double yValue)
        {
            if (yValue > Threshold)
                return Color.FromArgb(0xFF, 0xFF, 0x33, 0x33);

            // Returning null means use the default color when rendering
            return null;
        }
    }
}

After

using SciChart.Charting.Visuals.RenderableSeries;
using System.Windows.Media;
using SciChart.Charting.Model.DataSeries;
using SciChart.Charting.Visuals.PaletteProviders;

namespace SciChart.Example.Examples.IWantTo.AnnotateAChart.DragHorizontalThreshold
{
    /// <summary>
    /// Defines a paletter provider to return a red color if the Y-Value is over a threshold value
    /// </summary>
    public class RedIfOverThresholdPaletteProvider : IStrokePaletteProvider, IFillPaletteProvider
    {
        private XyDataSeries<double, double> _xyData;
        public double Threshold { get; set; }

        private Color? GetColor(IRenderableSeries series, double xValue, double yValue)
        {
            if (yValue > Threshold)
                return Color.FromArgb(0xFF, 0xFF, 0x33, 0x33);

            // Returning null means use the default color when rendering
            return null;
        }

        public void OnBeginSeriesDraw(IRenderableSeries series)
        {
            // Do nothing. Can be used to reset fields before a draw       
            // For performance, we also recommend getting, casting and caching a DataSeries here, e.g. 
            _xyData = series.DataSeries as XyDataSeries<double, double>;
        }

        public Brush OverrideFillBrush(IRenderableSeries series, int index, IPointMetadata metadata)
        {
            // PaletteProviders now pass in the series + index to data. You can get the data out as follows
            var color = GetColor(series, _xyData.XValues[index], _xyData.YValues[index]);
            if (color.HasValue)
                return new SolidColorBrush(color.Value); // Note: Caching brushes is advisable

            return null;
        }

        public Color? OverrideStrokeColor(IRenderableSeries series, int index, IPointMetadata metadata)
        {
            // PaletteProviders now pass in the series + index to data. You can get the data out as follows:
            var color = GetColor(series, _xyData.XValues[index], _xyData.YValues[index]);
            return color;
        }
    }
}

Build Error: The type or namespace name ‘Rendering’ does not exist in the namespace ‘SciChart’ (are you missing an assembly reference?)

This build error should only affects the upgrade of SciChart Examples solution from v3.x to v4.x, e.g. you should not see this when you update your own projects. For the purpose of the tutorial, to fix this, we remove the fully qualified namespace.

Before

SciChart.UpdaterTool15

After 

SciChart.UpdaterTool16

Build Error: ‘ActionCommand’ is an ambiguous reference between ActionCommand …

This build error should only affects the upgrade of SciChart Examples solution from v3.x to v4.x, e.g. you should not see this when you update your own projects. For the purpose of the tutorial, to fix this, we simply specify the fully qualified namespace

Before

SciChart.UpdaterTool17

After

SciChart.UpdaterTool18

Build Error: No overload for method ‘Draw’ takes 5 arguments

There have been significant changes to the PointMarker API. You may see this build error if you have a custom PointMarker derived type, or have built a CustomRenderableSeries.

To fix it, please do something like the following:

Before

SciChart.UpdaterTool19

After

SciChart.UpdaterTool20

Fixing Warnings Output by SciChart.UpdaterTool

A number of warnings may also be output by the SciChart.UpdaterTool. Here we review these.

Warning: File ChartTypeViewModel.cs contains SeriesSource. This property is obsolete.

The SciChartSurface.SeriesSource property has been made obsolete, but backward compatible. Your application will still continue to work with it, but we strongly recommend upgrading to the new SeriesBinding MVVM API provided with SciChart v4.x, as the old SeriesSource API will no longer be supported.

Warning: File RedIfOverThresholdPaletteProvider.cs contains PaletteProviderBase. This class no longer exists.

We have addressed how to resolve this in Section 2.4.3.3, by using the updated PaletteProvider API.

Completing the SciChart.UpdaterTool Tutorial

If you have followed the tutorial to update the SciChart WPF Examples from v3.x to v4.x, you should now be able to build and run the SciChart WPF Examples Suite (for v3) but referencing v4.x DLLs!

SciChart.UpdaterTool21

The post Upgrade guide from SciChart v3.x to SciChart v4.x appeared first on SciChart.


Read more »



Jul
26
DirectX Scatter Chart Performance Fixed!
Posted by Andrew on 26 July 2015 06:46 PM

Just a quick update from our weekend warriors working hard to make SciChart the best High Performance WPF charting platform:

You may have seen we mentioned that DirectX Scatter chart performance is worse than software.

For background information, see

You’ll be pleased to know we’ve done some extreme optimization and managed to get a near 50x performance increase for 1,000,000 points scatter chart with DirectX. See the animated gif below:

v3.4_vs_Trunk_D3D

This will be available as part of the SciChart v4 SDK later in the year. Until then, you can always get high-performance scatter charts using the parallel rendering trick we presented here!

Best regards,
[SciChart HQ]

The post DirectX Scatter Chart Performance Fixed! appeared first on SciChart.


Read more »




CONTACT US

Not sure where to start? Contact us, we are happy to help!


CONTACT US

SciChart Ltd, 16 Beaufort Court, Admirals Way, Docklands, London, E14 9XL. Email: Legal Company Number: 07430048, VAT Number: 101957725