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

1 vote
0 answers
927 views

Hello SciChart Team,
I have multiple charts in my application where all the charts are in the same ModifierGroup to show the RolloverModifier tooltip at the same time. My chart stack panel is inside a ScrollViewer and as per the suggestion for my previous question, I have set the chart’s TooltipUsageMode to PopUp. But now if I scroll down to the chart list and mouse hover on a chart, the tooltips are popping up over other view regions (check the attached screenshot). We tried to set the tooltip template Panel.ZIndex value to a lower value like here, but they are not working. Can you please let us know if there is any way to not show the chart tooltip over other view regions in Popup mode?

Please check my previous question to get the code sample-
https://www.scichart.com/questions/wpf/align-custom-tooltip-text-based-on-tooltip-position

0 votes
962 views

Hello SciChart Team,
I have multiple charts in my application where all the charts are in the same MdofierGroup to show the RolloverModifier tooltip at the same time. As I want to show custom tooltip text, I have created a custom TooltipTemplate and TooltipContainerStyle. But now when the tooltip is shown on the left side the tooltip text is a long way from the marker. I want to align the tooltip text based on the tooltip position. When the tooltip is on the right side the text will be aligned left and when the tooltip is on left side the text will be aligned right.

I have attached some code snippets of my implementations, can you suggest me any way to achieve this?

<Style x:Key="_tooltipContainer" TargetType="scichart:TooltipControl">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="scichart:TooltipControl">
                    <ContentPresenter Content="{TemplateBinding DataContext}"
                                          ContentTemplate="{TemplateBinding ContentTemplate}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <DataTemplate x:Key="_tooltipTemplate" DataType="scichart:XySeriesInfo">
        <StackPanel Orientation="Vertical">
            <TextBlock FontSize="12" FontFamily="Rubik" Foreground="White">
                <TextBlock.Text>
                    .
                    .
                    .
                </TextBlock.Text>
            </TextBlock>
        </StackPanel>
    </DataTemplate>

    <!-- Style applied via x:Key name in ViewModel -->
    <Style TargetType="scichart:BaseRenderableSeries"  x:Key="_lineSeriesStyle">
        <Setter Property="RolloverMarkerTemplate">
            <Setter.Value>
                <ControlTemplate>
                    <Ellipse Width="7" Height="7" Stroke="White" StrokeThickness="1" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>

        <Setter Property="scichart:RolloverModifier.TooltipContainerStyle" Value="{StaticResource _tooltipContainer}"/>
        <Setter Property="scichart:RolloverModifier.TooltipTemplate" Value="{StaticResource _tooltipTemplate}"/>
        <Setter Property="scichart:RolloverModifier.IncludeSeries" Value="True"/>
        <Setter Property="StrokeThickness" Value="2"/>
    </Style>


 <scichart:SciChartSurface RenderableSeries="{scichart:SeriesBinding ItsRenderableTimeGraphSeries}">


                                    <scichart:SciChartSurface.ChartModifier>
                                        <scichart:ModifierGroup DataContext="{Binding Path=DataContext, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ItemsControl}}}" 
                                                            scichart:MouseManager.MouseEventGroup="MouseEventGroup" >
                                            <scichart:RolloverModifier ShowTooltipOn="MouseHover" DrawVerticalLine="False" />
                                        </scichart:ModifierGroup>
                                    </scichart:SciChartSurface.ChartModifier>
.
.
.
</scichart:SciChartSurface>

In ViewModel:

ItsRenderableTimeGraphSeries = new ObservableCollection<IRenderableSeriesViewModel>
        {
            new MountainRenderableSeriesViewModel()
            {
                IsDigitalLine = false,
                StyleKey = "_lineSeriesStyle",
            }
        };
0 votes
7k views

I am showing tooltip with CursorModifier. My tooltip bigger than SciChartSurface and I am using ClipModifierSurface=”False” in order to show whole tooltip. But in this case axis labels and scroll bar are on top of tooltip.
Described problem can be seen on Featured Apps > Scientific Charts > Oscilloscope Demo.
Is there any way to bring tooltip on top of chart surface?

Thanks
Samvel

0 votes
6k views

Hi,

I want to use a CursorModifier with a TooltipContainerStyle in a SciChartSurface to display a tooltip. I would like to modify the default behavior that places the tooltip to the bottom and right of the cursor, and place the tooltip at bottom center instead.

Is this possible, and if so, how?

We are using SciChart 4.0.2.8024 in our project.

Of course, I can always use the tooltip’s ActualWidth to tweak its Margin accordingly, but I would like to know if there is a simpler solution than that, before I do this.

  • SamiAario asked 7 years ago
  • last active 7 years ago
Showing 4 results
This template supports the sidebar's widgets. Add one or use Full Width layout.