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 821 - Allow CursorTool initialization to a defined X/Y value
Summary: Allow CursorTool initialization to a defined X/Y value
Status: CONFIRMED
Alias: None
Product: HTML5 JavaScript TeeChart
Classification: Unclassified
Component: Tools (show other bugs)
Version: unspecified
Hardware: PC Windows
: Highest enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL: http://www.teechart.net/support/viewt...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-30 06:50 EDT by yeray alonso
Modified: 2014-06-30 06:52 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-06-30 06:50:19 EDT
At the dodraw funtion in Tee.CursorTool the initial position is initialized as follows:

  this.calcRect();

  if (!old)
    old=new Point(r.x+0.5*r.width, r.y+0.5*r.height);

Since both r and old are local variables, the user can't set them out of the class.
Comment 1 yeray alonso 2014-06-30 06:52:21 EDT
Fix suggestion:

We could add a property to "force" the cursor to be drawn at a given position. Adding this next to the code above at the dodraw funtion in Tee.CursorTool:

  this.calcRect();

  if (!old)
    old=new Point(r.x+0.5*r.width, r.y+0.5*r.height);

  if (this.force)
    old=this.force;

So the customer will be able to do something like this:

  Chart1.draw();
  cursor.start=new Point(Chart1.axes.bottom.calc(1), null);