我正在使用 silverlight 工具包中提供的图表控件。
我已经定义了 3 个轴(下面的代码)。现在图表中的系列在用户的命令下发生变化。有时,不会显示原点的 0 值和最大轴值。它们不一定同时丢失。我不知道为什么会这样。该系列中的值与它们绑定在 (0, 1000) 上的范围相同。这种行为正常吗?
<chartingToolkit:Chart.Axes>
<chartingToolkit:LinearAxis x:Name="LeftYAxis"
Orientation="Y"
Location="Left"
BorderThickness="0.5"
>
<chartingToolkit:LinearAxis.AxisLabelStyle>
<Style TargetType="chartingToolkit:AxisLabel" >
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="chartingToolkit:AxisLabel">
<Grid Background="Transparent">
<Border x:Name="AxisLabelMarker"
Background="Transparent"
BorderBrush="Blue"
BorderThickness="0"
>
<TextBlock Text="{Binding}"
Grid.Column="0"
/>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</chartingToolkit:LinearAxis.AxisLabelStyle>
</chartingToolkit:LinearAxis>
<chartingToolkit:CategoryAxis Orientation="X"
Title="Percentage Increase in Bid Value"
Location="Bottom"
BorderThickness="0.5"
>
<chartingToolkit:CategoryAxis.AxisLabelStyle>
<Style TargetType="chartingToolkit:AxisLabel" >
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="chartingToolkit:AxisLabel">
<Grid Background="Transparent">
<Border x:Name="AxisLabelMarker"
Background="Transparent"
BorderBrush="Blue"
BorderThickness="0"
>
<TextBlock Text="{Binding}"
Grid.Column="0"
/>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</chartingToolkit:CategoryAxis.AxisLabelStyle>
</chartingToolkit:CategoryAxis>
<chartingToolkit:LinearAxis x:Name="RightYAxis"
Orientation="Y"
Location="Right"
BorderThickness="0.5"
>
<chartingToolkit:LinearAxis.AxisLabelStyle>
<Style TargetType="chartingToolkit:AxisLabel">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="chartingToolkit:AxisLabel">
<TextBlock Text="{Binding}"
/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</chartingToolkit:LinearAxis.AxisLabelStyle>
</chartingToolkit:LinearAxis>
</chartingToolkit:Chart.Axes>