Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# wpf绘制X轴图不';在数据和制作方面不适当_C#_Wpf_Charts - Fatal编程技术网

C# wpf绘制X轴图不';在数据和制作方面不适当

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

我的图表包含一系列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: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的间隔,圆点就正确地出现了

如果使用
线性轴
而不是
类别轴
,会发生什么情况?