Source code change to procedure DrawLegendItem in Chart.pas
Posted: Tue Nov 06, 2007 7:07 pm
I found what I believe to be a bug in Chart.pas that affects the drawing of legend items when the legend is positioned at the top or bottom.
Change from:
if Vertical then
tmpSt:=Items[ItemOrder,t]
else
tmpSt:=Items[ItemOrder+(ITotalItems-ILastValue-1),t]; // v8 fix
Change to:
tmpSt:=Items[ItemOrder,t];
Because of the way that Items is populated, the same code should be used, regardless of the value of Vertical. The original code improperly displays the legend items, and can raise an exception when the FirstValue property is set.
Regards,
Bill
Change from:
if Vertical then
tmpSt:=Items[ItemOrder,t]
else
tmpSt:=Items[ItemOrder+(ITotalItems-ILastValue-1),t]; // v8 fix
Change to:
tmpSt:=Items[ItemOrder,t];
Because of the way that Items is populated, the same code should be used, regardless of the value of Vertical. The original code improperly displays the legend items, and can raise an exception when the FirstValue property is set.
Regards,
Bill