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
125
Ultrachart 2D Columns data values are overlapping with neighboring columns
posted

When displaying the data value of the columns, I create a new ChartTextAppearance and add it to the ChartText of the ColumnChart. See below the code:

ChartTextAppearance colApparence = new ChartTextAppearance();
colApparence.Column = SwapRowsColumns ? -2 : i;
colApparence.Row = -2;
colApparence.ItemFormatString = itemFormatString;
colApparence.Visible = !StackChart;
colApparence.HorizontalAlign = StringAlignment.Center;
colApparence.VerticalAlign = StringAlignment.Far;
Chart.ColumnChart.ChartText.Add(colApparence);
Chart.ColumnLineChart.Column.ChartText.Add(colApparence);

The issue is that when there are two columns with a similar value, the data values are overlapping

Any idea on how can I get these values displayed without overlapping?

Thank you.

Parents
No Data
Reply
  • 12480
    Offline posted

    Hi Alvaro,

    UltraChart doesn't have any built-in collision detection for labels. This is something you could implement yourself. I'll put together a small sample to get you started.

    An alternative solution that might work is to use a bar chart instead of columns. Since your labels are longer, they'll match up to the columns better if the chart is oriented vertically like a bar chart.

    Please let me know how you choose to proceed.

Children