Recent

Author Topic: TAChart axis scale question  (Read 12864 times)

dkjMusic

  • Full Member
  • ***
  • Posts: 146
TAChart axis scale question
« on: January 22, 2011, 04:59:36 pm »
I plot three values on a TAChart. The X,Y values are (1, -852280000),(2, -850980000), and (3, -176500000). The resulting graph shows a Y-axis ranging from -1.5 down to -8.5 with no indication of scaling, as shown in the attachment.

What do I need to do to have the Y-axis show the correct magnitudes?
Windows 7 Ultimate/32 bit;
Lazarus 0.9.31/Rev 33300;
FPC 2.7.1/Rev 19464;
GDB 7.0.50;
(via CodeTyphon 2.30)

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: TAChart axis scale question
« Reply #1 on: January 23, 2011, 12:37:17 am »
Can you post a small test project demonstrating the problem?

dkjMusic

  • Full Member
  • ***
  • Posts: 146
Re: TAChart axis scale question
« Reply #2 on: January 23, 2011, 01:43:52 pm »
Can you post a small test project demonstrating the problem?
I have attached such a project. No changes were made to TAChart's default properties. The project exhibits the behaviour described above.
Windows 7 Ultimate/32 bit;
Lazarus 0.9.31/Rev 33300;
FPC 2.7.1/Rev 19464;
GDB 7.0.50;
(via CodeTyphon 2.30)

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: TAChart axis scale question
« Reply #3 on: January 24, 2011, 01:37:15 am »
I re-created a project based on the part you have posted.
The behaviour does not reproduce for me on Windows.

Are you sure you use the latest snapshot?
If yes, then maybe it is a GTK-specific bug, although I highly doubt it.

Please see the attached demo project and screenshot.

dkjMusic

  • Full Member
  • ***
  • Posts: 146
Re: TAChart axis scale question
« Reply #4 on: January 24, 2011, 02:30:54 am »
Are you sure you use the latest snapshot?
I really appreciate your helping with this.

I'm using from TAGraph1-4.zip from http://www.martinole.org/TAChart.html (I think).

Where do I get the latest snapshot of TAChart?
« Last Edit: January 24, 2011, 02:36:34 am by dkjMusic »
Windows 7 Ultimate/32 bit;
Lazarus 0.9.31/Rev 33300;
FPC 2.7.1/Rev 19464;
GDB 7.0.50;
(via CodeTyphon 2.30)

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: TAChart axis scale question
« Reply #5 on: January 24, 2011, 03:27:55 am »
That is the reason I asked for a complete test project,
not just one file from it -- it would be obvious from the project info file
that you are not using built-in TAChart package.

Where do I get the latest snapshot of TAChart?

From you signature I assumed that you already have it.
If not, use "Daily snapshots" link on the left panel of this forum.
There, you can access TAChart components from the "Chart" page
of the component palette.

dkjMusic

  • Full Member
  • ***
  • Posts: 146
Re: TAChart axis scale question
« Reply #6 on: January 24, 2011, 03:47:33 am »
When I said "I'm using from TAGraph1-4.zip from http://www.martinole.org/TAChart.html (I think).", I was wrong. I am using the TAChart package that came with the Lazarus 0.9.31 source, which is only five days older than the current daily snapshot.

So it sounds like I have to live with the incorrect magnitudes.

Can you suggest a way that I can examine the Y-axis values produced by TAChart and adjust the label for that axis to reflect the "scaling" that has occurred? For example, if -852280000 shows as -852, then my Y-axis label would read "(*10^6)".
Windows 7 Ultimate/32 bit;
Lazarus 0.9.31/Rev 33300;
FPC 2.7.1/Rev 19464;
GDB 7.0.50;
(via CodeTyphon 2.30)

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: TAChart axis scale question
« Reply #7 on: January 24, 2011, 03:54:14 am »
When I said "I'm using from TAGraph1-4.zip from http://www.martinole.org/TAChart.html (I think).", I was wrong. I am using the TAChart package that came with the Lazarus 0.9.31 source, which is only five days older than the current daily snapshot.
Ok, then can you open the project I have posted and see if the problem exists?
If yes, then there is a problem in TAChart.
If not, the problem is probably in the lfm file which you did not post.

So it sounds like I have to live with the incorrect magnitudes.

Can you suggest a way that I can examine the Y-axis values produced by TAChart and adjust the label for that axis to reflect the "scaling" that has occurred? For example, if -852280000 shows as -852, then my Y-axis label would read "(*10^6)".
I would prefer to find the problem and fix it.
Note, however, that you can directly set the formatting of axis labels by
modifying Marks.Format property.

dkjMusic

  • Full Member
  • ***
  • Posts: 146
Re: TAChart axis scale question
« Reply #8 on: January 24, 2011, 04:36:33 am »
I ran the test project you posted and the problem is still there.  :(
Windows 7 Ultimate/32 bit;
Lazarus 0.9.31/Rev 33300;
FPC 2.7.1/Rev 19464;
GDB 7.0.50;
(via CodeTyphon 2.30)

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: TAChart axis scale question
« Reply #9 on: January 24, 2011, 07:44:40 am »
Too bad. So it is probably a GTK-specific bug.
Please create a bug report so it will not be forgotten.
Meanwhile, you can use OnMarkToText event to examine/modify the label text.

 

TinyPortal © 2005-2018