我正在尝试设置 a 的可见范围DateAxis。这是我所拥有的:
final IXyDataSeries<Date, Double> dataSeries = sciChartBuilder.newXyDataSeries(Date.class, Double.class).build();
final IAxis xBottomAxis = sciChartBuilder.newDateAxis()
.withAxisId("xBottomAxis")
.build();
xBottomAxis.setAutoRange(AutoRange.Never);
xBottomAxis.setTextFormatting("MM.dd.yyyy h:mm a");
Calendar rightNow = Calendar.getInstance();
long t = rightNow.getTimeInMillis();
Date rightNowPlusFiveMin = new Date(t + (5 * ONE_MINUTE_IN_MILLIS));
Date rightNowMinusThreeHr = new Date(t - (3 * ONE_HOUR_IN_MILLIS));
xBottomAxis.setVisibleRange(new DateRange(rightNowMinusThreeHr, rightNowPlusFiveMin));
这应该阻止它AutoRanging并在xBottomAxis. 这不是你的做法吗?
目前,它只是AutoRanging为了拟合数据。
编辑:以下是其文档的适用链接。
https://www.scichart.com/documentation/android/v2.x/webframe.html#Axis%20Ranging%20-%20VisibleRange%20and%20DataRange.html
https://www.scichart.com/documentation/android/v2.x/webframe.html#Axis%20Ranging%20-%20Setting%20and%20Getting%20VisibleRange.html
繁花不似锦
MM们
相关分类