ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Angular Meter and "level" of first and last numbers
Posted by Electron Shepherd on Jul-10-2016 21:24
We're using ChartDirector 6.0.1.0 to generate angular meters. We've noticed that the base of the label for the first and last labels are not at the same height.

I don't think it's due to our code, since I can see the same problem with the sample code. For example, the four rectangular meters on http://www.advsofteng.com/gallery_meter.html all have the bottom of the "0" label at a different height to the bottom of the "100" label, and the same problem can be seen in the help file, in Meters and Gauges -> Angular Meters -> Rectangular Angular Meters

Is there some way I can make them appear at the same level, or is this just the way Chart Director works?

  Re: Angular Meter and "level" of first and last numbers
Posted by Peter Kwan on Jul-12-2016 02:54
Hi Electron,

The different in height is due the difference in label length.

In the current version of ChartDirector, it will try to position a label so that the "tick" is approximately pointing to the "center" of the label. For the labels at 0, 90, 180, 270 degrees, the ticks are certainly pointing at the center of the labels. For other labels, if the ticks are also pointing near the center of the labels, it would make the labels look like having even angular spacing. For the "100" label, the tick will be pointing somewhere near middle "0" for the "100" label. This causes the "100" label to be at a different position than the shorter "0" label.

For your case, one method to make the two labels at similar position is to make the labels similarly in length. This can be by appending empty space to the labels. For example, in Java, it would be like:

//Set scale as usual
m.setScale(0, 100, 20, 10, 5);
//Change the label at 0 to "0    "
m.addLabel(0, "0    ");

Regards
Peter Kwan