C# wpf绘制X轴图不';在数据和制作方面不适当
我的图表包含一系列5行序列。每条线约有1001个点。每行的数据有点像这样,X值从0到1000,Y值从0到5。我的xml是:C# wpf绘制X轴图不';在数据和制作方面不适当,c#,wpf,charts,C#,Wpf,Charts,我的图表包含一系列5行序列。每条线约有1001个点。每行的数据有点像这样,X值从0到1000,Y值从0到5。我的xml是: <DVC:Chart Name="siReturnChart" Title="Si Return" LegendTitle="Legend" Width="850" Height="450"> <!-- Add Title on Y axis and X Axis --> <DVC:Chart.Axes> <DVC:Lin
<DVC:Chart Name="siReturnChart" Title="Si Return" LegendTitle="Legend" Width="850" Height="450">
<!-- Add Title on Y axis and X Axis -->
<DVC:Chart.Axes>
<DVC:LinearAxis Orientation="Y" Title="Chemical Concentration" HorizontalAlignment="Center" Location="Left" FontWeight="Bold" />
<DVC:CategoryAxis Orientation="X" Title="Production time (days)" Location="Bottom" HorizontalAlignment="Center" FontWeight="Bold" />
</DVC:Chart.Axes>
<DVC:Chart.Series>
<DVC:LineSeries Name="set1layer1Chart" Title="Set 1 Layer 1" IndependentValueBinding="{Binding X}" DependentValueBinding="{Binding Y}" />
<DVC:LineSeries Name="set1layer2Chart" Title="Set 1 Layer 2" IndependentValueBinding="{Binding X}" DependentValueBinding="{Binding Y}" />
<DVC:LineSeries Name="set1layer3Chart" Title="Set 1 Layer 3" IndependentValueBinding="{Binding X}" DependentValueBinding="{Binding Y}" />
<DVC:LineSeries Name="set1layer4Chart" Title="Set 1 Layer 4" IndependentValueBinding="{Binding X}" DependentValueBinding="{Binding Y}" />
<DVC:LineSeries Name="set1layer5Chart" Title="Set 1 Layer 5" IndependentValueBinding="{Binding X}" DependentValueBinding="{Binding Y}" />
<DVC:LineSeries Name="set1wellChart" Title="Set 1 Whole Well" IndependentValueBinding="{Binding X}" DependentValueBinding="{Binding Y}" />
图表的结果是:
为什么X轴显示为这样,而不是0到1000之间的数字??由于X轴的原因,Y轴也没有正确显示,X轴的中心看起来也有点奇怪
我哪里做错了?你知道我该怎么纠正吗
谢谢在DVC::Chart.Axes中添加了以下行
<DVC:LinearAxis Orientation="X" Location="Bottom" Interval="100" />
情况好转了。问题是X轴上显示的数字从0到1000,因为它不适合1行,所以它出现在3行上,弄乱了显示。加上100的间隔,圆点就正确地出现了 如果使用
线性轴
而不是类别轴
,会发生什么情况?