I have set the size of my chart to "Fill". When windows shrinks, chart shrink as well to fit the window. If I start increasing the window size, chart will start expanding but it stops increasing it's size at one point and it only centers the window from that point.
Is there a way to set the chart size to fit the window all the time?
Would it be possible for you to provide the XAML markup for the window?
-Graham
Please let me know if you need the code as well.
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:igCA="http://infragistics.com/Chart" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
x:Class="Charts.MainWindow"
x:Name="Window"
Title="MainWindow"
Width="500" Height="300" mc:Ignorable="d">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Chart2D.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<Grid x:Name="LayoutRoot">
<!-- Chart control -->
<igCA:XamChart x:Name="ColumnChart2D" Style="{StaticResource XamChartStyle}">
<!-- Legend -->
<igCA:XamChart.Legend>
<igCA:Legend/>
</igCA:XamChart.Legend>
<!-- Scene -->
<igCA:XamChart.Scene>
<igCA:Scene BorderBrush="Black">
<igCA:Scene.GridArea>
<igCA:GridArea Style="{StaticResource GridAreaStyle}"/>
</igCA:Scene.GridArea>
</igCA:Scene>
</igCA:XamChart.Scene>
<!-- Axes -->
<igCA:XamChart.Axes>
<igCA:Axis AxisType="PrimaryX" MajorGridline="{StaticResource AnimationMarkX}"/>
<igCA:Axis AxisType="PrimaryY" MajorGridline="{StaticResource AnimationMarkY}">
<igCA:Axis.Stripes>
<igCA:Stripe Style="{StaticResource StripeStyle}"/>
</igCA:Axis.Stripes>
</igCA:Axis>
</igCA:XamChart.Axes>
</igCA:XamChart>
</Grid>
</Window>
You are appling a custom style to the XamChart. I don't have it applied and the chart continues to size as the window size grows. Please check you don't have any properties set in the style such as MaxHeight or MaxWidth. If you can't find the problem, please also post the styles that are being applied to the chart.
Thanks,
Graham