@NonNull @Override public IAnnotation createAnnotation(@NonNull ISciChartSurface parentSurface, int annotationType) { return sciChartBuilder.newTextAnnotation().withText("!!! Your text here !!!").build(); } });
.withX1(5.0) .withY1(55.0) .withText("Hello World!") .withHorizontalAnchorPoint(HorizontalAnchorPoint.Center) .withVerticalAnchorPoint(VerticalAnchorPoint.Center)
.withY1(0) .withFontStyle(24, ColorUtil.White) .withText("Annotations are Easy!") .build(), sciChartBuilder.newHorizontalLineAnnotation()
.withX1(5.0) .withY1(55.0) .withText("Hello World!") .withHorizontalAnchorPoint(HorizontalAnchorPoint.Center) .withVerticalAnchorPoint(VerticalAnchorPoint.Center)
.withX1(5.0) .withY1(55.0) .withText("Hello World!") .withHorizontalAnchorPoint(HorizontalAnchorPoint.Center) .withVerticalAnchorPoint(VerticalAnchorPoint.Center)
sciChartBuilder.newTextAnnotation() .withIsEditable(true) .withText("Buy!") .withX1(10) .withY1(30.5d) .withBackgroundDrawableId(R.drawable.example_text_annotation_background) .withIsEditable(true) .withText("Sell!") .withX1(50) .withY1(34d) .withX1(80d).withY1(37d) .withIsEditable(true) .withText("Rotated text") .withFontStyle(20, ColorUtil.White) .withRotationAngle(30) .withCoordinateMode(AnnotationCoordinateMode.Relative) .withHorizontalAnchorPoint(HorizontalAnchorPoint.Center) .withText("EUR.USD") .withFontStyle(Typeface.DEFAULT_BOLD, 72, 0x77FFFFFF) .withX1(0.5d)
.withHorizontalAnchorPoint(HorizontalAnchorPoint.Center) .withVerticalAnchorPoint(VerticalAnchorPoint.Center) .withText("Create \n Watermarks") .withTextGravity(Gravity.CENTER) .build(), .withY1(9.7) .withFontStyle(24, ColorUtil.White) .withText("Annotations are Easy!") .build(), sciChartBuilder.newTextAnnotation() .withX1(1.0) .withY1(9.0) .withText("You can create text") .withFontStyle(10, ColorUtil.White) .build(), .withHorizontalAnchorPoint(HorizontalAnchorPoint.Center) .withVerticalAnchorPoint(VerticalAnchorPoint.Bottom) .withText("Anchor Center (X1, Y1)") .build(), sciChartBuilder.newTextAnnotation() .withHorizontalAnchorPoint(HorizontalAnchorPoint.Right) .withVerticalAnchorPoint(VerticalAnchorPoint.Top) .withText("Anchor Right") .build(), sciChartBuilder.newTextAnnotation()
.withX1(5.0) .withY1(55.0) .withText("Hello World!") .withHorizontalAnchorPoint(HorizontalAnchorPoint.Center) .withVerticalAnchorPoint(VerticalAnchorPoint.Center)
.withX1(5.0) .withY1(55.0) .withText("Hello World!") .withHorizontalAnchorPoint(HorizontalAnchorPoint.Center) .withVerticalAnchorPoint(VerticalAnchorPoint.Center)
.withX1(5.0) .withY1(55.0) .withText("Hello World!") .withHorizontalAnchorPoint(HorizontalAnchorPoint.Center) .withVerticalAnchorPoint(VerticalAnchorPoint.Center)
.withText("Custom Spline Chart") .withHorizontalAnchorPoint(HorizontalAnchorPoint.Center) .withVerticalAnchorPoint(VerticalAnchorPoint.Top)