![]() | 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: | OnClickSeries event in TChart with TBoxSeries is not always fired and sometimes with the wrong Series parameter | ||
|---|---|---|---|
| Product: | VCL TeeChart | Reporter: | Stefan Bieringer <stefan.bieringer> |
| Component: | Chart | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | RESOLVED INVALID | ||
| Severity: | normal | CC: | marc, sandra |
| Priority: | High | ||
| Version: | 32.210430 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | RAD 10.3 Rio |
The bug still exists in Build 2020.29.200113 with Delphi Rio 10.3.3 The Boxplot feature is coming up to be more and more important for the software product! Not reproducible with latest build: 2021.32.210430. The bug still exists in TeeChart Pro v2021.32.210430 with Delphi RAD Studio 10.4 Update 2. Click around on different box series and your will see that the label will not always show the correct series number. What I have done: Uninstall all previous versions of "Steema TeeChart Pro" Delete all directories under "C:\Program Files (x86)\Steema Software\" Delete all settings in the Delphi option page (library and source pathes, etc.) that are linked to previous version. Download the latest version "TeeChart Pro v2021.32.210430" Install the latest version. Open the project and do the test. Click the button to create some box series. Click in the colored area of different series and see what will be reported by the "Chart1ClickSeries" event to the label. The label will not show always the correct clicked series title. This issue continues to evade our tests. Please confirm that the Chart is setup 2D, ie. Chart1.View3D := False, as the BoxSeries is not well suited to 3D for click-response. > Chart1.View3D := False That's it! Thanks a lot for this "workaround" that helps so much for discussions to my customers and provide a "solution". > as the BoxSeries is not well suited to 3D for click-response. Would be cool to get fixed this anyway to give my customers the experience they like... |
Goal: Show the title of a series on a label when the user clicked on a box. IDE: Delphi XE3 The OnClickSeries event in the TChart component with TBoxSeries is not always fired and sometimes with the wrong "Series" parameter. When the following code is executed and we click on the boxes some different effects can be observed: - Label get the right title - Event is not triggered (please have a look to the time signature at the lable.caption) - Lebel get the wrong title - Same series get different result at different clicks Please click between different boxes. Code to reproduces Add a TChart, a Button and a Label on a VCL-Form without any property changes Fill two events with following code: // Create some boxplots and fill them with values procedure TForm1.Button1Click(Sender: TObject); var NewBoxSerie: TBoxSeries; i: Integer; w: Double; x: Integer; j: Integer; xSeriesCount: Integer; begin Chart1.SeriesList.Clear; Chart1.Legend.Items.Clear; xSeriesCount:=5; // Calculate the distance between the box plots w:=100 / (xSeriesCount + 1); for i := 0 to xSeriesCount - 1 do begin NewBoxSerie:=TBoxSeries.Create(Chart1); // Create some nice box plot values NewBoxSerie.AddX(1); NewBoxSerie.AddX(2); NewBoxSerie.AddX(10); NewBoxSerie.AddX(12); NewBoxSerie.AddX(13); NewBoxSerie.AddX(14); NewBoxSerie.AddX(15); NewBoxSerie.AddX(25); NewBoxSerie.AddX(26); NewBoxSerie.Title:=IntToStr(Chart1.SeriesCount); Chart1.AddSeries(NewBoxSerie); // Set the position of the box plot for better viewing NewBoxSerie.Position:=(w / 2) + (w * i); NewBoxSerie.Box.Color:=NewBoxSerie.Color; end; end; // Show the user the title of the clicked series procedure TForm1.Chart1ClickSeries(Sender: TCustomChart; Series: TChartSeries; ValueIndex: Integer; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin if Assigned(Series) then Label1.Caption:='Clicked on series ' + Series.Title + // Added the time stamp to see that the event is not always triggered ' at: ' + FormatDateTime('NN:SS', Now) else Label1.Caption:='Series not assigned'; end;