I have a 2D stack chart, how do I show the value for each part of the stack bar on the chart?
I tried this but nothing happen:
ChartTextAppearance t = new ChartTextAppearance();t.Visible = true;t.ItemFormatString = "<DATA_VALUE_ITEM:#0.##>";t.Row = -2;t.Column = -2;t.HorizontalAlign = System.Drawing.StringAlignment.Center;
I put this piece of code just before I databind the chart.
Thanks
if the <DATA_VALUE_ITEM> format string (not <DATA_VALUE>) is used, the value displayed will be individual, not cumulative for the stack.
I have attached sample.
Yes please, thank you.
Hi,
I have following code, and it works for me. Do you want, I send a sample?
protected void Page_Load(object sender, EventArgs e)
{
ChartTextAppearance t = new ChartTextAppearance();
t.Visible = true;
t.ItemFormatString = "<DATA_VALUE_ITEM>";
t.Row = -2;
t.Column = -2;
t.HorizontalAlign = System.Drawing.StringAlignment.Center;
this.UltraChart1.BarChart.ChartText.Add(t);
this.UltraChart1.DataSource = GetData();
this.UltraChart1.DataBind();
}