Wpf RadChartView未显示直线系列
我在用户控件上有一个简单的RadChartView。当我添加一个系列时,它不会出现,我也不知道为什么。有人有同样的问题吗?我认为这是一个风格问题,因为我们在应用程序中使用了mahapps.metroWpf RadChartView未显示直线系列,wpf,xaml,charts,telerik,mahapps.metro,Wpf,Xaml,Charts,Telerik,Mahapps.metro,我在用户控件上有一个简单的RadChartView。当我添加一个系列时,它不会出现,我也不知道为什么。有人有同样的问题吗?我认为这是一个风格问题,因为我们在应用程序中使用了mahapps.metro <telerik:RadCartesianChart Grid.Column="0" Grid.Row="1" MinWidth="300" MinHeight="250" Height="Auto" Width="Auto"
<telerik:RadCartesianChart Grid.Column="0" Grid.Row="1" MinWidth="300" MinHeight="250" Height="Auto" Width="Auto"
HorizontalContentAlignment="Stretch" Margin="0 0 10 0">
<telerik:RadCartesianChart.EmptyContentTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="En attente des données..." Foreground="Gray" FontWeight="Bold" FontSize="14" Margin="30" HorizontalAlignment="Center"></TextBlock>
</StackPanel>
</DataTemplate>
</telerik:RadCartesianChart.EmptyContentTemplate>
<telerik:RadCartesianChart.VerticalAxis>
<telerik:LinearAxis Title="{Binding BondSecondes}" />
</telerik:RadCartesianChart.VerticalAxis>
<telerik:RadCartesianChart.HorizontalAxis>
<telerik:LinearAxis Minimum="0" Maximum="{Binding CompteurMaximum}" MajorStep="5" Visibility="Visible" />
</telerik:RadCartesianChart.HorizontalAxis>
<telerik:RadCartesianChart.Grid>
<telerik:CartesianChartGrid MajorLinesVisibility="XY" />
</telerik:RadCartesianChart.Grid>
<telerik:RadCartesianChart.Series>
<telerik:LineSeries Stroke="Red" ShowLabels="True" >
<telerik:LineSeries.DataPoints>
<telerik:CategoricalDataPoint Category="50" Value="2" />
<telerik:CategoricalDataPoint Category="48" Value="5" />
<telerik:CategoricalDataPoint Category="46" Value="6" />
<telerik:CategoricalDataPoint Category="44" Value="6" />
<telerik:CategoricalDataPoint Category="42" Value="15" />
<telerik:CategoricalDataPoint Category="40" Value="6" />
<telerik:CategoricalDataPoint Category="38" Value="1" />
</telerik:LineSeries.DataPoints>
</telerik:LineSeries>
<!--<telerik:LineSeries CategoryBinding="Seconde" ValueBinding="Compte" ItemsSource="{Binding GraphDemandes}">
<telerik:LineSeries.Style>
<Style TargetType="telerik:LineSeries">
<Setter Property="Stroke" Value="Black"/>
</Style>
</telerik:LineSeries.Style>
</telerik:LineSeries>
<telerik:LineSeries CategoryBinding="Seconde" ValueBinding="Compte" ItemsSource="{Binding GraphVertNaturels}" Stroke="{Binding CouleurVertNaturel}" StrokeThickness="3"/>
<telerik:LineSeries CategoryBinding="Seconde" ValueBinding="Compte" ItemsSource="{Binding GraphAcceptees}" Stroke="{Binding CouleurAcceptee}" StrokeThickness="3"/>
<telerik:LineSeries CategoryBinding="Seconde" ValueBinding="Compte" ItemsSource="{Binding GraphRejetees}" Stroke="{Binding CouleurRejetee}" StrokeThickness="3" />-->
</telerik:RadCartesianChart.Series>
</telerik:RadCartesianChart>
是否有人有相同的问题并有解决方案
我的图形的打印屏幕:
最后,如果有人犯了与我相同的错误,那只是因为我没有将好的系列用于我的案例。我需要两个LinearAxis类型的垂直轴,但要做到这一点,我的系列需要是ScatterLineSeries类型。我建议参考本页,为您的图形使用正确的组合: