我正在使用 WPF DataVisualization 图表控件来显示一些示例数据。我的问题是 Y 轴显示小数值。我怎样才能让它只显示整数值。
这是我的 XAML 代码
<chartingToolkit:Chart Margin="0,30,0,30" Name="columnChart" Title="" Foreground="Black" >
<chartingToolkit:ColumnSeries DependentValuePath="Value" Background="Red"
IndependentValuePath="Key" ItemsSource="{Binding}" >
<chartingToolkit:ColumnSeries.DataPointStyle>
<Style TargetType="Control">
<Setter Property="Background" Value="#A80729"/>
</Style>
</chartingToolkit:ColumnSeries.DataPointStyle>
</chartingToolkit:ColumnSeries>
</chartingToolkit:Chart>
聊天快照here http://postimage.org/image/4volzaqmd/
设置间隔和最小值,
就像是,
<chartingToolkit:ColumnSeries.DependentRangeAxis>
<chartingToolkit:LinearAxis FontSize="15" Foreground="White" Interval="1" Minimum="0" Orientation="Y" ShowGridLines="False" />
</chartingToolkit:ColumnSeries.DependentRangeAxis>
<chartingToolkit:ColumnSeries.IndependentAxis>
<chartingToolkit:CategoryAxis FontSize="12" Foreground="Gray" Orientation="X" ShowGridLines="False" />
</chartingToolkit:ColumnSeries.IndependentAxis>
希望这可以帮助!
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)