![]() | 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: | [TV52015700] The Clicked method doesn't seem to work fine with Bar series and 3D: ... | ||
|---|---|---|---|
| Product: | VCL TeeChart | Reporter: | yeray alonso <yeray> |
| Component: | Series | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | david, narcis |
| Priority: | High | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | |
| Attachments: | Project with non-orthogonal 3D chart showing the problem. | ||
Created attachment 116 [details]
Project with non-orthogonal 3D chart showing the problem.
Yes. 3D is not being considered. There is no "ClickedCube" function yet that can be used by Bar series in 3D. Fixed.
Implemented TCustomBarSeries.PointInCube valid for both Bar and HorizBar series.
The fix should also work fine in 3D Orthogonal mode.
Also added new TCanvas3D.CubeHull function that returns the polygon boundaries for a given rectangle and Z0,Z1.
In the attached example, this code will show the correct Series and ValueIndex:
var tmp : String;
tmp:=GetEnumName(TypeInfo(TChartClickedPartStyle), Integer(Part.Part));
if Assigned(Part.ASeries) then
tmp:=tmp+' '+SeriesTitleOrName(Part.ASeries)+' '+IntToStr(Part.PointIndex);
Memo1.Lines.Add(tmp);
|
The Clicked method doesn't seem to work fine with Bar series and 3D: It worked a litle bit better in v6 (see the attachments) Probably related to TV52014246. It happens in .NET too. procedure TForm1.FormCreate(Sender: TObject); var i, j: Integer; s: TBarSeries; begin Chart1.Align:=alClient; Chart1.View3DOptions.Orthogonal:=false; Chart1.DepthAxis.Automatic:=false; Chart1.DepthAxis.Maximum:=8; Chart1.DepthAxis.Minimum:=-0.5 ; Chart1.DepthAxis.Visible:=true; Chart1.DepthAxis.Increment:=100; Chart1.View3DOptions.Rotation:=350; Chart1.View3DOptions.Elevation:=355; Chart1.View3DOptions.Zoom:=85; for i:=1 to 9 do begin s:=TBarSeries.Create(Chart1); s.ParentChart:=Chart1; s.Title:='Y' + IntToStr(i-1); s.MultiBar:=mbNone; s.ZOrder:=(i * 4) - 1; for j:=0 to 3 do s.Add(1000-i*80); end; end; procedure TForm1.Chart1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); var SeriesIndex, ValueIndex: Integer; begin for SeriesIndex:=0 to Chart1.SeriesCount-1 do begin ValueIndex:=Chart1[SeriesIndex].Clicked(X,Y); if ValueIndex>-1 then Break; end; if ValueIndex>-1 then Chart1.Title.Text.Text:='Series: '+IntToStr(SeriesIndex)+', ValueIndex: '+IntToStr(ValueIndex) else Chart1.Title.Text.Text:='Background'; end; [created:2011-08-17T11:44:02.000+01:00 reported by:yeray@steema.com reported in version:2011.03.30407 (TeeChart VCL)]