Recent

Author Topic: TAChart Error in tachartaxis.pas on 1514 line  (Read 433 times)

dawn

  • Newbie
  • Posts: 2
TAChart Error in tachartaxis.pas on 1514 line
« on: March 11, 2025, 01:45:24 am »
My program use two TAChart with Two Form but use the same datasource TListChartSourceSetData from the othe form, when the form with second TAChart show, the Program Error, The error is:
    in file 'tachartaxis.pas' on line 1514: Result := (FHi - FLo) / (FMax^ - FMin^),
The FMax value is limit to 0, where change it?

The Call stack:
tachartaxis.pas      1514
tagraph.pas           616
tagraph.pas           1572
tagraph.pas           960
tagraph.pas           1511
« Last Edit: March 11, 2025, 01:49:03 am by dawn »

wp

  • Hero Member
  • *****
  • Posts: 12761
Re: TAChart Error in tachartaxis.pas on 1514 line
« Reply #1 on: March 11, 2025, 10:31:52 am »
It's hard to find a bug without code...

Maybe you are accessing the chart's Extent too early. Call charts' Prepare method after you added the data values to the ListChartSource.

dawn

  • Newbie
  • Posts: 2
Re: TAChart Error in tachartaxis.pas on 1514 line
« Reply #2 on: March 12, 2025, 12:06:57 am »
Thank you for your reply. Based on your suggestion, I carefully reviewed the code and yes, I accessed the data in advance. Thank you

 

TinyPortal © 2005-2018