I created my own renderer to solve my delay problems. It seems to be much smoother. This code is based on version 0.5. I donβt know if it works on v0.51.
import android.graphics.*; import com.androidplot.exception.PlotRenderException; import com.androidplot.series.XYSeries; import com.androidplot.util.ValPixConverter; import com.androidplot.xy.BarFormatter; import com.androidplot.xy.XYPlot; import com.androidplot.xy.XYSeriesRenderer; import java.util.List; import java.util.Map; import java.util.TreeMap; public class OptimisedBarRenderer extends XYSeriesRenderer<BarFormatter> { private BarWidthStyle style = BarWidthStyle.FIXED_WIDTH; private float barWidth = 5; public OptimisedBarRenderer(XYPlot plot) { super(plot); } public void setBarWidth(float barWidth) { this.barWidth = barWidth; } private final TreeMap<Number, XYSeries> tempSeriesMap = new TreeMap<Number, XYSeries>(); @Override public void onRender(Canvas canvas, RectF plotArea) throws PlotRenderException { int longest = getLongestSeries(); if(longest == 0) { return;
source share