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
Chart label problems. (Overlapping, not aligning correctly, etc...)
posted

Good day.

 I'm currently using the UltraChart object to draw graphs on my data. It's an extremely powerfull class, especially with all the different properties you can set on it. I however have great difficulty in getting the Y-Axis label to display correctly. I've tried setting the chart.axis.Y.labels.HorisontalAlign properties to all 3 available options (Near, Center and Far), but that still haven't solved the problem. When the object draws the graph it's almost as if it doesn't take into account that labels also need to be rendered.

How I display these charts is, I generate the chart that needs to be displayed (based on the result of a stored procedure call, made by a SQLDataSource object), I then add this graph to a Panel displayed on the aspx page. The labels appear with the chart in the panel most of the time, but when the get a bit longer, they start to get cut off. I've read up on how the horisontalalignment property works (near, far, center), but I don't understand how UltraCharts render these labels.

I include some images to clarify my problem:

Cutting off X-Axis

See what happens in the image above (http://www.projectlog.co.za/Test/User/ChartImages/2008-06-02T044441.png?KxRx=0x03439): The labels on the Y-Axis are being cut off. The alignment of the axis on this specific graph is set to center, but when I set it to "Far", then the end of the label is shown where their center points are now. When I set the alignment to "Near", then the labels start where their center points are now.

Any help regarding this problem will greatly be appreciated.

Thanks in advance.

Parents
No Data
Reply
  • 28496
    Verified Answer
    Offline posted

    try setting Axis.Y.Labels.Layout.Behavior = Auto and Axis.Y.Labels.SeriesLabels.Layout.Behavior = Auto.  with this setting, the chart will attempt to arrange your labels in the best way possible.

    increasing the value of Axis.Y.Extent will also help.

    another thing to consider is setting Axis.Y.Labels.Visible = false and turning the legend on, since "overdue" and "due" are repeated and you could just display that information once in the legend.

Children