DevExpress设置饼状图的Lable位置实例
程序员文章站
2023-12-15 17:04:58
本文实例讲述了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#程序设计有所帮助