In latest version, CandleWidth and AutoSize stop working after I mouse drag an area to zoom in.
These properties are working fine in older version. Please help, thanks.
to reproduce:
1. Run the code below and do some form resize, the candle width will change respectively.
2. Do a mouse zoom-in, and resize the form again, you can see the candle width stop responding.
Code: Select all
type
TForm6 = class(TForm)
Chart1: TChart;
Series2: TCandleSeries;
procedure FormCreate(Sender: TObject);
procedure Chart1Zoom(Sender: TObject);
procedure Chart1Resize(Sender: TObject);
private
const
SAMPLE_COUNT = 10;
public
{ Public declarations }
end;
var
Form6: TForm6;
implementation
{$R *.dfm}
procedure TForm6.Chart1Resize(Sender: TObject);
begin
Series2.CandleWidth := (Chart1.Width - 250) div SAMPLE_COUNT;
end;
procedure TForm6.Chart1Zoom(Sender: TObject);
begin
Chart1Resize(Chart1);
end;
procedure TForm6.FormCreate(Sender: TObject);
begin
Series2.AutoSize := False;
Series2.FillSampleValues(SAMPLE_COUNT);
end;