Group: Forum Members
Last Active: 14 Years Ago
Posts: 2,
Visits: 1
|
Currently I'm working on generating 3D line graphs. The line series are 160/255 transparent, my problem is that the intersections of successive lineSegments are visible which doesn't look very nice.
I've uploaded a picture of the mentioned issue: http://stuff.manuel-ernst.de/chart120.png
Perhaps some of you know how to deal with it...
Thank you in advance!
|
Group: Forum Members
Last Active: Last Week
Posts: 3,054,
Visits: 4,009
|
Hello Hans, Unfortunately at this point there is no solution for this problem. The line segments are rendered as separate cylinders that are not connected to each other. The only way to show smooth 3D line is to use opaque filling and set spherical markers with the same size as the tube. This way the gaps will be filled, but this will also cause a significant performance impact because of the many spheres.
Best Regards, Nevron Support Team
|
Group: Forum Members
Last Active: 14 Years Ago
Posts: 2,
Visits: 1
|
Thank you very much for your reply!
So far performance isn't an issue since I'm prerendering static charts for displaying on a website. (get an impression here : http://www.thomann.de/de/usb_audio_interfaces.html )
Do you have an example code regarding your suggestion?
Thank you!
|
Group: Nevron Team
Last Active: 14 Years Ago
Posts: 48,
Visits: 1
|
Hello Hans,
The following code demonstrates this approach. It doesn't help for semi-transparent tubes, but for opaque ones the results are fine.
NCartesianChart chart = (NCartesianChart)nChartControl1.Charts[0]; chart.Enable3D = true; chart.Projection.SetPredefinedProjection(PredefinedProjection.Perspective1);
NLineSeries line = new NLineSeries(); chart.Series.Add(line); line.DataLabelStyle.Visible = false; line.LineSegmentShape = LineSegmentShape.Tube; line.BorderStyle.Width = new NLength(0); line.LineSize = new NLength(20); line.FillStyle = new NColorFillStyle(Color.DarkOrange); line.InflateMargins = true;
line.MarkerStyle.Visible = true; line.MarkerStyle.BorderStyle.Width = new NLength(0); line.MarkerStyle.FillStyle = new NColorFillStyle(Color.DarkOrange); line.MarkerStyle.PointShape = PointShape.Sphere; line.MarkerStyle.AutoDepth = false; line.MarkerStyle.Width = new NLength(20); line.MarkerStyle.Height = new NLength(20); line.MarkerStyle.Depth = new NLength(20);
for(int i = 0; i < 100; i++) { line.Values.Add(Math.Sin(i * 0.05) * Math.Sin(i * 0.1)); }
By the way, www.thomann.de is a great store and is very popular among musicians in Bulgaria.
Best Regards, Milen Metodiev
|