## how can i draw a ellipse,or a orbit like a irregular circle

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
lwperic
Newbie
Posts: 3
Joined: Wed Sep 28, 2011 12:00 am

### how can i draw a ellipse,or a orbit like a irregular circle

which style i can use ? Line, polar ?

it is very urgent!
thanks if someone can help!

lwperic
Newbie
Posts: 3
Joined: Wed Sep 28, 2011 12:00 am

### Re: how can i draw a ellipse,or a orbit like a irregular circle

when i draw a circle by these code:
Line line3 = new Line( myChart2.getChart() );
for(i=0;i<1024;i++)
{
dx = 2* Math.cos( omega*dt*i + Math.PI/2 );

dy = 2* Math.cos( omega*dt*i ) ;// + 4* Math.cos(2*omega*dt*i);

}
i get the result:
is_not_a _circle
circle.JPG (27.16 KiB) Viewed 3119 times

Narcís
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

### Re: how can i draw a ellipse,or a orbit like a irregular circle

Hi lwperic,

Line series was designed to plot sequential data and hence X values are sorted ascendingly. To get a circle from this data set you should set X values not being sorted before populating series:

Code: Select all

``        line3.getXValues().setOrder(ValueListOrder.NONE);``
Best Regards,
 Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com Instructions - How to post in this forum

lwperic
Newbie
Posts: 3
Joined: Wed Sep 28, 2011 12:00 am

### Re: how can i draw a ellipse,or a orbit like a irregular circle

thank u very much!