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

0 votes
0 answers
2k views

Hi,

I use GradientColorPalette to set the color mapping of Y axis in Waterfall 3D Chart.
I want to fix the color to certain fixed min/max level, e.g. red when y value >= 100, green when y value < -100.
Currently, it seems that color is auto scale to current min/max y value in waterfall.
I try setting VisibleRange of YAxis, but it has no effect on color mapping.

In case of SurfaceMeshRenderableSeries3D, there are Minimum and Maximum properties.
In case of FastUniformHeatmapRenderableSeries, there are Minimum and Maximum properties in HeatmapColorPalette.
Are there any similar min/max properties to use for Waterfall 3D Chart?

Looking up the documentation, I still cannot find the suitable properties to use.
Is there any way to do the min/max color mapping for waterfall chart?

Best regards

0 votes
132 views

Hello

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}"/>
...
<s:SciChartSurface.RenderableSeries>
    <s:FastUniformHeatmapRenderableSeries 
        x:Name="heatmapSeries" 
        DataSeries="{Binding Data}"
        ColorMap="{StaticResource HeatmapColorPalette}">
    </s:FastUniformHeatmapRenderableSeries>
 </s:SciChartSurface.RenderableSeries>
...

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}" />
...
<s3D:SciChart3DSurface.RenderableSeries>
    <s3D:WaterfallRenderableSeries3D
        x:Name="waterfallSeries"
        DataSeries="{Binding Data3D}"
        YColorMapping="{StaticResource GradientColorPalette}"
        SliceThickness="1">
    </s3D:WaterfallRenderableSeries3D>
</s3D:SciChart3DSurface.RenderableSeries>
...

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)

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