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);
}
} |