Merged revision(s) 54023 #aad2a41b76, 54034 #f51dd9a202 from trunk:

TAChart: Fix expected behavior of Axis.Marks.AtDataOnly if series does not set its AxisIndexes (http://forum.lazarus.freepascal.org/index.php/topic,35606.0.html)
........
TAChart: Fix drawing of bracket pointer symbols.
........

git-svn-id: branches/fixes_1_6@54176 -
This commit is contained in:
maxim 2017-02-16 22:18:18 +00:00
parent 1938069c3a
commit 626fcbf5b1
2 changed files with 15 additions and 11 deletions

View File

@ -586,6 +586,9 @@ begin
// FIXME: Intersect axisMin/Max with the union of series extents.
// wp: - I think this is fixed in what follows...
GetChart.Notify(CMD_QUERY_SERIESEXTENT, self, nil, rng{%H-});
// Safe-guard against series having no AxisIndexX/AxisIndexY
if IsInfinite(rng.FStart) then rng.FStart := axisMin;
if IsInfinite(-rng.FEnd) then rng.FEnd := axisMax;
UpdateBounds(rng.FStart, rng.FEnd);
d.FMin := rng.FStart;
d.FMax := rng.FEnd;

View File

@ -407,11 +407,13 @@ procedure TSeriesPointer.DrawSize(ADrawer: IChartDrawer;
pts: array of TPoint;
i: Integer;
j: Integer = 0;
notClosed: Boolean;
begin
notClosed := (AStr[1] <> AStr[Length(AStr) - 1]);
SetLength(pts, Length(AStr));
for i := 1 to Length(AStr) do begin
if AStr[i] = ' ' then begin
if Brush.Style = bsClear then
if (Brush.Style = bsClear) or notClosed then
ADrawer.Polyline(pts, 0, j)
else
ADrawer.Polygon(pts, 0, j); // Winding?
@ -431,7 +433,7 @@ const
// psTriangle, psLeftTriangle, psRightTriangle, psVertBar, psHorBar, psPoint
'', '17931', '', '28 46', '19 73', '28 46 19 73',
'41236', '47896', '87412', '89632', '84268',
'183', '842', '862', '82', '46', '');
'1831', '8428', '8628', '82', '46', '');
begin
ADrawer.Brush := Brush;
if (ocBrush in OverrideColor) and (AColor <> clTAColor) then
@ -440,15 +442,14 @@ begin
if (ocPen in OverrideColor) and (AColor <> clTAColor) then
ADrawer.SetPenParams(Pen.Style, AColor);
if Style = psPoint then
ADrawer.PutPixel(ACenter.X, ACenter.Y, Pen.Color)
else
if Style = psCircle then
ADrawer.Ellipse(
ACenter.X - ASize.X, ACenter.Y - ASize.Y,
ACenter.X + ASize.X + 1, ACenter.Y + ASize.Y + 1)
else
DrawByString(DRAW_STRINGS[Style] + ' ');
case Style of
psNone : ;
psPoint : ADrawer.PutPixel(ACenter.X, ACenter.Y, Pen.Color);
psCircle: ADrawer.Ellipse(
ACenter.X - ASize.X, ACenter.Y - ASize.Y,
ACenter.X + ASize.X + 1, ACenter.Y + ASize.Y + 1)
else DrawByString(DRAW_STRINGS[Style] + ' ');
end;
end;
procedure TSeriesPointer.SetBrush(AValue: TBrush);