I have datapoints in a MS chart and I would like to connect all these datapoints with lines, where none of the lines cross each other. Each datapoint will be connected to 2 other datapoints.
The plot should look like a closed loop, it is very important that there will be no lines that cross on top of another.
Is there an easy way to achieve this?
OK, I misspoke: It actually is not that hard, that is unless one wants more restrictions than what you gave. Here is a method that ought to work:
List<Tuple<PointF, float, float>>
DataPointsfrom it we add to our Series.
This ought to work without any crossings but I believe some results will look uglier than what a hand-crafted solution would be. In fact most examples will look like an explosion ;-)
Here is an example with 100 random points.