Pre loader

Vertical Slice Panel Index & Current Position Values

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

1
0

Hi,

I have some questions about the vertical slice modifier.

1: I have a scrollbar surface that is always visible and numerous tabs with numerous charts. The scrollbar binds to a common shared x visible range property. I have a vertical slice on the underlying surface that shares a common X1 binding to all the other charts too. The problem is that the scrollbar is over the top of the vertical slice, making it impossible to drag from the master surface. Is there a way to bring this to the front?

    <s:SciChartSurface.XAxis>
        <s:NumericAxis x:Name="AxisX" TextFormatting="0" DrawMajorGridLines="False" DrawMinorGridLines="False" DrawMajorBands="False" Visibility="Visible" AutoRange="Always"/>
    </s:SciChartSurface.XAxis>

    <s:SciChartSurface.YAxis>
        <s:NumericAxis DrawMajorGridLines="False" DrawMinorGridLines="False" DrawMajorBands="False" AutoRange="Always" Visibility="Collapsed"/>
    </s:SciChartSurface.YAxis>

    <s:SciChartSurface.ChartModifier>
        <s:ModifierGroup>
            <s:VerticalSliceModifier Name="sliceModifier" ShowTooltipOn="Never">
                <s:VerticalSliceModifier.VerticalLines>
                    <s:VerticalLineAnnotation Style="{StaticResource sliceStyle}" X1="{Binding SlicePosition, Mode=TwoWay}"/>
                </s:VerticalSliceModifier.VerticalLines>
            </s:VerticalSliceModifier>

        </s:ModifierGroup>
    </s:SciChartSurface.ChartModifier>

</s:SciChartSurface>

<s:SciChartScrollbar x:Name="scrollOverview" 
                     Grid.Column="0" 
                     Grid.Row="2" 
                     Height="30" 
                     Margin="0,0,0,20" 
                     Axis="{Binding Source={x:Reference Name=AxisX}}" 
                     Style="{StaticResource ScrollbarStyle}"  
                     SelectedRange="{Binding SharedXVisibleRange, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">

</s:SciChartScrollbar>

2: I’m using a legend modifier that shows the latest live FormattedYValue for the series. This works great while it’s live but when I stop the data input and use vertical slive, is there a way to inject the y value of the vertical slice position into the legend value?
Currently I’m hiding the live values and showing the vertical slice tooltip instead which I feel is a little too messy for my liking. I’d rather just update the legend value.

<Grid.ColumnDefinitions>

</Grid.ColumnDefinitions>

        <!--  Binds to SeriesInfo.IsVisible to show and hide the series  -->
        <CheckBox Grid.Column="0"
                  HorizontalAlignment="Left"
                  VerticalAlignment="Center"
                  Foreground="{Binding Stroke, Converter={StaticResource ColorToBrushConverter}}"
                  IsChecked="{Binding IsVisible, Mode=TwoWay}"
                  Style="{StaticResource DataSeriesCheckBoxStyle}"
                  />

        <!--  Series name (SeriesInfo.SeriesName)  -->
        <TextBlock Grid.Column="1"
                   MinWidth="70" 
                   Margin="2,0,0,0"
                   HorizontalAlignment="Left" 
                   VerticalAlignment="Center"
                   Text="{Binding SeriesName}"
                   FontSize="10"
                   Foreground="{Binding Stroke, Converter={StaticResource ColorToBrushConverter}}"
                   />

        <!--  Live Value  -->
        <TextBlock Grid.Column="2"
                  Margin="10,0,5,0"
                  HorizontalAlignment="Right"
                  VerticalAlignment="Center"
                  FontSize="10"
                  Text="{Binding FormattedYValue}"
                  Foreground="{Binding Stroke, Converter={StaticResource ColorToBrushConverter}}"
                  Visibility="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Path=DataContext.ShowLiveValues, Converter={StaticResource BooleanToVisibilityConverter}}"
                   />

    </Grid>
</DataTemplate>

3: Is there a way that a single click on a surface could make the vertical slice jump to the click position? I’d also like to be able to double click drag the zoom/pan modifier instead of single click drag.

Thanks in advance,

Declan.

Version
.NET Core 3.1 v6.5
Images
  • You must to post comments
0
0

Hello Declan Walsh,

Can you kindly provide us with sample application with the reproduced problem, so we can investigate it on our side, and give you most accurate and fast solution

  • Declan Walsh
    Hi Nazariy, I will but it’s no small task. It will take me quite a while. In the meantime are you able to tell me if it’s possible to click on a vertical slice that’s underneath a scrollbar. You can see in the screenshot that I attached that there’s a slice under the scollbar that’s inaccessible. I can only move it by moving the slices on the charts above. I also want to be able to inject the y value from the current slice x1 position into the legend’s “FormattedYValue” binding. Is this possible? So far i’ve only been able to get it to bind it to the latest y value.
  • 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