DevExpress設置餅狀圖的Lable地位實例。本站提示廣大學習愛好者:(DevExpress設置餅狀圖的Lable地位實例)文章只能為提供參考,不一定能成為您想要的結果。以下是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;
//}
}
運轉後果以下圖所示:
願望本文所述對年夜家的C#法式設計有所贊助