Create an instance of a NativeTextAnnotation
Optional parameters of type INativeTextAnnotationOptions which configure the annotation upon construction
A unique Id for the IAnnotation
Set true to make the font scale when the annotation is resized. Must set x2 as well. Cannot be used with wrapTo
Gets or sets current EDraggingGripPoint
Gets or sets current EDraggingGripPoint
The fill color for the adorner drag handle
The fill color for the adorner drag handle
The radius of the adorner drag handle
The radius of the adorner drag handle
The stroke color for the adorner drag handle
The stroke color for the adorner drag handle
Get the dragging points that should be enabled for this annotation
Set the dragging points that should be enabled for this annotation
Gets the fontSize for the NativeTextAnnotation
Sets the fontSize for the NativeTextAnnotation
Gets the fontSize for the NativeTextAnnotation
Sets the fontSize for the NativeTextAnnotation
Gets or sets horizontal anchor point
Gets or sets horizontal anchor point
Defines if the entity is hovered
Defines if the entity is hovered
The spacing between lines. Default 3 If a whole number then treated as pixels. If between 0 and 1 then treated as a fraction of line height
The spacing between lines. Default 3 If a whole number then treated as pixels. If between 0 and 1 then treated as a fraction of line height
Gets or sets the horizontal alignment mode for multiline text
Gets or sets the horizontal alignment mode for multiline text
Sets an opacity override for the entire annotation, from 0..1
Sets an opacity override for the entire annotation, from 0..1
Gets the rotation for the NativeTextAnnotation
Sets the labelPlacement for the NativeTextAnnotation
The scale factor for the font. Default 1 This changes the size of the text without needing to create a new font with a different size
The scale factor for the font. Default 1 This changes the size of the text without needing to create a new font with a different size
How much bigger the selection box is than the bounding box of the annotation, in pixels
How much bigger the selection box is than the bounding box of the annotation, in pixels
The stroke color for the adorner selection box
The stroke color for the adorner selection box
The thickness of the selection box line
The thickness of the selection box line
Gets the text for the NativeTextAnnotation
Sets the text for the NativeTextAnnotation
Gets the color for the NativeTextAnnotation
Sets the color for the NativeTextAnnotation
Gets or sets vertical anchor point
Gets or sets vertical anchor point
Gets or sets the text wrapping mode. A pure number will be treated as a pixel width. Default is undefined meaning no wrap
Gets or sets the text wrapping mode. A pure number will be treated as a pixel width. Default is undefined meaning no wrap
The X-Coordinate mode. See ECoordinateMode for a list of values
The X-Coordinate mode. See ECoordinateMode for a list of values
The Y-Coordinate mode. See ECoordinateMode for a list of values
The Y-Coordinate mode. See ECoordinateMode for a list of values
Override this to disable drag behaviour for certain dragging points
Calculates if the annotation is hovered with the specified args
Called internally. Send a click to the annotation if the point is in bounds, raising the clicked event and optionally selecting the annotation.
Called internally. Select the annotation if the point is in bounds. Does not raise the clicked event
Converts an absolute coordinate to a value which could be in form of DataValue, Pixel, or Relative coordinate
an absolute coordinate to convert
the CoordinateCalculatorBase which will do the transformation
the expected ECoordinateMode of the converted point
the data-value, pixel, or relative value accordingly to the coordinateMode
Deletes native (WebAssembly) memory used by this type, after which it cannot be used.
Calculates coordinates in pixels of the specified Point. Uses the xCoordinateMode (or yCoordinateMode for vertical chart)
Calculates coordinates in pixels of the specified Point. Uses the xCoordinateMode (or yCoordinateMode for vertical chart)
Calculates coordinate in pixels of the specified value in the vertical dimension. Uses the yCoordinateMode (or xCoordinateMode for vertical chart)
Returns annotation borders for the AdornerLayer which has the size of the whole canvas
flag to return x and y values in ascending order
Returns annotationBorders
flag to return x and y values in ascending order, where x1 <= x2 and y1 <= y2
Get svg for the adorner grip handles for standard annotations
the value to convert
the CoordinateCalculatorBase which will do the transformation
the ECoordinateMode to apply
the pixel coordinate
Calculate the center point for a rotation
Converts a pixel coordinate back to a value
coordinate or dataValue to convert
the CoordinateCalculatorBase which will do the transformation
the ECoordinateMode to apply
the data-value or value
Transforms an absolute coordinates point to the corresponding value point. The value point has x and y converted accordingly to the the coordinate modes xCoordinateMode and yCoordinateMode
defines if the coordinates should be projected from the Canvas to SeriesViewRect
a point with coordinates ECoordinateMode
Returns the pixel X1 coordinate
the X CoordinateCalculatorBase which will do the transformation
the Y CoordinateCalculatorBase which will do the transformation
the pixel X1 coordinate
Returns the pixel X2 coordinate
the X CoordinateCalculatorBase which will do the transformation
the Y CoordinateCalculatorBase which will do the transformation
the pixel X2 coordinate
Returns the pixel Y1 coordinate
the X CoordinateCalculatorBase which will do the transformation
the Y CoordinateCalculatorBase which will do the transformation
the pixel Y1 coordinate
Returns the pixel Y2 coordinate
the X CoordinateCalculatorBase which will do the transformation
the Y CoordinateCalculatorBase which will do the transformation
the pixel Y2 coordinate
Sends hover/leave action to the annotation
The name of the property which has changed
Internal use. If isHidden,x1,y1 have change since suspendInvalidate was called, call invalidateParent
Sets annotationBorders For renderContext annotations it is scaled and for SVG annotations it is not For example if we have a macbook with retina display and canvas.width = 1600px, canvas.height = 1200px, canvas.style.width = 800px, canvas.style.height = 600px If we have BoxAnnotation (renderContext) which takes 50% width and height, located in the left-top corner it should have annotationBorders as follows x1 = 0, x2 = 800, y1 = 0, y2 = 600 But if we have CustomAnnotation (SVG) which takes 50% width and height, located in the left-top corner it should have annotationBorders as follows x1 = 0, x2 = 400, y1 = 0, y2 = 300
Internal use. Captures the state of isHidden,x1,y1 and prevents invalidateParent being called on change to these properties
the annotation absolute coordinates
Generated using TypeDoc
The NativeTextAnnotation provides an Annotation which draws a text at specific x1 y1 over the SciChartSurface
To add a NativeTextAnnotation to a SciChartSurface, use the following code:
const sciChartSurface: SciChartSurface; const textAnnotation = new NativeTextAnnotation( { x1: 1, y1: 3, color: "#FF000077", text: "Hello SciChart"}); sciChartSurface.annotations.add(textAnnotation);
Uses the fast WebGL/WebAssembly {@link WebGL2RenderingContext} for rendering