![]() | Steema Issues DatabaseNote: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;otherwise you can use StackOverflow. Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy. |
| Summary: | Access violation in editor when legend is hidden | ||
|---|---|---|---|
| Product: | VCL TeeChart | Reporter: | fabrice |
| Component: | Editors | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | david, yeray |
| Priority: | --- | ||
| Version: | 30.200525 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | RAD 10.3 Rio |
| Attachments: | Screenshot and bug report (by MadExcept) | ||
Copy of my TDBChart : object DBChart_NbCLick: TDBChart Left = 2 Top = 21 Width = 370 Height = 425 Border.Color = clNavy Border.Width = 6 Border.Visible = True BorderRound = 10 Gradient.EndColor = clGray Gradient.Visible = True MarginBottom = 3 MarginTop = 3 Title.Text.Strings = ( 'Nombre de clics par lien') OnClickSeries = DBChart_NbCLickClickSeries Chart3DPercent = 25 Legend.Alignment = laBottom Legend.Brush.Gradient.Direction = gdTopBottom Legend.Brush.Gradient.EndColor = clYellow Legend.Brush.Gradient.StartColor = clWhite Legend.Brush.Gradient.Visible = True Legend.CheckBoxesStyle = cbsRadio Legend.DrawBehind = True Legend.Font.Height = -9 Legend.PositionUnits = muPercent Legend.ResizeChart = False Legend.TopPos = 0 View3D = False View3DOptions.Elevation = 315 View3DOptions.Orthogonal = False View3DOptions.Perspective = 0 View3DOptions.Rotation = 360 Zoom.Animated = True Align = alLeft BevelOuter = bvNone PopupMenu = PopupGraphique TabOrder = 0 DefaultCanvas = 'TGDIPlusCanvas' ColorPaletteIndex = 2 object Series2: TPieSeries HoverElement = [] Marks.Style = smsPercent Marks.Tail.Margin = 2 DataSource = Q_STAT_NBClic XLabelsSource = 'TR_LIEN' XValues.Order = loAscending YValues.Name = 'Camembert' YValues.Order = loNone YValues.ValueSource = 'NOMBRE' Frame.InnerBrush.BackColor = clRed Frame.InnerBrush.Gradient.EndColor = clGray Frame.InnerBrush.Gradient.MidColor = clWhite Frame.InnerBrush.Gradient.StartColor = 4210752 Frame.InnerBrush.Gradient.Visible = True Frame.MiddleBrush.BackColor = clYellow Frame.MiddleBrush.Gradient.EndColor = 8553090 Frame.MiddleBrush.Gradient.MidColor = clWhite Frame.MiddleBrush.Gradient.StartColor = clGray Frame.MiddleBrush.Gradient.Visible = True Frame.OuterBrush.BackColor = clGreen Frame.OuterBrush.Gradient.EndColor = 4210752 Frame.OuterBrush.Gradient.MidColor = clWhite Frame.OuterBrush.Gradient.StartColor = clSilver Frame.OuterBrush.Gradient.Visible = True Frame.Width = 4 Shadow.HorizSize = 10 Shadow.VertSize = 10 ExplodeBiggest = 30 OtherSlice.Legend.Visible = False end end Access Violation reproduced with this code, opening the Columns tab in the Legend editor:
uses Series, EditChar;
procedure TForm1.Button1Click(Sender: TObject);
begin
EditChartLegend(Self, Chart1);
end;
procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
Chart1.View3D:=False;
Chart1.Width:=100;
Chart1.Legend.Alignment:=laBottom;
with Chart1.AddSeries(TLineSeries) do
begin
FillSampleValues;
for i:=0 to Count-1 do
Labels[i]:='This is a long string for the label ' + IntToStr(i);
end;
end;
Fixed in latest build. (Cannot reproduce) |
Created attachment 964 [details] Screenshot and bug report (by MadExcept) Possible access violation if you open an editor (run time) when legend is hidden because too large. Occurs when you go in column option of legend when legend is hidden because it's contain to large width to be displayed. Reproduce : 1) A chart with large legend visible 2) Reduce width of the chart until legend become hidden 3) Open Chart editor go in legend / columns. Column value (disabled) is equal to -1 => Access violation (see in attachment) Call stack : VCLTee.Chart CalcColumnsWidth VCLTee.Chart CalcFittingItems VCLTee.Chart MaxLegendColumns VCLTee.Chart TCustomChartLegend.CalcRect VCLTee.Chart TCustomChart.DrawTitlesAndLegend VCLTee.TeEngine TCustomAxisPanel.InternalDraw VCLTee.TeeProcs InnerDraw VCLTee.TeeProcs TCustomTeePanel.Draw VCLTee.TeeProcs TCustomTeePanel.Draw VCLTee.TeeProcs TCustomTeePanel.Paint Vcl.Controls TCustomControl.PaintWindow Vcl.Controls TWinControl.PaintHandler Vcl.Controls TWinControl.WMPaint Vcl.Controls TCustomControl.WMPaint Vcl.Controls TControl.WndProc Vcl.Controls TWinControl.WndProc VCLTee.TeeProcs TCustomTeePanel.WndProc