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:
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.
Thanks. This helped a lot. You've got no idea how long I've been strugling with this problem. Shows you what illeteracy can do to you....
Thanks again.
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.