Recent

Author Topic: TAChart: BarSeries and ZeroLevel  (Read 8222 times)

wp

  • Hero Member
  • *****
  • Posts: 11855
TAChart: BarSeries and ZeroLevel
« on: August 27, 2011, 02:36:59 pm »
When changing the zerolevel of a bar series, it seems to be that the zero level is substracted from the data values. For examples, if the bar y values are 20, 30, 40, and the zero level is 10, the bars are drawn from 0 to 10, 20 and 30, respectively, instead of from 10 to 20, 30 and 40, respectively. Is this a misunderstanding on my side, or is it a bug?

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: TAChart: BarSeries and ZeroLevel
« Reply #1 on: August 27, 2011, 05:18:31 pm »
Yes, it is a bug introduced by a recent refactoring.
TAChart's test suite needs a lot of work...

Should be fixed in r32070

BTW, since you seems to be able to read German, can you please
look at http://www.lazarusforum.de/viewtopic.php?f=18&t=5274?

I can not understand what the poster wants, and Google translation
does not help much ;-)

wp

  • Hero Member
  • *****
  • Posts: 11855
Re: TAChart: BarSeries and ZeroLevel
« Reply #2 on: August 27, 2011, 06:05:09 pm »
Thank you for the fix.

Quote
can you please look at http://www.lazarusforum.de/viewtopic.php?f=18&t=5274?
To be honest, I don't understand what he wants to do. What's more important is the second posting stating that the issue is gone since switching to r32006.

wp

  • Hero Member
  • *****
  • Posts: 11855
Re: TAChart: BarSeries and ZeroLevel
« Reply #3 on: August 27, 2011, 08:26:28 pm »
Quote
can you please look at http://www.lazarusforum.de/viewtopic.php?f=18&t=5274?
After logging into this forum the issue became clearer to me. The poster wanted to paint several charts to a common png bitmap using the PaintOnCanvas method, but the entire chart was black except for the series and the legend (see the code in the posting). But as already mentioned above, the error was gone when using a new svn version.

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: TAChart: BarSeries and ZeroLevel
« Reply #4 on: August 28, 2011, 01:47:23 am »
Ok, thanks.

snoewchen

  • Newbie
  • Posts: 3
Re: TAChart: BarSeries and ZeroLevel
« Reply #5 on: March 03, 2017, 11:42:49 am »
It seems that this bug (issue 20096 (http://bugs.freepascal.org/view.php?id=20096)) surfaced again.

I created a minimalistic Application to demonstrate the behaviour and also some screen-shots to show the difference (expected and observed outcome).

As far as I can tell, the svn-version 53904 (2017-01-09 12:57:36) is the last version that works as expected, starting with the next version (53905 - 2017-01-09 13:35:09) the zero-level-bug surfaces again.

According to the wiki (http://wiki.freepascal.org/How_do_I_create_a_bug_report) a bug should be rather reopened than reported as new - but how do I reopen this bug?


wp

  • Hero Member
  • *****
  • Posts: 11855
Re: TAChart: BarSeries and ZeroLevel
« Reply #6 on: March 03, 2017, 12:16:28 pm »
I created a minimalistic Application to demonstrate the behaviour and also some screen-shots to show the difference (expected and observed outcome).
[...]
According to the wiki (http://wiki.freepascal.org/How_do_I_create_a_bug_report) a bug should be rather reopened than reported as new - but how do I reopen this bug?

Could you post the demo application showing the issue? (Just pas, lfm, lpi, and lpr files, packed into a shared zip)

It is ok for me if the bug is reported here. To reopen a bug there's a Reopen button in the bug tracker. But I am not sure, maybe this button is available only to the original reporter.

snoewchen

  • Newbie
  • Posts: 3
Re: TAChart: BarSeries and ZeroLevel
« Reply #7 on: March 03, 2017, 12:54:26 pm »
Also included in the zip file is the res-file (without the res-file I get an error when I try to run the application from within lazarus (I am working on linux)).

I tried to set most properties in the object inspector (the range of the left axis is already set to "Max = 600" and ("UseMax = true").

If you click the check box, the "ZeroLevel" of the TBarSeries is set to "100" (the graph uses a random data source).

After you clicked the check-box:

  - svn-version 53904: the bars have the expected height
  - svn-version 53905: the bars are too high

(I guess I don't have the necessary permissions to reopen a bug - or - I am blind (also a possibility))

wp

  • Hero Member
  • *****
  • Posts: 11855
Re: TAChart: BarSeries and ZeroLevel
« Reply #8 on: March 03, 2017, 01:10:15 pm »
Should be fixed in r54335. Please test and report back.

I was refactoring the Draw method of the bar series (and others) because the old implementation did not respect axis transformations, and forgot about this "little" detail...

Are you a registered user of the bug tracker, and are you logged in? You must be logged in in order to be able to make any changes.

snoewchen

  • Newbie
  • Posts: 3
Re: TAChart: BarSeries and ZeroLevel
« Reply #9 on: March 03, 2017, 03:04:55 pm »
wp - thank you very much! That was fast! Works perfectly now.

And yes - I am a (newly) registered user of the bug tracking system - my access level at the moment is "reporter" - I guess that role does not have sufficient privileges to reopen an existing bug. (I guess the function should appear in the row "Main | My View | View Issues | Report Issue | ..." - or maybe a button at "Resolution = fixed"). Anyways, no need to reopen the bug. Thank you again.
« Last Edit: March 03, 2017, 03:12:07 pm by snoewchen »

 

TinyPortal © 2005-2018