8,731
社区成员
发帖
与我相关
我的任务
分享
<my:Chart.AxesX>
<my:Axis Title="类型" FontFamily="Arial,SimSun" FontSize="20">
<my:Axis.AxisLabels>
<my:AxisLabels FontSize="20"></my:AxisLabels>
</my:Axis.AxisLabels>
</my:Axis>
</my:Chart.AxesX>
<Style x:Key="DPStyle" TargetType="my:DataPoint">
<Setter Property="FontSize" Value="20"></Setter>
<Setter Property="LabelFontFamily" Value="Arial,SimSun"></Setter>
<Setter Property="LabelFontSize" Value="20"></Setter>
</Style>
DServies.DataPoints.Clear();
DataPoint dp1 = new DataPoint() { AxisXLabel = "第一季", YValue = info1.OrderTotal };
dp1.Style = Application.Current.Resources["DPStyle"] as Style;
DataPoint dp2 = new DataPoint() { AxisXLabel = "第二季", YValue = info1.OrderPass };
dp2.Style = Application.Current.Resources["DPStyle"] as Style;
DataPoint dp3 = new DataPoint() { AxisXLabel = "第三季", YValue = info1.OrderReject };
dp3.Style = Application.Current.Resources["DPStyle"] as Style;
DServies.DataPoints.Add(dp1);
DServies.DataPoints.Add(dp2);
DServies.DataPoints.Add(dp3);
DServies.Style = Application.Current.Resources["DSStyle"] as Style;
chart1.Series.Add(DServies);