To my dataset every 5 second refresh the data.
The first generating ok and if i call repaint() then connected the first and last value.
I dont know why…
first generate:
mChartView = ChartFactory.getLineChartView(ProductInfo.this,
dataset, mRenderer);
layout.addView(mChartView, new LayoutParams(
LayoutParams.FILL_PARENT, 180));
//Refresh if not null mChartView:
mChartView.repaint();
mChartView.invalidate();
The problem 1
If your renderer is set to fill below the line, then the renderer is going to try to connect your first and last points. Check and see if that’s what is going on. If so, and you do need to fill below the line, I would suggest padding your data with an extra value at the beginning and end with the y value that corresponds to the bottom of your fill. If you don’t want to fill, just turn it off and it should work.