Recent

Author Topic: Update visible area  (Read 1312 times)

LemonParty

  • Sr. Member
  • ****
  • Posts: 391
Update visible area
« on: February 24, 2025, 08:56:03 pm »
How to enable graph to automatically wide the visible area when new points are added? I need all points to be visible in graph.
Lazarus v. 4.99. FPC v. 3.3.1. Windows 11

wp

  • Hero Member
  • *****
  • Posts: 13269
Re: Update visible area
« Reply #1 on: February 25, 2025, 01:00:55 am »
Don't change any settings related to axis scaling. It is the default behaviour to expand the axes such that all values are visible.

LemonParty

  • Sr. Member
  • ****
  • Posts: 391
Re: Update visible area
« Reply #2 on: February 25, 2025, 07:56:50 am »
Is it possible to revert axis scaling? Because I need this function.
Lazarus v. 4.99. FPC v. 3.3.1. Windows 11

wp

  • Hero Member
  • *****
  • Posts: 13269
Re: Update visible area
« Reply #3 on: February 25, 2025, 11:02:44 am »
"Revert" axis scaling? Do you mean to go back to a previous scaling (--> probably TChartExtentHistory, see https://wiki.lazarus.freepascal.org/TAChart_Tutorial:_ColorMapSeries,_Zooming#Zoom_history)? Or do you mean to "invert" the direction of the axis (--> property Axis.Inverted)?

LemonParty

  • Sr. Member
  • ****
  • Posts: 391
Re: Update visible area
« Reply #4 on: February 25, 2025, 11:49:00 am »
No, I don't want to go back to previous scaling. I want to remove all scaling done by user so graph becomes autoexpandable again.
Lazarus v. 4.99. FPC v. 3.3.1. Windows 11

wp

  • Hero Member
  • *****
  • Posts: 13269
Re: Update visible area
« Reply #5 on: February 25, 2025, 12:00:32 pm »
There are two settings for axis scaling: Chart.Extent and Chart.*Axis.Range: Set their Use* values to false. I think there are also some series types with their own scaling limits (FunctionSeries, ColorMapSeries, maybe more) having similar Range properties.

LemonParty

  • Sr. Member
  • ****
  • Posts: 391
Re: Update visible area
« Reply #6 on: February 25, 2025, 12:57:04 pm »
Code: Pascal  [Select][+][-]
  1. Chart.Extent.UseXMin:= False;
  2. Chart.Extent.UseYMin:= False;
  3. Chart.Extent.UseXMax:= False;
  4. Chart.Extent.UseYMax:= False;
  5.  
This work. Thank you for help.
Lazarus v. 4.99. FPC v. 3.3.1. Windows 11

 

TinyPortal © 2005-2018