zhenpingwang

http://www.cnblogs.com/kevin-h-wang/archive/2013/06/05/UltraChart.html

1、柱状图上显示数值

//第一种方法
this.UltraChartSScore.Data.ZeroAligned = true;
this.UltraChartSScore.DataSource = dt.DefaultView;
this.UltraChartSScore.DataBind();
ChartTextAppearance text = new ChartTextAppearance();
text.Column = -2;
text.Row = -2;
text.PositionFromRadius = 50;
text.VerticalAlign = System.Drawing.StringAlignment.Far;
text.ItemFormatString = "<DATA_VALUE:00.00>";
text.Visible = true;
UltraChartSScore.ColumnChart.ChartText.Add(text);
this.UltraChartSScore.TitleTop.Text = "主项S得分对比柱状图";
//第二种方法(一个一个的添加)
for (int i = 0; i < dt.Rows.Count; i++)
{
    for (int j = 0; j < 4; j++)
    {
        ChartTextAppearance text = new ChartTextAppearance();
        text.Row = i;
        text.Column = j;
        text.VerticalAlign = System.Drawing.StringAlignment.Far;
        text.ItemFormatString = "<DATA_VALUE:00.00>";
        text.Visible = true;
        chart.ColumnChart.ChartText.Add(text);
    }
}

分类:

技术点:

相关文章:

  • 2022-01-14
  • 2021-10-24
  • 2022-02-22
  • 2022-01-10
  • 2021-12-12
  • 2022-02-27
  • 2022-02-02
猜你喜欢
  • 2022-02-02
  • 2022-01-04
  • 2022-12-23
  • 2021-04-27
  • 2022-01-14
相关资源
相似解决方案