私はchartingToolKit:Chartコントロールを使用しています。グラフとプロット領域の間に表示される空白を削除したいと思います。削除する領域のWPFサンプルとイメージを添付しました。WPF Toolkitのチャート領域とプロット領域の間のスペースを削除するにはどうすればよいですか?
<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>
赤い矢印でマークされた領域を使用すると、再テンプレートのチャートに必要なこれを達成するために
ありがとうございます。コンテンツを追加すると、グラフは表示されません。それを動作させるためのあらゆるアイデア? –
私はあまりにも積極的にテンプレートの一部を切り取っていたようです。上記の私の回答を編集しました。グラフにゼロ埋めがあり、軸の幅/高さがゼロであることに注意してください。 – ColinE
ありがとうございました..これは私の問題を解決しました –