Page 1 of 1

Multiple ViewXY Chart Types

Posted: Wed May 29, 2013 11:12 pm
by symbolick
I have a area series displaying some data and I want to display a polygon series on top of it. I have not been able to get any other series besides a area series to show up on the chart while the original area series is being displayed. Is there some sort of setting I am missing?

Regards,
Aaron

Re: Multiple ViewXY Chart Types

Posted: Thu May 30, 2013 1:29 pm
by ArctionJari
Hi Aaron.

Are your polygon points inside the view? I mean, are you using correct values so that polygon is drawn to visible area? Make sure that polygon series' Behind property is false.

I just tested area/polygon rendering using the demo application and it worked just fine. I copied AddPolygon method from ExamplePolygon to ExampleAreaXY and also copied the first call of AddPolygon and placed it before chart.EndUpdate() in ExampleAreaXY. I modified the points so that it draws a rectangle. Here's a screen capture:
polygon.png
polygon.png (271.97 KiB) Viewed 37419 times

Re: Multiple ViewXY Chart Types

Posted: Thu May 30, 2013 5:03 pm
by symbolick
Could it possible be something to do with the amount of points the polygon is created from? Some background on the application I am trying to use this for. I have a set of data in a area series that I am selecting from then I am trying to fit a bell curve shape to a peak in the graph. I can tell that the points I have are correct and located in the view because if I turn on the text to the polygon it shows up right where the polygon I am trying to draw should be located as shown in the attached image.
Example.PNG
Example.PNG (13.53 KiB) Viewed 37414 times
Here is the same example except I am using a area series to plot the bell curve shape:
Example2.PNG
Example2.PNG (11.64 KiB) Viewed 37414 times
In the first image the polygon is constructed from about 500 points. My code for adding the polygon is as follows:

Code: Select all

  Color assignedColor = Colors.Red;
                PolygonSeries ps = new PolygonSeries(_chart.ViewXY, _chart.ViewXY.XAxes[0], _chart.ViewXY.YAxes[0]);
                ps.Fill.Color = assignedColor;
                ps.Fill.GradientColor = ChartTools.CalcGradient(assignedColor, Colors.Black, 50);
                ps.Title.Visible = true;
                ps.Title.Color = ChartTools.CalcGradient(assignedColor, Colors.Black, 80);
                ps.Title.Text = "Polygon";
                ps.Title.Shadow.Style = TextShadowStyle.HighContrast;
                ps.Behind = false;
                ps.Points = points.ToArray();
                _chart.ViewXY.PolygonSeries.Add(ps);
                _chart.InvalidateVisual();
                _chart.ViewXY.FitView();
               _chart.EndUpdate();

Re: Multiple ViewXY Chart Types

Posted: Fri May 31, 2013 10:23 am
by ArctionJari
500 points is not a problem. Have you tried without that call to InvalidateVisual method?

Re: Multiple ViewXY Chart Types

Posted: Wed Jun 05, 2013 4:23 pm
by symbolick
I got this to work using lightning chart in a separate project with the same data points, so it appears there is just some small error in the way I am setting up this particular chart.

Re: Multiple ViewXY Chart Types

Posted: Wed Jun 05, 2013 5:00 pm
by symbolick
It seems my problem is that I cannot create a logarithmic y axis and display polygons at the same time. I changed the code above to a linear y axis and it shows the polygon. With a logarithmic axis it will only show the title.text of the polygon. Have you experienced this issue before?

Regards,
Aaron

Re: Multiple ViewXY Chart Types

Posted: Thu Jun 06, 2013 9:53 am
by ArctionPasi
There's a bug in polygons in log axes. We'll make new version asap with the fix. Sorry for the trouble. :?

Re: Multiple ViewXY Chart Types

Posted: Thu Jun 06, 2013 1:02 pm
by ArctionPasi
We've fixed the issue. New version of LightningChart will be available on Monday June 10th at the latest.

Re: Multiple ViewXY Chart Types

Posted: Thu Jun 06, 2013 6:32 pm
by symbolick
I really appreciate the timely fix. Thanks for your help.
:D

Re: Multiple ViewXY Chart Types

Posted: Mon Jun 10, 2013 3:29 pm
by symbolick
Hello, its the 10th now and I'm wondering where do I go to on arction.com to download updated dlls.

Regards,
Aaron

Re: Multiple ViewXY Chart Types

Posted: Mon Jun 10, 2013 8:42 pm
by ArctionPasi
Hi Aaron,
yes, it's 10th, and 5.1.6 is now available.
http://www.arction.com/downloads

Sorry to keep you waiting. 8-)

Re: Multiple ViewXY Chart Types

Posted: Tue Jun 11, 2013 5:29 pm
by symbolick
Downloaded it and its working great. You guys are awesome. :mrgreen: