Recent

Author Topic: Stacked area problem  (Read 3855 times)

loopbreaker

  • New Member
  • *
  • Posts: 32
Stacked area problem
« on: April 11, 2015, 06:52:49 pm »
it looks like there is a problem in area series:
Always wrong stacking (not from same index) if chart is zoomed.
This can also be seen in multidemo after zooming.

I have an idea, could someone check this:
procedure drawSegment(AStart, AEnd: Integer);
replace "UpdateGraphPoints(j - 1, AStart, AEnd)"
with "UpdateGraphPoints(j - 1)"
The latter uses FLoBound, FUpBound

wp

  • Hero Member
  • *****
  • Posts: 11916
Re: Stacked area problem
« Reply #1 on: April 11, 2015, 07:17:37 pm »
Seems that the stacked chart in multidemo zooms correctly here (Laz trunk, fpc 2.6.4, Win). Please be more specific. Which version of Lazarus/fpc are you using, which operating system?

loopbreaker

  • New Member
  • *
  • Posts: 32
Re: Stacked area problem
« Reply #2 on: April 11, 2015, 07:33:40 pm »
Seems that the stacked chart in multidemo zooms correctly here (Laz trunk, fpc 2.6.4, Win). Please be more specific.

Hi, the effect is easier seen if percentage = true,
the sum should be always 100% in the correct case.
The bottom stack segment uses data range [FLoBound, FUpBound],
the upper segments use data range [AStart, AEnd], this is not compatible,
leads to wrong sums (totals) - a single sum uses different data indices,
but should use the same index.

wp

  • Hero Member
  • *****
  • Posts: 11916
Re: Stacked area problem
« Reply #3 on: April 11, 2015, 07:53:30 pm »
Ah, I see, thank you. Fixed in r48728 (will go into v1.4)

 

TinyPortal © 2005-2018