TeeChart 2013 and Legend Symbol Size
Posted: Tue Feb 18, 2014 4:53 am
With TeeChart 8, the symbol size in the legend of line graphs matched the symbol size used in the graph, up to a maximum 5x5 symbol. See the attached images tagged with TeeChart8. With TeeChart 2013, however, the symbol size is always at one large size and very wide, especially for our multiple graphs (see images tagged with TeeChart2013). I tracked the cause of the problem down to a change in the parameters for the Pointer.DrawPointer command in TeePointerDrawLegend in series.pas.
When I replaced this with the parameters fromTeeChart8, the legend symbol is now drawn correctly. Will Steema restore the DrawPointer parameters to those in TeeChart 8, or do I have to write some overloaded procedure in my code to obtain the output I require. If the latter, can you please indicate where I would need to introduce the overloaded procedure as the TeePointerDrawLegend is deep within the TeeChart code.
When I replaced this with the parameters fromTeeChart8, the legend symbol is now drawn correctly. Will Steema restore the DrawPointer parameters to those in TeeChart 8, or do I have to write some overloaded procedure in my code to obtain the output I require. If the latter, can you please indicate where I would need to introduce the overloaded procedure as the TeePointerDrawLegend is deep within the TeeChart code.
Code: Select all
Procedure TeePointerDrawLegend(const Pointer:TSeriesPointer; AColor:TColor;
Const Rect:TRect; DrawPen:Boolean;
AStyle:TSeriesPointerStyle);
var tmpHoriz : Integer;
tmpVert : Integer;
tmpPenW : Integer;
tmpX : Integer;
tmpY : Integer;
tmp : Integer;
begin
if Assigned(Pointer.ParentChart) then
begin
// code
// replaced this expression in TeeChart2013 version
{ Pointer.DrawPointer(Pointer.ParentChart.Canvas,
False,
tmpX,
tmpY,
tmpHoriz, //Math.Min(Pointer.HorizSize,tmpHoriz),
tmpVert, //Math.Min(Pointer.VertSize,tmpVert),
AColor,AStyle);}
// with this one from TeeChart 8
Pointer.DrawPointer(Pointer.ParentChart.Canvas,
False,
tmpX,
tmpY,
Math.Min(Pointer.HorizSize,tmpHoriz),
Math.Min(Pointer.VertSize,tmpVert),
AColor,AStyle);
end;
end;
end;