[DevExpress]ChartControl 创建Drill-Down样式的Title

  关键代码:

  ///

  /// 创建Drill-Down样式的Title

  ///

  /// ChartControl

  /// title文字

  /// 是否可见

  public static void AddDrillDownTitle(this ChartControl chart, string title, bool visible)

  {

  ChartTitle _chartTitle = new ChartTitle();

  _chartTitle.Alignment = StringAlignment.Near;

  _chartTitle.Antialiasing = false;

  _chartTitle.Font = new Font("Tahoma", 10F, FontStyle.Underline);

  _chartTitle.Indent = 20;

  _chartTitle.Text = title;

  _chartTitle.TextColor = Color.RoyalBlue;

  _chartTitle.Visible = false;

  chart.Titles.Add(_chartTitle);

  }

  运行效果:

  

[DevExpress]ChartControl 创建Drill-Down样式的Title_第1张图片

你可能感兴趣的:([DevExpress]ChartControl 创建Drill-Down样式的Title)