Hello! I am try to create chart with axis on top in my react native app, chart is create succesfuly, but when I start add annotation – it shift to top by axis height – whats may be wrong?
`
// create
surface = new CSciChartSurface(context);
surface.setRenderSurface(new RenderSurface(context));
// Initialize the SciChartBuilder
SciChartBuilder.init(context);
// Obtain the SciChartBuilder instance
sciChartBuilder = SciChartBuilder.instance();
xAxis = sciChartBuilder
.newCategoryDateAxis()
.withTextFormatting(DateChartFormatter.defaultDateFormat)
.withGrowBy(0.0d, 0.04d)
.withDrawMajorGridLines(true)
.withDrawMinorGridLines(false)
.withDrawMajorBands(false)
.withDrawMajorTicks(false)
.withAxisAlignment(AxisAlignment.Top)
.build();
// same yaxis and any
VerticalLineAnnotation verticalLine = sciChartBuilder.newVerticalLineAnnotation()
.withPosition(10, 16)
.withStroke(2, ColorUtil.Orange)
.withIsEditable(true)
.build();
Collections.addAll(surface.getYAxes(), yAxis);
Collections.addAll(surface.getXAxes(), xAxis);
Collections.addAll(surface.getRenderableSeries(), lineRenderableSeries);
Collections.addAll(surface.getAnnotations(), verticalLine);
// add to view
this.addView(surface);
`
- Sergey Evdokimov asked 12 months ago
- last active 12 months ago