Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
115
UltraChart - ColumnChart | display value on columns.
posted

Hello.

I created a datatable with 3 columns (datetime, int1, int2) and bind it to my chart.

Now i want to display the value of each column on the column itself, but i think there is a bug or something (only one column displays its value).

source code:

for (int i = 0; i < 10; i++)
            {
                chart.ColumnChart.ChartText.Add(new Infragistics.UltraChart.Resources.Appearance.ChartTextAppearance());
                chart.ColumnChart.ChartText[i].ItemFormatString = "<DATA_VALUE:00.##>";
                chart.ColumnChart.ChartText[i].Row = i;
                chart.ColumnChart.ChartText[i].Column =0;
                chart.ColumnChart.ChartText[i].VerticalAlign = StringAlignment.Center;
                chart.ColumnChart.ChartText[i].Visible = true;
            }
            for (int i = 0; i < 10; i++)
            {
                chart.ColumnChart.ChartText.Add(new Infragistics.UltraChart.Resources.Appearance.ChartTextAppearance());
                chart.ColumnChart.ChartText[i].ItemFormatString = "<DATA_VALUE:00>";
                chart.ColumnChart.ChartText[i].Row = i;
                chart.ColumnChart.ChartText[i].Column = 1;
                chart.ColumnChart.ChartText[i].VerticalAlign = StringAlignment.Far;
                chart.ColumnChart.ChartText[i].Visible = true;
            }

Image:

(note: that i want the value appear in the pink & in the green columns)

Thanks in advance...

 

  • 115
    Verified Answer
    posted

    solution found.

    we have to create only 1 ChartTextAppearance() and set its Row and Column (each) to -2.

    That's fixes the problem....