Recent

Author Topic: axis range problem  (Read 4911 times)

mtanner

  • Sr. Member
  • ****
  • Posts: 287
axis range problem
« on: August 18, 2018, 09:25:42 am »
I have a  dual-axis chart.  I use the following bit of code to control the range of the left axis.

With MyChart.AxisList[0] do begin
    Min=0;  Max=100; UseMin=true; UseMax=true;
end;

although actually the values are supplied by variables (whose values I have traced and checked to be correct).

The chart comes out with an x-range of 0 to 1000 (not 100). Except when I plot a series which is actually using the right-hand axis (whose range control seems to work ok).

Any suggestions please?

wp

  • Hero Member
  • *****
  • Posts: 11916
Re: axis range problem
« Reply #1 on: August 18, 2018, 09:33:40 am »
You do not provide enough information for me to give a precise answer. Please assemble a short demo which shows the issue and upload it here (only .pas, .lfm, .lpi and .lpr files in a common .zip).

WooBean

  • Full Member
  • ***
  • Posts: 230
Re: axis range problem
« Reply #2 on: August 18, 2018, 11:18:57 am »
...

With MyChart.AxisList[0] do begin
    Min=0;  Max=100; UseMin=true; UseMax=true;
end;
...
Any suggestions please?

In my opinion your code does nothing. For example: "Min=0;" can be a valid expression (compare variable or field "Min" to zero) but its result is never used.

WooBean
« Last Edit: August 18, 2018, 11:42:40 am by WooBean »
Platforms: Win7/64, Linux Mint Ulyssa/64

mtanner

  • Sr. Member
  • ****
  • Posts: 287
Re: axis range problem
« Reply #3 on: August 18, 2018, 12:38:48 pm »
WooBean, apologies for the typo, the real code does have ":=" and not just "=", and it does do something under the circumstances described.

 

TinyPortal © 2005-2018