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 ?
- JONGBOG JOUNG asked 2 months ago
- You must login to post comments
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
- Lex answered 4 weeks ago
- You must login to post comments
Please login first to submit.