I've downloaded android-graphview which is a great library, but I think it have a missing features (which i need). I need to set different color for different point, in a LineGraphSeries. I can only set color for line and background...
int quanti = dati.getCount();
DataPoint[] data = new DataPoint[quanti];
String[] orizzontale=new String[quanti];
int x=0;
while(dati.moveToNext()){
data[x]=new DataPoint(x,Integer.parseInt(dati.getString(dati.getColumnIndex("valore"))));
orizzontale[x]=dati.getString(dati.getColumnIndex("ora"))+":"+dati.getString(dati.getColumnIndex("minuti"));
x++;
}
series = new LineGraphSeries<DataPoint>(data);
series.setDrawBackground(true);
series.setDrawDataPoints(true);
series.setDataPointsRadius(10);
series.setThickness(2);
series.setOnDataPointTapListener(new OnDataPointTapListener() {
@Override
public void onTap(Series series, DataPointInterface dataPoint) {
//Toast.makeText(cx,dataPoint,Toast.LENGTH_SHORT).show();
}
});
series.setColor(Color.parseColor("#4fc9dd"));
series.setBackgroundColor(Color.parseColor("#154fc9dd"));
staticLabelsFormatter = new StaticLabelsFormatter(grafico);
staticLabelsFormatter.setHorizontalLabels(orizzontale);
grafico.getGridLabelRenderer().setLabelFormatter(staticLabelsFormatter);
grafico.addSeries(series);
so i need something like new DataPoint(x,y,color).
there's a way?