Problem with Ploting Barserie and LineSeries

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
emwamin
Newbie
Newbie
Posts: 6
Joined: Fri Nov 11, 2011 12:00 am

Problem with Ploting Barserie and LineSeries

Post by emwamin » Mon Feb 13, 2012 4:41 pm

Hi.

I am ploting a histogram using Barseries to see if the data is normal distributet. I also want to plot a Gause curve using LineSeries.

Despite that the data for both series are correctly calculated in the plot the LineSerie is not plotet correctly. I can see the same problem even if I use PointSeries (instead of Lineseries).

In attached picture (Histogram1.jpg) the Pointseries should start at 13 and goes to 16.5. But as you can see the points are ploted in the range of 13.8 to 14.08. I have activated the labels showing the X-Value and you can clearly see that the point are not plotet at the correct x position. If I look at the data in the Edit Chart window, I can see that values are correct.
Histogram1.jpg
Histogram1.jpg (90.11 KiB) Viewed 5285 times
If I deactivate the BarSeries (in the Edit Chart window) then the PointSerie looks correct (see Histogram2.jpg).
Histogram2.jpg
Histogram2.jpg (90.77 KiB) Viewed 5285 times
Do you have any idea how I can solve this problem?

BR
emwamin

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Problem with Ploting Barserie and LineSeries

Post by Yeray » Tue Feb 14, 2012 10:14 am

Hi,

It will probably something related to how the values are being added to the chart. Are you using the AddXY for both the Bar and the Point series? Note that adding the values without "X", (Add, AddY functions), the XValues will actually be 0, 1, 2,...
If you still have problems with it, please try to arrange a simple example project we can run as-is to reproduce the problem here.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

emwamin
Newbie
Newbie
Posts: 6
Joined: Fri Nov 11, 2011 12:00 am

Re: Problem with Ploting Barserie and LineSeries

Post by emwamin » Wed Feb 15, 2012 10:59 am

Hi.

You were right. I changed the method to AddXY() and it works now.

Many Thanks
emwamin

Post Reply