最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

teechart - Jagged lines in Delphi TChart when plotting satellite trajectory data for multiple orbit passes - Stack Overflow

programmeradmin3浏览0评论

I am using Delphi 11 and displaying a satellite trajectory (lasting two orbital periods) in a TChart component. However, in areas where the latitude and longitude values of different orbit passes overlap or are below each other, the chart displays a jagged line instead of a smooth curve. Screenshot of one orbit pass: One period. Screenshot of jagged lines: Two periods, jagged line

The easiest way is to create multiple series, and when the longitude value changes from positive to negative (i.e. indicating the start of a new orbit pass), plot values in a new series. But what if there are more satellites? Or if there are more than two periods? Is it possible to manage with just one series? Also, i can use Point Series,but it doesn't look as good as Fast Line.

I am using Delphi 11 and displaying a satellite trajectory (lasting two orbital periods) in a TChart component. However, in areas where the latitude and longitude values of different orbit passes overlap or are below each other, the chart displays a jagged line instead of a smooth curve. Screenshot of one orbit pass: One period. Screenshot of jagged lines: Two periods, jagged line

The easiest way is to create multiple series, and when the longitude value changes from positive to negative (i.e. indicating the start of a new orbit pass), plot values in a new series. But what if there are more satellites? Or if there are more than two periods? Is it possible to manage with just one series? Also, i can use Point Series,but it doesn't look as good as Fast Line.

Share Improve this question edited Feb 16 at 15:16 Vita asked Feb 16 at 15:10 VitaVita 33 bronze badges New contributor Vita is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct. 1
  • Please provide enough code so others can better understand or reproduce the problem. – Community Bot Commented Feb 16 at 19:05
Add a comment  | 

1 Answer 1

Reset to default 3

Since you are tracking satelite positions I'm assuming you are using AddXY for adding new points to specific chart series. This allows you to specify both Latitude and Longitude position of the satelite.

The reason why you end up with a jagged line is because by default line chart series sort its Points by the X coordinate. To avoid this you need to set XValues.Order of your series to loNone. This will prevent series from changing the order od added points.

Also don't fet to add one null point using AddNull at the end of each orbit so you don't end up with a line between last point of current orbit and the first point of the next orbit.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论