Page 1 of 1

X values of points are incorrectly drawn

Posted: Thu Jul 14, 2016 9:45 am
by 16577506
Hello,

there seems to be a problem with the (X) position of points in the graphics.
Or I am overlooking something. The series values that are plotted are all on the same X value:
ValueTable.PNG
The table showing all the same X positions
ValueTable.PNG (8.46 KiB) Viewed 5279 times
But in the graphics the points are at different X values:
ValueGraphics.PNG
The graphics showing deviating X positions
ValueGraphics.PNG (24.7 KiB) Viewed 5281 times
To reproduce this please load the chart from the attached tee file.

best regards,

X-Ray

Re: X values of points are incorrectly drawn

Posted: Fri Jul 15, 2016 8:02 am
by yeray
Hello,

After loading your tee file I see the first 2 series are assigned to the top axis while the third series is assigned to the bottom axis. By default, each axis automatically scales to fit the points in the series assigned to it; but they also add some offset internally to avoid overlapping when possible.
In your case, if you are not going to show the top axis, you can assign all the series to the bottom axis:

Code: Select all

  Chart1[0].HorizAxis:=aBottomAxis;
  Chart1[1].HorizAxis:=aBottomAxis;

  Chart1.Axes.Bottom.LabelStyle:=talValue;

Re: X values of points are incorrectly drawn

Posted: Fri Jul 15, 2016 11:28 am
by 16577506
Hello Yeray,

Thank you very much for clearing the confusion !
I assigned the other series to the invisible top axis to not show the markers on the bottom axes, but rather the values.
The call:

Chart1.Axes.Bottom.LabelStyle:=talValue;

is of course the right measure to achieve this.

best regards,

X-ray