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 917 - Marks' Clicked should have higher priority than Series' Clicked
Summary: Marks' Clicked should have higher priority than Series' Clicked
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Chart (show other bugs)
Version: 140512
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-12 09:17 EDT by yeray alonso
Modified: 2014-09-12 09:22 EDT (History)
0 users

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:17:20 EDT
If you have the Marks over the series (as with a TPieSeries) and you use Series Clicked event with CalcClickedPart function to know what part of the chart was clicked, when you click on a Mark you still get the Series as the clicked object:

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 yeray alonso 2014-09-12 09:22:52 EDT
Changed TCustomChart.CalcNeedClickedPart at Chart.pas to check the Marks before the Series.