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

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

0
0

I’m using a rollover tooltip to display series info.
Tooltips are shown in the same order data points are hit, so it changes while i would like to fix it so the user always see the series in the same position throughout the chart.

Thank you

Version
5.1.0.11299
  • You must to post comments
0
0

Off the top of my head, this kind of change may require a code change in the SciChart library itself.

Since you have access to the source-code, have a look at the RolloverModifier.cs class. Specifically, RolloverModifier.AttachTooltipLabelToMarker().

In this class you will see the tooltip being created from DataTEmplate and applied to the rollovermarker.

Actually on second thought you may be able to use the RolloverModifier.TooltipStyle attached property to set the Panel.ZIndex on the tooltip container. Give that a try?

See RolloverModifier documentation Styling the Tooltip Container

<s:SciChartSurface>
   <s:SciChartSurface.Resources>
      <!-- The TooltipControl template is defined below -->
      <!-- Change this if you want to have a non-default tooltip container -->
      <!-- The ContentPresenter is bound to the DataContext (a SeriesInfo type) -->
      <!-- and the ContentTemplate is the DataTemplate for the SeriesInfo -->
      <!-- Finally, the TooltipContainerStyle is set on the RenderableSeries -->     
      <Style x:Key="TooltipStyle1" TargetType="s:TooltipControl">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="s:TooltipControl">
                        <Border Background="#ff6495ed"
                                Panel.ZIndex="1234" 
                                BorderBrush="#ff4d81dd"
                                BorderThickness="2"
                                Effect="{StaticResource DropShadowEffect}"
                                Opacity="0.9"
                                Padding="5">

                            <ContentPresenter Content="{TemplateBinding DataContext}"
                                 ContentTemplate="{TemplateBinding ContentTemplate}" />
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
   </s:SciChartSurface.Resources>

   <s:SciChartSurface.RenderableSeries>
      <s:FastLineRenderableSeries s:RolloverModifier.TooltipContainerStyle="{StaticResource TooltipStyle1}"/>
   </s:SciChartSurface.RenderableSeries>
</s:SciChartSurface>

Best regards,
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.