SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components
Dear all,
I try to align properly the chart overview just below the main chart view port edges. The problem I have is that when we add a legend of a Axes label, then it is fully part of the chart control and alignement gets a bit weird and bad looking. (See picture attached)
How can I adjust the overview chart in order it perfectly fit the main chart view port left and right ?
Thnaks for help
regards
Our Realtime Ticking Stock Charts example has code to align the overview to the main chart surface.
You can find the example here.
The relevant code is found in CreateRealtimeTickingStockChart.xaml
<!-- This grid is used to space Overview Control so its width matches parent chart XAxis -->
<Grid Grid.Row="1" Grid.Column="1" Height="32">
<!-- 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="20" />
<!-- 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="15" />
<!-- Matches parent surface padding right -->
</Grid.ColumnDefinitions>
<ext:ActualSizePropertyProxy x:Name="Proxy" Element="{Binding ElementName=PriceChart, Path=YAxis}" />
<!-- Define the Overview control, binding to XVisibleRange, which is shared between this and the SciStockChart control -->
<s:SciChartOverview Grid.Column="1" ParentSurface="{Binding ElementName=PriceChart, Mode=OneWay}"
SelectedRange="{Binding XVisibleRange, Mode=TwoWay}"
s:ThemeManager.Theme="{Binding ElementName=ThemeCombo, Path=SelectedItem}" />
</Grid>
Best regards,
Andrew
Please login first to submit.