Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 SPC Control Chart Tools for .Net
 Pareto X-Axis Label Alignment
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

dbeard

7 Posts

Posted - 05 Jan 2007 :  12:25:08  Show Profile  Reply with Quote
I am trying to display xaxis labels for each category in my pareto chart and display the labels at a 45 deg. angle. I can rotate the labels fine, but I cannot figure out how to start each label at the end of the tick mark. Below is a snippet of code I'm using so far:
this.XAxisLab.TextFont = new Font("Arial", 8.25f);
this.XAxisLab.TextRotation = -45;
this.XAxisLab.SetOverlapLabelMode(ChartObj.OVERLAP_LABEL_DRAW);

The center of the labels is aligned with the tick marks. See image below. How do I get the rotated text to start at the tip end of the tick marks?

quinncurtis

1164 Posts

Posted - 05 Jan 2007 :  14:47:44  Show Profile  Reply with Quote
That alignment is automatically calculated based on the text rotation and cannot be explicitly changed. Your use of extremely long labels makes our algorithm fail.

It turns out that the cross-over point for the alignment is at -46 degrees text rotation. If you make the text rotation -46 degrees, you will find that the labels align the way that you want.

this.XAxisLab.TextRotation = -46;

It looks like multi-line labels for the x-axis would be a better choice in your case, making it more readable, since most of your axis labels contain natural breaks. Our ParetoDiagram example has an example of how to insert a new line ('\n') character to do that. But that is up to you.

By the way, how did you include the chart image in your posting ?
Go to Top of Page

dbeard

7 Posts

Posted - 05 Jan 2007 :  16:48:42  Show Profile  Reply with Quote
Thanks for the reply. The very long labels come from a database, and unfortunately, the names of the defects are controlled by the end-user. So, they could get even longer. I will experiment with the option of inserting new line character.

I included the chart image in the post by snapping a screen shot (.jpg) and then uploaded it to our company's web server. Then, in the post, I used the [IMG] tags and referenced the address where the .jpg file is stored on our web server.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07