我正在尝试在代码隐藏中设置一个 linearAxis Title 属性,但它没有显示,有人可以告诉我我做错了什么吗?
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0" Background="White">
<chart:Chart x:Name="BarChart" Foreground="Gray" Title="Midwest City Populations">
<chart:BarSeries
Title="Population" IndependentValueBinding="{Binding Name}"
DependentValueBinding="{Binding Population}"
>
<chart:BarSeries.DataPointStyle>
<Style TargetType="chart:BarDataPoint" x:Name="stylename">
<Setter Property="Background" Value="Purple" x:Name="test" />
</Style>
</chart:BarSeries.DataPointStyle>
</chart:BarSeries>
<chart:Chart.Axes>
<chart:CategoryAxis Title="City" Orientation="Y" FontStyle="Italic"/>
<chart:LinearAxis x:Name="axis_for_bargraph"
Orientation="X"
Minimum="10"
Maximum="500"
Title="kaas"
ShowGridLines="True" FontStyle="Italic"/>
</chart:Chart.Axes>
</chart:Chart>
axis_for_bargraph = new LinearAxis();
axis_for_bargraph.Title = "MB USed";