Recent

Author Topic: Laz 3 migrated from 2: Chart Axes transformation - > AutoscaleAxis  (Read 1348 times)

Nicole

  • Hero Member
  • *****
  • Posts: 1009
I migrated a project form Laz 2 to Laz 3.
My TAChart is drawn nicely, - but not the scaling. I would need 2 ways of scaling for w series in one chart.

Not sure, how to handle transformation - autoscale. This components seem just to be gone from my form, although the object manager shows them still.

Thanks

wp

  • Hero Member
  • *****
  • Posts: 12595
Re: Laz 3 migrated from 2: Chart Axes transformation - > AutoscaleAxis
« Reply #1 on: January 06, 2024, 05:24:43 pm »
I am not aware of any breaking changes in the Chart Transformations. Without seeing code, it is hard to tell what's wrong...

Nicole

  • Hero Member
  • *****
  • Posts: 1009
Re: Laz 3 migrated from 2: Chart Axes transformation - > AutoscaleAxis
« Reply #2 on: January 06, 2024, 06:30:40 pm »
thank you for your answer.

Not sure, how to ask. I had the code working fine (you helped me a lot with it some months ago and others here as well)  in Laz 2.,
did not even touch it.

In Lazarus 3 the chart shows up as you see it at the screenshot: not scaled properly
What I saw before (have already deleted the old VM): a black zero line and a green series filling the available space.
The values can become positive or negative and nobody knows how much.

As I am no programmer and have forgotten most of how I did it:
Can you give me a hint, where to start debugging?
(pls scroll to the right side to see the componentes)
« Last Edit: January 06, 2024, 06:32:22 pm by Nicole »

wp

  • Hero Member
  • *****
  • Posts: 12595
Re: Laz 3 migrated from 2: Chart Axes transformation - > AutoscaleAxis
« Reply #3 on: January 06, 2024, 06:50:36 pm »
The most typical error when working with AxisTransformations is to forget to assign the AxisIndexX|AxisIndexY of the series to the axis on which it is plotted.

Do you somewhere set the Range.Max, .Min, .UseMax, .UseMin of the axes? Check if the Max/Min values are correct. Or uncheck UseMin/UseMax for a test. What changes?

Are the axistransformations assigned to the correct axes? I see that you have the unusual configuration in which the left axis has index 2 and the right axis has index 0. Maybe you did not consider this when the axes were assigned.

Nicole

  • Hero Member
  • *****
  • Posts: 1009
Re: Laz 3 migrated from 2: Chart Axes transformation - > AutoscaleAxis
« Reply #4 on: January 06, 2024, 08:17:52 pm »
I did not change one comma in the source.
The only thing, I can imagine is, that a "dcu"-File was in my lib, which I deleted. Maybe the error was in the code all the time, but I did not recognize.

However: I re-checked it all, everything looks as fitting together.
There are 2 kinds of scaling: "Candles" (=candlestick version of OHLC series)
and "baco" which are 3 values, 2 similar to each other and the zero-line.
Looks all ok.

It is Saturday in the evening, I worked all day, perhaps I am too tired to see something clear.
I will retry on Monday. If you have any more idea, I would be grateful.

 

TinyPortal © 2005-2018