Recent

Author Topic: One Chart - 2 scales  (Read 965 times)

Nicole

  • Hero Member
  • *****
  • Posts: 972
One Chart - 2 scales
« on: September 16, 2022, 02:04:16 pm »
This must be easy, but I cannot see, how:

I have 3 data series:

1) value1
2) value2
3) value3 => their ratio i.e. value2 / value1

Value3 is very small, near zero, so I hardly can see it on the chart.

How can I say:

- Scale value1 und value2 at the right side?
- Scale value3 at the left side and independent of the 2 other series?



KodeZwerg

  • Hero Member
  • *****
  • Posts: 2090
  • Fifty shades of code.
    • Delphi & FreePascal
Re: One Chart - 2 scales
« Reply #1 on: September 16, 2022, 03:25:53 pm »
As a workaround if that what you want is not possible, make your current smaller to have space for a seperate chart that works on its own.
Just a suggestion.
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

wp

  • Hero Member
  • *****
  • Posts: 11923
Re: One Chart - 2 scales
« Reply #2 on: September 16, 2022, 10:58:23 pm »
The tutorial https://wiki.lazarus.freepascal.org/TAChart_Tutorial:_Dual_y_axis,_Legend describes how to use a second axis with different scale.

Nicole

  • Hero Member
  • *****
  • Posts: 972
[solved] Re: One Chart - 2 scales
« Reply #3 on: September 17, 2022, 12:36:25 pm »
Thank you!
I will go through it.

And in the meanwhile I found a demo as well (the path shall be similar to everybody):
C:\lazarus\components\tachart\demo\axistransf
second tab indepent scales

Both looks like it would be "solved" after having studied it.

 

TinyPortal © 2005-2018