PDA

View Full Version : [FIXED] (Beta 1) Scatter Chart Triangle Shape is Not Equilateral



LEWJO10@ca.com
5 Jan 2012, 6:21 AM
Brendan,

The triangle returned from Primitives.triangle(0, 0, 10) that can be used as a ScatterSeries marker is a right angle triangle, which (in my opinion) looks odd (see attached). I think that it would be more appropriate in this context to return an equilateral triangle or at least an isosceles triangle.

If you agree, then please fix.

Thanks,
John Lewis

BrendanC
9 Jan 2012, 4:32 PM
Thanks again John. This will be fixed in the next release. In the meantime this method should get you what you want:


public static PathSprite triangle(double cx, double cy, double radius) {
PathSprite triangle = new PathSprite();
radius *= 1.75;
triangle.addCommand(new MoveTo(cx, cy));
triangle.addCommand(new MoveTo(0, -radius * 0.58, true));
triangle.addCommand(new LineTo(radius * 0.5, radius * 0.87, true));
triangle.addCommand(new LineTo(-radius, 0, true));
triangle.addCommand(new ClosePath());
return triangle;
}