本文实例讲述了DevExpress设置饼状图的Lable位置的方法。分享给大家供大家参考。具体实现方法如下:
关键代码如下:
代码如下:/// <summary>
/// 设置饼状图的Lable位置
/// </summary>
/// <param name="series">Series</param>
/// <param name="lablePosition">PieSeriesLabelPosition枚举</param>
public static void SetLablePosition(this Series series, PieSeriesLabelPosition lablePosition)
{
if (series.Label is PieSeriesLabel)
{
PieSeriesLabel _label = series.Label as PieSeriesLabel;
_label.Position = lablePosition;
}
//if (series.Label is Pie3DSeriesLabel)
//{
// Pie3DSeriesLabel _label = series.Label as Pie3DSeriesLabel;
// _label.Position = lablePosition;
//}
}
运行效果如下图所示:
希望本文所述对大家的C#程序设计有所帮助
您可能感兴趣的文章:DevExpress之饼状图突出(Explode)设置实例DevExpress之ChartControl实现时间轴实例DevExpress之SplashScreen用法实例DevExpress之ChartControl用法实例总结DevExpress之TreeList用法实例总结DevExpress SplitContainerControl用法总结DevExpress实现自定义GridControl中按钮文字内容的方法C#实现DevExpress本地化实例详解