-
<static> ChartPoint.convert(point, behavior, projection)
-
Converts XY point into ChartPoint.
Parameters:
Returns:
-
Type
-
StockChartX.ChartPoint
Example
var point = {
x: 10,
y: 20
};
var behavior = {
x: StockChartX.XPointBehavior.RECORD,
y: StockChartX.YPointBehavior.VALUE
};
var chartPoint = StockChartX.ChartPoint.convert(point, behavior, projection);
-
clear()
-
Clears point's values.
-
getX(projection)
-
Returns point's X coordinate using a given projection.
Parameters:
- See:
-
Returns:
The X coordinate.
-
Type
-
Number
Example
var x = point.getX(projection);
-
getY(projection)
-
Returns point's Y coordinate using a given projection.
Parameters:
- See:
-
Returns:
The Y coordinate.
-
Type
-
Number
Example
var y = point.getY(projection);
-
moveTo(x, y, projection)
-
Moves chart point to a given point.
Parameters:
Name |
Type |
Description |
x |
Number
|
The X coordinate. |
y |
Number
|
The Y coordinate. |
projection |
StockChartX.Projection
|
The projection. |
- See:
-
Returns:
Returns self.
-
Type
-
StockChartX.ChartPoint
Example
point.moveTo(10, 20, projection);
-
moveToPoint(point, projection)
-
Moves chart point to a given point.
Parameters:
Returns:
Returns self.
-
Type
-
StockChartX.ChartPoint
Example
point.moveToPoint({x: 10, y: 20}, projection);
-
moveToX(x, projection)
-
Moves chart point to a point with a given X coordinate.
Parameters:
Returns:
Returns self.
-
Type
-
StockChartX.ChartPoint
Example
point.moveToX(10, projection);
-
moveToY(y, projection)
-
Moves chart point to a point with a given Y coordinate.
Parameters:
Returns:
Returns self.
-
Type
-
StockChartX.ChartPoint
Example
point.moveToY(20, projection);
-
toPoint(projection)
-
Converts chart point to cartesian point.
Parameters:
Returns:
The cartesian point.
-
Type
-
StockChartX.Point
Example
var p = point.toPoint(projection);
console.log("x: " + p.x + ", y: " + p.y);
-
translate(dx, dy, projection)
-
Translates chart point onto a given X, Y offsets.
Parameters:
Name |
Type |
Description |
dx |
Number
|
The X offset. |
dy |
Number
|
The Y offset. |
projection |
StockChartX.Projection
|
The projection. |
- See:
-
Returns:
Returns self.
-
Type
-
StockChartX.ChartPoint
Example
point.translate(10, 20, projection);