Pre loader

Heatmap with contours show 2 tooltips

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

Answered
0
0

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

Version
8.2.0.27935
Images
  • Lex
    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 to post comments
Best Answer
0
0

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

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.