SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & 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

Hi All,

I have a problem about the length of my Scrollbar this is my code :


        <!--  The grid is used to set paddings around the Overview, so that the size of the Overview matches the size of the XAxis on the parent chart  -->
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1020"/>
            <!--  Matches parent surface padding left  -->
            <ColumnDefinition Width="*"/>
            <!--  Hosts overview control  -->
            <ColumnDefinition Width="{Binding ActualWidthValue, ElementName=proxy, Mode=OneWay, Converter={StaticResource DoubleToGridLengthConverter}}"/>
            <!--  Used to bind to parent surface YAxis  -->
            <ColumnDefinition Width="50"/>
            <!--  Matches parent surface padding right  -->
        </Grid.ColumnDefinitions>

        <helpers:ActualSizePropertyProxy x:Name="proxy" Element="{Binding ElementName=sciChartSurface, Path=YAxis}"/>
        <SciChart:SciChartOverview ParentSurface="{Binding ElementName=sciChartSurface,
                                                    Mode=OneWay}"
                                                            SciChart:ThemeManager.Theme="{Binding ElementName=cboTheme,
                                                           Path=SelectedItem}"
                            SelectedRange="{Binding XVisibleRange,
                                             Mode=TwoWay}" Focusable="True" />

but when i increase the Width the Scrollbar doesn’t change !! (like the picture)
So, i want that my Scrollbar have the same length of my Chart ! it’s possible or not ? And thank you
Best Regards,
Sahar.

Images
  • You must to post comments
0
0

Hi there,

Seems there are few erros in your code:

  1. SciChartOverview hasn’t Grid.Column value. So overview will be placed in first column which has width 1020 pixels.
  2. For some reasons you set Width = 1020 for first column which should be equal to sciChartSurface.Padding.Left according to comments.

So I suppose you code should like this:

<Grid.ColumnDefinitions>
          <!--  sciChartSurface.Padding.Left  -->
         <ColumnDefinition Width="50"/>
         <ColumnDefinition Width="*"/>
         <ColumnDefinition Width="{Binding ActualWidthValue, ElementName=proxy, Mode=OneWay, Converter={StaticResource DoubleToGridLengthConverter}}"/>
          <!--  sciChartSurface.Padding.Right -->
         <ColumnDefinition Width="50"/>
</Grid.ColumnDefinitions>
<helpers:ActualSizePropertyProxy x:Name="proxy" ... />
<SciChart:SciChartOverview Grid.Column="1" ...  />

Hope it helps!

  • You must to post comments
0
0

Hi Yura,
thanks but when i make this code :

<Grid.ColumnDefinitions>

</Grid.ColumnDefinitions>

        <helpers:ActualSizePropertyProxy x:Name="proxy" Element="{Binding ElementName=sciChartSurface, Path=YAxis}"/>
        <SciChart:SciChartOverview Grid.Column="1" ParentSurface="{Binding ElementName=sciChartSurface,
                                                    Mode=OneWay}"
                                                            SciChart:ThemeManager.Theme="{Binding ElementName=cboTheme,
                                                           Path=SelectedItem}"
                            SelectedRange="{Binding XVisibleRange,
                                             Mode=TwoWay}" Focusable="True" />
    </Grid>

i have a bad result ( like the picture) !!

Images
  • Yura Khariton
    Have you tried to change width in first column definition - ? Seems something occupies space in Grid but I don't know what. Could you post XAML markup with Grid and all elements within it(overview and chart)? Seems to me you need to set Grid.Column="1" on sciChartSurface instance but I'm not sure. Thanks in advance
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.