Page 1 of 1

Last MARK not showing in a line series

Posted: Fri Jan 13, 2012 4:22 pm
by 16660887
After upgrading to ActiveX 2011 we do not see the lst MARK in a line series. The datapoint is active, so we can view tooltips even for that point, but the mark is missing. Here is some client-side code we have dealing with marks and the image below it.

function changeMark(theSIndex,SeriesIndex) {
var theX
var theY
var adjustedIndex

// Adjust from index to value
adjustedIndex = parseInt(theSIndex) + 1;

// Add Annotation tool to chart
if (dpToolFlag == false) {
Chart1.Tools.Add(10);
dpToolFlag = true;
}

//dpToolItemNumber = numTools + 1;
dpToolItemNumber = Chart1.Tools.Count - 1;
if(dpToolItemNumber < 0)
dpToolItemNumber = 0;
numTools = dpToolItemNumber - 1;
Chart1.Tools.Items(dpToolItemNumber).asAnnotation.Shape.CustomPosition = 1;

// Calulate X pos and Y pos from index
theX = Chart1.Series(SeriesIndex).CalcXPos(theSIndex);
theY = Chart1.Series(SeriesIndex).CalcYPos(theSIndex);

// Set position of annotation based on X and Y values
Chart1.Tools.Items(dpToolItemNumber).asAnnotation.Shape.Left = theX;
Chart1.Tools.Items(dpToolItemNumber).asAnnotation.Shape.Top = theY;

// Set the string that will appear in annotation
Chart1.Tools.Items(dpToolItemNumber).asAnnotation.Text = "Point: " + adjustedIndex;

}

Re: Last MARK not showing in a line series

Posted: Mon Jan 16, 2012 3:11 pm
by 16660887
I did some further testing on this. This problem seems to only happen on wide-screen monitors. Standard width monitors show the mark properly. This also only happens with ActiveX. If an image file is loaded then the mark appears at the last point.

Re: Last MARK not showing in a line series

Posted: Tue Jan 17, 2012 3:58 pm
by yeray
Hi Wieselberg,

Are you using the latest version available?
http://www.teechart.net/support/viewtop ... =1&t=12950

The following code seems to work fine with it:

Code: Select all

Private Sub Form_Load()  
  TChart1.Aspect.View3D = False
  
  TChart1.AddSeries scPoint
  TChart1.Series(0).FillSampleValues
End Sub

Re: Last MARK not showing in a line series

Posted: Thu Jan 19, 2012 3:26 pm
by 16660887
I was not using maintenance release 5 at the time. I had 4 for the test. Is there a known issue that you resolved with 5?

Re: Last MARK not showing in a line series

Posted: Fri Jan 20, 2012 4:07 pm
by yeray
Hi Wieselberg,

Yes, take a look at this thread (note TeeChart AX is a wrapper from the VCL version so the changes applied to the first also affect the second)

Re: Last MARK not showing in a line series

Posted: Thu Jan 26, 2012 3:39 pm
by 16660887
Maintenance release 5 appears to have fixed this issue. Thank you very much! :D