Recent

Author Topic: [SOLVED] How to: clip tcharts?  (Read 14818 times)

madepabloh

  • Full Member
  • ***
  • Posts: 160
[SOLVED] How to: clip tcharts?
« on: August 18, 2011, 09:42:30 pm »
I have different charts (TAChart component) on a form plotting different parameters vs time. Since the parameters are acquired at the same time, the plots have common x value (time). Since they are a lot of parameters, i have them in different charts better than in only one.

However, i would like to allow to the user to zoom in all the charts at the same time, in the same way. Is it possible? How could i do it?

Thanks!
« Last Edit: August 30, 2011, 10:01:55 pm by madepabloh »

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: How to: clip tcharts?
« Reply #1 on: August 19, 2011, 02:22:53 pm »
You can plot them all on the same chart and use axis transformations to separate them.
See
http://wiki.lazarus.freepascal.org/TAChart_documentation#Axis_transformations
and "Axis groups" page in the axis demo

madepabloh

  • Full Member
  • ***
  • Posts: 160
Re: How to: clip tcharts?
« Reply #2 on: August 24, 2011, 10:45:58 pm »
Thanks Ask,

I explored the example, and althought it is apparently what i need, in really is not. Because when i do zoom, 1) i lost the x axis, an  2) it made zoom only of a sector, but i want to do zoom on all the plots at the same time, independently in which one i selected the sector to zoom.

Thanks!!

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: How to: clip tcharts?
« Reply #3 on: August 29, 2011, 11:26:20 am »
1) i lost the x axis

I do not understand this. What do you mean by "lost"?

2) it made zoom only of a sector, but i want to do zoom on all the plots at the same time, independently in which one i selected the sector to zoom.

If I understood correctly, you need to ensure that logical extents of
several charts always stay the same.

Since r32088 you can achieve this by using new TChartExtentLink component.
See panes demo since r32089 for an example.

madepabloh

  • Full Member
  • ***
  • Posts: 160
Re: How to: clip tcharts?
« Reply #4 on: August 29, 2011, 01:18:55 pm »
Thanks Ask,

What i mean is the in your example of different plots in the same chart but with clearly separated Y axis is that is i do a zoom in a selected sector, i have a zoom of this area, only of the selected plot, but the others disappear (obviously) of the screen, where i could only see the Y axis, but not the X-Axis. After to undo the zoom i can see everything right again. So, when doing zoom i lost the x axis and its information...

yes, this is what i am looking for!
Thanks for include a new component to solve my problem! I will first learn how to install revisions of lazarus... i never installed one... just only the official lazarus release

Thanks Ask!
« Last Edit: August 29, 2011, 01:52:31 pm by madepabloh »

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: How to: clip tcharts?
« Reply #5 on: August 29, 2011, 04:50:42 pm »

wp

  • Hero Member
  • *****
  • Posts: 13631
Re: How to: clip tcharts?
« Reply #6 on: August 29, 2011, 06:18:20 pm »
Quote
I will first learn how to install revisions of lazarus... i never installed one... just only the official lazarus release

I bookmarked this page: ftp://ftp.hu.freepascal.org/pub/lazarus/snapshots/ from which I download the version that I need (usually the latest lazarus and the official fpc-2.4.4 for my platform, win32). The win versions at least contain an installer, and you don't have to care about anything, it's like using the official releases. Before installing, just delete or rename the old lazarus version on your hd.

madepabloh

  • Full Member
  • ***
  • Posts: 160
Re: How to: clip tcharts?
« Reply #7 on: August 29, 2011, 07:32:03 pm »
Thanks!!

I am becoming really crazy trying to install the svn! So i will delete everything and intall the last snapshot following the link of wp. In my case, this one:
Lazarus-0.9.30.1-32085-fpc-2.4.4-20110829-win32.exe

Thanks!!

Edited:

Oh! i will wait until to have a higher svn than 32089 what includes what i need. For the moment it is not available. Thanks!
« Last Edit: August 29, 2011, 07:33:59 pm by madepabloh »

madepabloh

  • Full Member
  • ***
  • Posts: 160
Re: How to: clip tcharts?
« Reply #8 on: August 30, 2011, 10:01:41 pm »
Hi Ask!

I installed some minutes ago the r32100 version and the new component work great!! Thanks so much for include this tool what is incredible interesting for my proyect!!!

I already saw that is able to clip the X, Y or both axis, what is exactly what i was looking for!

I also discovered some other components what for sure will be interesting for me.

Thanks for your help and you work!

Quote
Just only one more question: Is it possible to include an "enable" option? Just to allow to the user to decide to zoom in one of the plots to analyze (zooming) only this plot and not the other. To program it in a button is possible but with a lot of lines since i have six plots in my project. Thanks!
« Last Edit: August 30, 2011, 10:10:13 pm by madepabloh »

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: [SOLVED] How to: clip tcharts?
« Reply #9 on: August 31, 2011, 05:07:13 am »
"Enable" property added in r32128

JD

  • Hero Member
  • *****
  • Posts: 1913
Re: [SOLVED] How to: clip tcharts?
« Reply #10 on: August 31, 2011, 01:22:59 pm »
"Enable" property added in r32128

How do I install your updates without reinstalling Lazarus? Can I just copy the changed TAChart directory & overwrite the old TAChart directory in my installation?
« Last Edit: August 31, 2011, 01:28:34 pm by JD »
Linux Mint - Lazarus 4.6/FPC 3.2.2,
Windows - Lazarus 4.6/FPC 3.2.2

mORMot 2, PostgreSQL & MariaDB.

madepabloh

  • Full Member
  • ***
  • Posts: 160
Re: [SOLVED] How to: clip tcharts?
« Reply #11 on: August 31, 2011, 01:32:17 pm »
Thanks so much Ask... you are great!!

Thank you for your work!

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: [SOLVED] How to: clip tcharts?
« Reply #12 on: August 31, 2011, 02:46:54 pm »
How do I install your updates without reinstalling Lazarus? Can I just copy the changed TAChart directory & overwrite the old TAChart directory in my installation?

In general, refer to this: http://wiki.lazarus.freepascal.org/Getting_Lazarus

Sometimes you can indeed update only TAChart without the rest of Lazarus,
but it is in no way guaranteed.

madepabloh

  • Full Member
  • ***
  • Posts: 160
Re: [SOLVED] How to: clip tcharts?
« Reply #13 on: December 06, 2011, 11:29:55 pm »
After along time without to work in my project, i installed the last snapshot of Lazarus, but i had a problem when running the project, because it can´t locate TAChartExtentLink class...

I suppose that there was a modification.... any idea how could i solve the problem? Where could i locate now this tool?

Thanks!

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: [SOLVED] How to: clip tcharts?
« Reply #14 on: December 07, 2011, 04:35:15 am »
TAChartExtentLink is a unit, not a class. It is located in the TAChartExtentLink.pas file
inside of TAChart directory.

 

TinyPortal © 2005-2018