Steema Issues Database

Note: 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.



Bug 916 - Clicked function should return -1 when clicking on the TDonutSeries' hole
Summary: Clicked function should return -1 when clicking on the TDonutSeries' hole
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Series (show other bugs)
Version: 140512
Hardware: PC Windows
: Low enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-12 09:04 EDT by yeray alonso
Modified: 2014-09-12 11:27 EDT (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yeray alonso 2014-09-12 09:04:32 EDT
The TDonutSeries' Clicked function treats the hole as if it wouldn't exist, as if it was a TPieSeries:

procedure TForm1.Chart1Click(Sender: TObject);
var
  curPoint: TPoint;
  clickedPart: TChartClickedPart;
  aSeries: TChartSeries;
  tmpString: string;
begin
  curPoint := Chart1.GetCursorPos;
  TCustomChart(Chart1).CalcClickedPart(curPoint, clickedPart);
  aSeries := clickedPart.aSeries;
  tmpString := '';
  case clickedPart.Part of
   cpSeries: tmpString := Format('Series %d, Point %d was clicked.',[aSeries.SeriesIndex, clickedPart.PointIndex]);
   cpSeriesMarks: tmpString := Format('Mark %d of series %d was clicked.',
     [clickedPart.PointIndex, aSeries.SeriesIndex]);
  end;
  caption := tmpString;
end;
Comment 1 david berneda 2014-09-12 11:27:09 EDT
Fixed. Each slice Donut path including hole, is now considered when calculating Clicked.