Multiple ViewXY Chart Types

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
symbolick
Posts: 52
Joined: Thu May 16, 2013 8:24 pm

Multiple ViewXY Chart Types

Post by symbolick » Wed May 29, 2013 11:12 pm

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

ArctionJari

Re: Multiple ViewXY Chart Types

Post by ArctionJari » Thu May 30, 2013 1:29 pm

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 37294 times

symbolick
Posts: 52
Joined: Thu May 16, 2013 8:24 pm

Re: Multiple ViewXY Chart Types

Post by symbolick » Thu May 30, 2013 5:03 pm

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 37289 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 37289 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();

ArctionJari

Re: Multiple ViewXY Chart Types

Post by ArctionJari » Fri May 31, 2013 10:23 am

500 points is not a problem. Have you tried without that call to InvalidateVisual method?

symbolick
Posts: 52
Joined: Thu May 16, 2013 8:24 pm

Re: Multiple ViewXY Chart Types

Post by symbolick » Wed Jun 05, 2013 4:23 pm

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.

symbolick
Posts: 52
Joined: Thu May 16, 2013 8:24 pm

Re: Multiple ViewXY Chart Types

Post by symbolick » Wed Jun 05, 2013 5:00 pm

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

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: Multiple ViewXY Chart Types

Post by ArctionPasi » Thu Jun 06, 2013 9:53 am

There's a bug in polygons in log axes. We'll make new version asap with the fix. Sorry for the trouble. :?
LightningChart Support Team, PT

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: Multiple ViewXY Chart Types

Post by ArctionPasi » Thu Jun 06, 2013 1:02 pm

We've fixed the issue. New version of LightningChart will be available on Monday June 10th at the latest.
LightningChart Support Team, PT

symbolick
Posts: 52
Joined: Thu May 16, 2013 8:24 pm

Re: Multiple ViewXY Chart Types

Post by symbolick » Thu Jun 06, 2013 6:32 pm

I really appreciate the timely fix. Thanks for your help.
:D

symbolick
Posts: 52
Joined: Thu May 16, 2013 8:24 pm

Re: Multiple ViewXY Chart Types

Post by symbolick » Mon Jun 10, 2013 3:29 pm

Hello, its the 10th now and I'm wondering where do I go to on arction.com to download updated dlls.

Regards,
Aaron

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: Multiple ViewXY Chart Types

Post by ArctionPasi » Mon Jun 10, 2013 8:42 pm

Hi Aaron,
yes, it's 10th, and 5.1.6 is now available.
http://www.arction.com/downloads

Sorry to keep you waiting. 8-)
LightningChart Support Team, PT

symbolick
Posts: 52
Joined: Thu May 16, 2013 8:24 pm

Re: Multiple ViewXY Chart Types

Post by symbolick » Tue Jun 11, 2013 5:29 pm

Downloaded it and its working great. You guys are awesome. :mrgreen:

Post Reply