Hello,
I am working on a heatmap chart with contours. The dataSeries are binded to DataSeriesInViewModel in the viewmodel, where DataSeriesInViewModel is defined as:
DataSeriesInViewModel = new UniformHeatmapDataSeries<int, int, double>(zValues2d, 0, 1, 0, 1)
where zValues2d contains the grid values data.
In addition there is binding to ZMax, ZMin which are the max, min values of zValues2d and also ZStep which is the number of steps for the contours.
The problem is that one can see two tootips and that those are not showing the same value.
<s:SciChartSurface x:Name="sciChart" Grid.Column="0" ChartTitle="{Binding ChartTitle}">
<s:SciChartSurface.RenderableSeries>
<s:FastUniformContourRenderableSeries x:Name="ContourSeries"
AntiAliasing="True" ZMax="{Binding ZMax}"
ZMin="{Binding ZMin}" ZStep="{Binding ZStep}"
DataSeries="{Binding DataSeriesInViewModel}">
<s:FastUniformContourRenderableSeries.ColorMap>
<s:HeatmapColorPalette Maximum="{Binding ZMax}" Minimum="{Binding ZMin}">
<s:HeatmapColorPalette.GradientStops>
<GradientStop Offset="0.0" Color="{StaticResource ColorMapColor_1}"/>
<GradientStop Offset="0.2" Color="{StaticResource ColorMapColor_2}"/>
<GradientStop Offset="0.4" Color="{StaticResource ColorMapColor_3}"/>
<GradientStop Offset="0.6" Color="{StaticResource ColorMapColor_4}"/>
<GradientStop Offset="0.8" Color="{StaticResource ColorMapColor_5}"/>
<GradientStop Offset="1.0" Color="{StaticResource ColorMapColor_6}"/>
</s:HeatmapColorPalette.GradientStops>
</s:HeatmapColorPalette>
</s:FastUniformContourRenderableSeries.ColorMap>
</s:FastUniformContourRenderableSeries>
<s:FastUniformHeatmapRenderableSeries x:Name="HeatmapSeries"
Opacity="0.8"
UseLinearTextureFiltering="True"
AntiAliasing="True"
DataSeries="{Binding DataSeriesInViewModel}">
<s:FastUniformHeatmapRenderableSeries.ColorMap>
<s:HeatmapColorPalette Maximum="{Binding ZMax}" Minimum="{Binding ZMin}">
<s:HeatmapColorPalette.GradientStops>
<GradientStop Offset="0.0" Color="{StaticResource ColorMapColor_1}"/>
<GradientStop Offset="0.2" Color="{StaticResource ColorMapColor_2}"/>
<GradientStop Offset="0.4" Color="{StaticResource ColorMapColor_3}"/>
<GradientStop Offset="0.6" Color="{StaticResource ColorMapColor_4}"/>
<GradientStop Offset="0.8" Color="{StaticResource ColorMapColor_5}"/>
<GradientStop Offset="1.0" Color="{StaticResource ColorMapColor_6}"/>
</s:HeatmapColorPalette.GradientStops>
</s:HeatmapColorPalette>
</s:FastUniformHeatmapRenderableSeries.ColorMap>
</s:FastUniformHeatmapRenderableSeries>
</s:SciChartSurface.RenderableSeries>
<s:SciChartSurface.XAxis>
<s:NumericAxis DrawMajorBands="True" AutoRange="Always" LabelProvider="{Binding XAxisLabelProvider}"/>
</s:SciChartSurface.XAxis>
<s:SciChartSurface.YAxis>
<s:NumericAxis DrawMajorBands="True" AutoRange="Always" LabelProvider="{Binding YAxisLabelProvider}"/>
</s:SciChartSurface.YAxis>
<s:SciChartSurface.ChartModifier>
<s:ModifierGroup>
<s:RolloverModifier ShowTooltipOn="Always" UseInterpolation="True" ReceiveHandledEvents="True"/>
</s:ModifierGroup>
</s:SciChartSurface.ChartModifier>
</s:SciChartSurface>
<s:HeatmapColorMap Grid.Column="1" Margin="2"
HorizontalAlignment="Right"
VerticalAlignment="Stretch"
Background="{StaticResource ThemedSurfaceChartBackground}"
Foreground="{Binding Source={x:Reference Name=sciChart}, Path=Foreground}"
ColorMap="{Binding Source={x:Reference Name=HeatmapSeries}, Path=ColorMap.GradientStops, Converter={StaticResource ColorsToLinearGradientBrushConverter}}"
Minimum="{Binding ZMin}"
Maximum="{Binding ZMax}"
TextFormatting="0.00" Opacity="0.8" BorderBrush="#777" BorderThickness="1" Orientation="Vertical"/>
I also tried to assign to the contour chart the colormap from the heatmap using:
<s:FastUniformContourRenderableSeries x:Name="ContourSeries"
AntiAliasing="True" ZMax="{Binding ZMax}"
ZMin="{Binding ZMin}" ZStep="{Binding ZStep}"
DataSeries="{Binding DataSeriesInViewModel}"
ColorMap="{Binding Source={x:Reference Name=HeatmapSeries},
Path=ColorMap.GradientStops,
Converter={StaticResource ColorsToLinearGradientBrushConverter}}">
but then I still see two tooltips but no contours anymore.
In fact i would like to know what I do wrong here, and how to see only one tooltip.
thanks a lot for your help,
Thomas
- Thomas Lugand asked 1 month ago
-
Hi Thomas, Thank you for reporting this. I’m going to discuss this with our team and will get back to you as soon as I have an update. Kind regards, Lex, SciChart Technical Support Engineer
- You must login to post comments
Hi Thomas,
Hope you are doing well.
We discussed your inquiry.
Adding contours to the Heatmap chart results in adding additional FastUniformContourRenderableSeries.
Please see the corresponding documentation article for more info:
SciChart WPF Documentation – The Contours Series Type _ WPF Chart Documentation
In turn, RolloverModifier shows Tooltips for all RenderableSeries existing on the SciChartSurface by default.
To hide Tooltips for the selected Series though, for example for the FastUniformContourRenderableSeries, you can set the RolloverModifier.IncludeSeries attached property on the Series to “False”.
More details can be found in the “Excluding a Single Series from the RolloverModifier” section of the corresponding article here:
SciChart WPF Documentation – RolloverModifier _ WPF Chart Documentation
Kind regards,
Lex,
SciChart Technical Support Engineer
- Lex answered 4 weeks ago
- You must login to post comments
Please login first to submit.