Recent

Author Topic: Lost in Transformation / Scaling  (Read 279 times)

Nicole

  • Hero Member
  • *****
  • Posts: 1308
Lost in Transformation / Scaling
« on: January 09, 2026, 10:46:26 am »
I have a huuuuge chart and 4 vertical axes. The chart looked nice. Suddenly the time axes collapsed to a certain point. Not sure, what I did. I use TDateTimeIntervalChartSource for the horicontal axes and this works fine in all my charts and worked fine for this one "before".

I found out, that the collapse happens, the moment I set one of the series to active, which have a certain vertical axes.

Code: Pascal  [Select][+][-]
  1.    for i := 0 to Length(COT_DisA_) - 1 do  begin
  2.  
  3.      if series_OPEN_INTEREST.Active   then  // not under comments for testing and now at a 5th axes for testing
  4.        series_OPEN_INTEREST.AddXY(COT_DisA_[i].datum, COT_DisA_[i].OPEN_INTEREST);
  5.    {  series_PROD_LONG.AddXY(COT_DisA_[i].datum, COT_DisA_[i].PROD_LONG);
  6.      series_PROD_SHORT.AddXY(COT_DisA_[i].datum, COT_DisA_[i].PROD_SHORT);
  7.  
  8.      series_SWAP_LONG.AddXY(COT_DisA_[i].datum, COT_DisA_[i].SWAP_LONG);
  9.      series_SWAP_SHORT.AddXY(COT_DisA_[i].datum, COT_DisA_[i].SWAP_SHORT);
  10.      series_SWAP_SPREAD.AddXY(COT_DisA_[i].datum, COT_DisA_[i].SWAP_SHORT);
  11.      series_SWAP_LONG_net.AddXY(COT_DisA_[i].datum, COT_DisA_[i].SWAP_LONG - COT_DisA_[i].SWAP_SPREAD);
  12.      series_Swap_short_net.AddXY(COT_DisA_[i].datum, COT_DisA_[i].SWAP_SHORT - COT_DisA_[i].SWAP_SPREAD);
  13.  
  14.      series_MMONEY_LONG.AddXY(COT_DisA_[i].datum, COT_DisA_[i].MMONEY_LONG);
  15.      series_MMONEY_SHORT.AddXY(COT_DisA_[i].datum, COT_DisA_[i].MMONEY_SHORT);
  16.      series_MMONEY_SPREAD.AddXY(COT_DisA_[i].datum, COT_DisA_[i].MMONEY_SPREAD);
  17.      series_MMONEY_LONG_net.AddXY(COT_DisA_[i].datum, COT_DisA_[i].MMONEY_LONG - COT_DisA_[i].MMONEY_SPREAD);
  18.      series_MMONEY_SHORT_net.AddXY(COT_DisA_[i].datum, COT_DisA_[i].MMONEY_SHORT - COT_DisA_[i].MMONEY_SPREAD);
  19.  
  20.      series_OTHER_LONG.AddXY(COT_DisA_[i].datum, COT_DisA_[i].OTHER_LONG);
  21.      series_OTHER_SHORT.AddXY(COT_DisA_[i].datum, COT_DisA_[i].OTHER_SHORT);
  22.      series_OTHER_SPREAD.AddXY(COT_DisA_[i].datum, COT_DisA_[i].OTHER_SPREAD);
  23.      series_NONREP_LONG.AddXY(COT_DisA_[i].datum, COT_DisA_[i].NONREP_LONG);
  24.      series_NONREP_SHORT.AddXY(COT_DisA_[i].datum, COT_DisA_[i].NONREP_SHORT);
  25.  
  26.  
  27. all in comment causes the issue and all is added to a certain axes, the values below are another axes and are fine                                                                          }
  28.  
  29.      series_CONC_4_LONG.AddXY(COT_DisA_[i].datum, COT_DisA_[i].CONC_4_LONG);
  30.      series_CONC_4_SHORT.AddXY(COT_DisA_[i].datum, COT_DisA_[i].CONC_4_SHORT);
  31.      series_CONC_8_LONG.AddXY(COT_DisA_[i].datum, COT_DisA_[i].CONC_8_LONG);
  32.      series_CONC_8_SHORT.AddXY(COT_DisA_[i].datum, COT_DisA_[i].CONC_8_SHORT);
  33.      series_CONC_NET_4_LONG.AddXY(COT_DisA_[i].datum, COT_DisA_[i].CONC_NET_4_LONG);
  34.      series_CONC_NET_4_SHORT.AddXY(COT_DisA_[i].datum, COT_DisA_[i].CONC_NET_4_SHORT);
  35.      series_CONC_NET_8_LONG.AddXY(COT_DisA_[i].datum, COT_DisA_[i].CONC_NET_8_LONG);
  36.      series_CONC_NET_8_SHORT.AddXY(COT_DisA_[i].datum, COT_DisA_[i].CONC_NET_8_SHORT);
  37. end;  
 


Sometimes I watched this cumulation line-of-points on the time axes "hopping".   
So probably the issue may be a matter of scaling.

Ok, I added a new left axes and found: The cumulation effect of the left axes is healed, - but the independent scaling of the 2 axes is shot.

So the solution is anywhere deep in the interaction of scaling, time axes and transformation, but how to find it?
I add a zipfile showing all three graphic effects and the frame, where it happens. Unfortunately the frame is linked to a database, which I cannot post.

Thank you all for looking at it.
There shall be 2 attachments, which trouble me in uploading.
I try to add one more posting.

Nicole

  • Hero Member
  • *****
  • Posts: 1308
Re: Lost in Transformation / Scaling
« Reply #1 on: January 09, 2026, 10:48:14 am »
one more to come

Nicole

  • Hero Member
  • *****
  • Posts: 1308
Re: Lost in Transformation / Scaling
« Reply #2 on: January 09, 2026, 10:48:39 am »
done

 

TinyPortal © 2005-2018