.withVisibleRange(0d, 10d) .withGrowBy(0.1d, 0.1d) .withTextFormatting("0.0#") .build(); .withVisibleRange(0d, 10d) .withGrowBy(0.1d, 0.1d) .withTextFormatting("0.0#") .build();
.withAxisAlignment(AxisAlignment.Left) .withAxisId(Y_LEFT_AXIS) .withTextFormatting("#.0") .withTextColor(0xFFFC9C29) .build(); .withAxisAlignment(AxisAlignment.Right) .withAxisId(Y_RIGHT_AXIS) .withTextFormatting("#.0") .withTextColor(0xFF4083B7) .build();
@Override protected void initExample() { final IAxis xAxis = sciChartBuilder.newNumericAxis().withTextFormatting("0.0").withGrowBy(0.1, 0.1).withVisibleRange(3, 6).build(); final IAxis rightYAxis = sciChartBuilder.newNumericAxis().withAxisId("RightAxisId").withAxisAlignment(AxisAlignment.Right).withTextColor(0xFF279B27).withGrowBy(0.1, 0.1).build(); final IAxis leftYAxis = sciChartBuilder.newNumericAxis().withAxisId("LeftAxisId").withAxisAlignment(AxisAlignment.Left).withTextColor(0xFF4083B7).withGrowBy(0.1, 0.1).build();
@Override protected void initExample() { final IAxis xAxis = sciChartBuilder.newNumericAxis().withAxisAlignment(AxisAlignment.Top).withMajorTickLineStyle(0xFFFFFFFF, 2f, true).withTextFormatting("0.00").withDrawMinorTicks(false).withIsCenterAxis(true).withGrowBy(0.1, 0.1).build(); final IAxis yAxis = sciChartBuilder.newNumericAxis().withAxisAlignment(AxisAlignment.Left).withMajorTickLineStyle(0xFFFFFFFF, 2f, true).withTextFormatting("0.00").withDrawMinorTicks(false).withIsCenterAxis(true).withGrowBy(0.1, 0.1).build(); final DoubleSeries butterflyCurve = DataManager.getInstance().getButterflyCurve(20000); final XyDataSeries<Double, Double> dataSeries = sciChartBuilder.newXyDataSeries(Double.class, Double.class).withAcceptsUnsortedData().build(); dataSeries.append(butterflyCurve.xValues, butterflyCurve.yValues); final FastLineRenderableSeries rSeries = sciChartBuilder.newLineSeries().withDataSeries(dataSeries).build(); UpdateSuspender.using(surface, new Runnable() { @Override public void run() { surface.setLayoutManager(new CenterLayoutManager(xAxis, yAxis)); Collections.addAll(surface.getXAxes(), xAxis); Collections.addAll(surface.getYAxes(), yAxis); Collections.addAll(surface.getRenderableSeries(), rSeries); Collections.addAll(surface.getChartModifiers(), sciChartBuilder.newModifierGroupWithDefaultModifiers().build()); sciChartBuilder.newAnimator(rSeries).withSweepTransformation().withDuration(20000).withStartDelay(350).start(); } }); }
protected BasePaneModel(SciChartBuilder builder, String title, String yAxisTextFormatting, boolean isFirstPane) { this.title = title; this.renderableSeries = new RenderableSeriesCollection(); this.annotations = new AnnotationCollection(); this.yAxis = builder.newNumericAxis() .withAxisId(title) .withTextFormatting(yAxisTextFormatting) .withAutoRangeMode(AutoRange.Always) .withDrawMinorGridLines(true) .withDrawMajorGridLines(true) .withMinorsPerMajor(isFirstPane ? 4 : 2) .withMaxAutoTicks(isFirstPane ? 8 : 4) .withGrowBy(isFirstPane ? new DoubleRange(0.05d, 0.05d) : new DoubleRange(0d, 0d)) .build(); }
protected BasePaneModel(SciChartBuilder builder, String title, String yAxisTextFormatting, boolean isFirstPane) { this.title = title; this.renderableSeries = new RenderableSeriesCollection(); this.annotations = new AnnotationCollection(); this.yAxis = builder.newNumericAxis() .withAxisId(title) .withTextFormatting(yAxisTextFormatting) .withAutoRangeMode(AutoRange.Always) .withDrawMinorGridLines(true) .withDrawMajorGridLines(true) .withMinorsPerMajor(isFirstPane ? 4 : 2) .withMaxAutoTicks(isFirstPane ? 8 : 4) .withGrowBy(isFirstPane ? new DoubleRange(0.05d, 0.05d) : new DoubleRange(0d, 0d)) .build(); }
private IAxis generateLinearAxis() { return sciChartBuilder.newNumericAxis() .withTextFormatting("#.#E+0") .withScientificNotation(ScientificNotation.Normalized) .withGrowBy(0.1, 0.1) .withDrawMajorBands(false) .build(); }