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 1844 - CalcClickedPart throws exception
Summary: CalcClickedPart throws exception
Status: RESOLVED WORKSFORME
Alias: None
Product: .NET TeeChart
Classification: Unclassified
Component: Chart (show other bugs)
Version: TeeChart for .Net 4.1.2016.05125
Hardware: PC Windows
: High major
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-18 06:12 EDT by Sunil Ramesh
Modified: 2017-05-29 11:15 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 Sunil Ramesh 2017-04-18 06:12:47 EDT
Steps to reproduce:
1. Add series to data chart of type Line
2. Enable free rotate.
4. Rotate the data chart to the maximum angle allowed.
5. Call Chart.CalcClickedPart(location) will throw the below error

Exception: Negating the minimum value of a twos complement number is invalid.

mscorlib
at System.Math.AbsHelper(Int32 value)
at Steema.TeeChart.Styles.CustomPoint.ClickedPointer(Int32 valueIndex, Int32 tmpX, Int32 tmpY, Int32 x, Int32 y)
at Steema.TeeChart.Styles.CustomPoint.Clicked(Int32 x, Int32 y)
at Steema.TeeChart.Styles.Custom.Clicked(Int32 x, Int32 y)
at Steema.TeeChart.Styles.Series.Clicked(Point p)
at Steema.TeeChart.Chart.CalcNeedClickedPart(Point Pos, Boolean Needed)
at Steema.TeeChart.Chart.CalcClickedPart(Point Pos)
at DataGenic.Gdm.Extensibility.SeriesDataChart.DataChart_MouseMove(Object sender, MouseEventArgs e)
at System.Windows.Forms.Control.OnMouseMove(MouseEventArgs e)
at Steema.TeeChart.TChart.OnMouseMove(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseMove(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Comment 1 christopher ireland 2017-05-29 11:15:30 EDT
Cannot reproduce in the head revision using the following code:

    private void InitializeChart()
    {
      Line series = new Line(tChart1.Chart);
      series.FillSampleValues();
      tChart1.Tools.Add(typeof(Rotate));

      tChart1.MouseDown += TChart1_MouseDown;
    }

    private void TChart1_MouseDown(object sender, MouseEventArgs e)
    {
      ChartClickedPart part = tChart1.Chart.CalcClickedPart(e.Location);
      tChart1.Header.Text = part.Part.ToString();
    }