Dear Support
I'm adding a few points to a point series, and then I would like to determine the screen horizontal pixel equivalent of a point or a value, so I write:
PIXEL=frmXX.TChartContour.Series(1).CalcXPosValue(XVALUE)
or
PIXEL =frmXX.TChartContour.Series(1).CalcXPos(IPOINT)
but I always get 0. Why? What can be the problem, what do I do wrong?
Tx in advance, best regards
Andras
Problem with CalcXPos and CalcXPosValue
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Andras,
It is most likely that the chart hasn't been drawn at the moment you make that call. You can try adding the line below to force the chart being drawn and therefore having valid values for using those methods.
It is most likely that the chart hasn't been drawn at the moment you make that call. You can try adding the line below to force the chart being drawn and therefore having valid values for using those methods.
Code: Select all
TChart1.Environment.InternalRepaint
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |