DevExpress设置饼状图的Lable位置 DevExpress设置饼状图的Lable位置实例
人气:1想了解DevExpress设置饼状图的Lable位置实例的相关内容吗,在本文为您仔细讲解DevExpress设置饼状图的Lable位置的相关知识和一些Code实例,欢迎阅读和指正,我们先划重点:DevExpress,设置,饼状图,Lable,位置,下面大家一起来学习吧。
本文实例讲述了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;
//}
/// 设置饼状图的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#程序设计有所帮助
加载全部内容