Pre loader

How can I change the GradientStops of FastUniformHeatmapRenderableSeries?

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

Hi, i want to change the GradientStops of FastUniformHeatmapRenderableSeries from ViewModel
Here is the Code below

                    <s:SciChartSurface
                    Width="330"
                    Height="630"
                    s:VisualXcceleratorEngine.EnableImpossibleMode="True"
                    s:VisualXcceleratorEngine.IsEnabled="True"
                    Cursor="Cross">
                    <s:SciChartSurface.RenderableSeries>
                        <s:FastUniformHeatmapRenderableSeries DataSeries="{Binding DataSeries}">
                            <s:FastUniformHeatmapRenderableSeries.ColorMap>
                                <s:HeatmapColorPalette
                                    GradientStops="{Binding ColorMap}"
                                    Maximum="100"
                                    Minimum="0" />
                            </s:FastUniformHeatmapRenderableSeries.ColorMap>
                        </s:FastUniformHeatmapRenderableSeries>
                    </s:SciChartSurface.RenderableSeries>

                    <s:SciChartSurface.XAxis>
                        <s:NumericAxis
                            AxisAlignment="Left"
                            FlipCoordinates="True"
                            Width="30"
                            MajorDelta="60"
                            MinorDelta="20"
                            AutoTicks="True"
                            DrawMajorGridLines="False"
                            DrawMinorGridLines="False"
                            DrawMinorTicks="False"
                            VisibleRange="0, 600" />
                    </s:SciChartSurface.XAxis>
                    <s:SciChartSurface.YAxis>
                        <s:NumericAxis
                            x:Name="YAxis"
                            AxisAlignment="Bottom"
                            FlipCoordinates="True"
                            Height="30"
                            AutoTicks="True"
                            DrawMajorGridLines="False"
                            DrawMinorGridLines="False"
                            DrawMinorTicks="False"
                            MajorDelta="30"
                            MinorDelta="10"
                            VisibleRange="0, 300" />
                    </s:SciChartSurface.YAxis>
                </s:SciChartSurface>

When I change the ColorMap at ViewModel, I can check that GradientStops Property in View is changed. But Chart’s color is not changed.
How can I change the GradientStops of FastUniformHeatmapRenderableSeries from ViewModel ?

Version
8.5.0.28148
  • You must to post comments
1
0

Hi Jongbog Joung,

Thanks for your inquiry.
I am sorry for the late response.

We discussed the provided details.

It seems that your approach doesn’t work because your ViewModel is out of the context scope of the HeatmapColorPalette. This can be solved using proxy UI Element. Please find this approach described here:
How to bind to data when the DataContext is not inherited – Thomas Levesque’s .NET Blog

Alternatively, you could bind HeatmapRenderableSeries.ColorMap property and recreate the entire HeatmapColorPalette in your ViewModel.

Hope this helps.

Kind regards,
Lex,
SciChart Technical Support Engineer

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.