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
350
Labelling a chart
posted

Hi,

We need to display a text in the middle of the bars in a bar chart.

We implemented it last time by drawing a hypothetical graph (line chart), and the connecting lines were invisible.

Please have a look at the following graph. We have the graph w/o the text. I added the text using MS Paint, just for a reference.

Any way we could do it in a better way using Infragistics?

Parents
No Data
Reply
  • 17605
    posted

    Hi,

    In the UltraChart stack column chart type the texts are in the middle of the columns. You can try this code:

    this.UltraChart1.ChartType = ChartType.StackColumnChart;

     

    ChartTextAppearance chartText = new ChartTextAppearance();

    chartText.Column = -2;

    chartText.Row = -2;

    chartText.Visible = true;

     

    this.UltraChart1.ColumnChart.ChartText.Add(chartText);

     

    UltraChart1.DataSource = DemoTable.AllPositive();

    UltraChart1.DataBind();

Children