SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

0 votes


I have 2 charts, a 2D Heatmap and a 3D Waterfall chart, and I want to be able to programmatically change their color palettes.

The 2D heatmap is set up like this, with the GradientStops bound to an ObservableCollection:

<s:HeatmapColorPalette x:Key="HeatmapColorPalette" Maximum="{Binding MaxValue,Mode=TwoWay}"  GradientStops="{Binding ColorPalette}"/>
        DataSeries="{Binding Data}"
        ColorMap="{StaticResource HeatmapColorPalette}">

This works as expected. When the binding changes the palette/heatmap changes.

The 3D waterfall is set up the similarly:

<s3D:GradientColorPalette x:Key="GradientColorPalette" IsStepped="False"  GradientStops="{Binding ColorPalette}" />
        DataSeries="{Binding Data3D}"
        YColorMapping="{StaticResource GradientColorPalette}"

This, when passed the same data, doesn’t render the chart.
This chart otherwise works fine if I define the GradientStops statically in the XAML.

This is the GradientStops definition (in f#):

let BlueRed = 
        new ObservableCollection<GradientStop>([
            new GradientStop(Color.FromRgb(0x00uy,0x00uy,0xFFuy),0.0)
            new GradientStop(Color.FromRgb(0xFFuy,0x00uy,0x00uy),1.0)

I am not sure what I am missing.

(edit: apologies for formatting issues in the question)

0 votes

I was able to develop and run everything using the scichart alpha build from Jun 11th.
This includes SciChart2D, SciChart3D, with a minor error.
I was using .NET Core 3.0 Preview 6+, Visual Studio 16.3 Preview on a Win7 box.

However, the client wants to upgrade to Windows 10.
So I installed Visual Studio 16.3 (2019), and .NET Core 3.0 and I was able to build all the packages etc.

However, when launching the WPF part of the application, I was at first encountering AccessViolation exceptions in CreateRenderTarget().

I removed all my SharpDX components, and tried again. I was able to get around this problem by using a version of SciChart 6.0 greater than the Jun 11th alpha version – v.

I can now load SciChart2D package.

However, SciChart3D is now throwing null reference exceptions when loading. I’ve included the screenshot. This occurs even with the 6.0.0-beta version.

Please advise.

Showing 2 results
This template supports the sidebar's widgets. Add one or use Full Width layout.