How to remove space between chart area and plot area?
Posted
by
Gopalakrishnan Subramani
on Stack Overflow
See other posts from Stack Overflow
or by Gopalakrishnan Subramani
Published on 2011-01-04T07:48:24Z
Indexed on
2011/01/04
7:54 UTC
Read the original article
Hit count: 593
I am using chartingToolKit:Chart control. I want to remove the white space appear in between the chart and plot area. Attached the WPF sample and image of area to be removed.
<Window x:Class="WpfApplication2.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525" xmlns:chartingToolkit="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit">
<Grid>
<chartingToolkit:Chart x:Name="chart" Width="500" Height="300" Margin="0, 0, 0, 0" LegendStyle="{StaticResource LegendStyle}" >
<chartingToolkit:AreaSeries ItemsSource="{Binding}"
DependentValuePath="Value"
IndependentValuePath="Key"
Background="Red"
>
</chartingToolkit:AreaSeries>
<chartingToolkit:Chart.Axes>
<chartingToolkit:LinearAxis Orientation="X" ShowGridLines="False" Visibility="Hidden">
</chartingToolkit:LinearAxis>
<chartingToolkit:LinearAxis Orientation="Y" ShowGridLines="False" Visibility="Hidden"/>
</chartingToolkit:Chart.Axes>
</chartingToolkit:Chart>
</Grid>
The area marked in red arrow must be removed
© Stack Overflow or respective owner