Profile Picture

Plotting a cylinder on XY axes

Posted By Marcus McCallum 13 Years Ago
Author
Message
Marcus McCallum
Posted 13 Years Ago
View Quick Profile
Junior Member

Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)

Group: Forum Members
Last Active: 6 Years Ago
Posts: 29, Visits: 61

Hi,

I am trying to find out if there is a way to plot out shapes that appear on a cylinder on an xy-axes. The points that cause problems are the ones  that start at say 0 degrees and then overlap the 350 degrees region....I have attached a plot shopwing what I mean.

I want to plot out as a shapeseries (as shown in plot). One way would just be to have 2 shapeseries for every point and then for the ones that overlap you just use the second shapeseries and for the ones that don't then you just set the shapeseries points to be equal...then it makes it easier to incorporate hit-testing as they will have the same array number.

I was just wondering if there was a better way that didn't involve two shapeseries.

Any help much appreciates.

Regards,

Marcus



Attachments
Flat cylinder.JPG (48 views, 16.00 KB)
Nevron Support
Posted 13 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Marcus,

There is no way currently to tell the y axis to cycle the content (e.g to plot data that is above its max range value at min and vice versa). You can use a single shape series and generally have two cases:

1. If the shape is inside 0, 360 draw it verbatim

2. If the shape goes outside the range split it and draw two shapes instead.

To workaround the indices you can use the Tags array of the series and store the original indices there - that way you can easily convert form the data point index to original indices using:

if (someHitTestResult.ChartElement == ChartElement.DataPoint)
{
 NShapeSeries shapeSeries = someHitTestResult.Series as NShapeSeries;
 if (shapeSeries != null)
 {
  int orginalIndix = (int)shapeSeries.Tags[someHitTestResult.DataPointIndex];
 }
}

Hope this helps - questions or comments - please feel free...



Best Regards,
Nevron Support Team



Marcus McCallum
Posted 13 Years Ago
View Quick Profile
Junior Member

Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)

Group: Forum Members
Last Active: 6 Years Ago
Posts: 29, Visits: 61

Brilliant that works.

Thanks,

Marcus





Similar Topics


Reading This Topic