Pre loader

RolloverModifier show just one Tooltip for Two Charts

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

When using RollOverModifer, is there a way of showing just one pop-up for two synced charts? I have a candlestick chart on the upper part of the window and a bar chart in the bottom, so what I want is a synced RollOverModifier that displays the price & volume information together in just one pop-up. Plus, is there a way of hiding the Rollover date pop-up for the X-Axis of the bottom chart (The upper chart Rollover is already displaying the date, so the bottom one is redundant).

Regarding the behavior that I want from RollOverModifier, I’ve attached 3 files:

  • ChartWindow.png: shows how my charts look at the moment. I have the price & volume charts synchronized including the RollOverModifier, but all the tooltips are separated. What I want is to merge all the tooltips into one. Basically include the time from the X-Axis and volume on the same tooltip. Also, as soon as I overwrote the AxisLabelTemplate, the label on the Y-Axis appeared, so do I get rid of it?

  • ChartWindow.xaml (zip): my current implementation of ChartWindow class.

  • XStudy.png: shows the behavior I want to achieve, basically one tooltip the merges the info from the price and volume charts.

I really appreciate the help you guys give, look forward to hearing from you.

Best,

Diego

Attachments
Images
  • You must to post comments
0
0

Hi Diego,

Sorry for the delay in answering! Regarding the axis label issue, you should use the AxisInfoTemplateSelector class or bind a visibility of the label to the AxisInfo.IsXAxis property. Here is the default data template for RolloverModifier:

    <DataTemplate x:Key="EmptyDataTemplate" DataType="r:AxisInfo" />

    <!--  Template for the RolloverModifier AxisLabel to display single AxisInfo (result of hit test)  -->
    <ControlTemplate x:Key="RolloverAxisLabelTemplate" TargetType="r:TemplatableControl">
        <s:AxisInfoTemplateSelector Content="{Binding}"
                                    XAxisDataTemplate="{StaticResource AxisLabelTemplate}"
                                    YAxisDataTemplate="{StaticResource EmptyDataTemplate}" />
    </ControlTemplate>

Regarding the second issue(merge tooltips) it needs writing code a bit. You could have MasterRolloverModifier from this thread and merge SeriesData.SeriesInfo into a single ChartDataObject object inside. And use this modifier for the main chart.

Please, let us know if you need any clarification or assistance!

Best regards,
Yuriy

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies