I need to draw red circles if value higher than 3. How to realize that? I've read that I should override method drawCircles but I dont understand where I should do this.
LineDataSet set1;
set1 = new LineDataSet(entries, "");
chart.getLegend().setEnabled(false);
set1.setColor(Color.WHITE);
set1.setCircleColor(Color.WHITE);
set1.setLineWidth(2f);
set1.setCircleRadius(4f);
set1.setValueTextSize(9f);
set1.setValueTextColor(Color.WHITE);
ArrayList<ILineDataSet> dataSets = new ArrayList<>();
dataSets.add(set1); // add the datasets
// create a data object with the datasets
LineData data = new LineData(xVals, dataSets);
chart.getXAxis().setPosition(XAxis.XAxisPosition.BOTTOM);
chart.getAxisRight().setEnabled(false);
chart.setScaleMinima(6f, 1f);
if (measure.equals("co")) {
LimitLine ll = new LimitLine(CO_CRITICAL, getResources().getString(R.string.critical_co));
ll.setLineColor(Color.RED);
ll.setLineWidth(1f);
ll.setTextColor(Color.WHITE);
ll.setTextSize(10f);
chart.getAxisLeft().addLimitLine(ll);
} else if (measure.equals("no2")) {
LimitLine ll = new LimitLine(NO2_CRITICAL, getResources().getString(R.string.critical_no2));
ll.setLineColor(Color.RED);
ll.setLineWidth(1f);
ll.setTextColor(Color.WHITE);
ll.setTextSize(10f);
chart.getAxisLeft().addLimitLine(ll);
}
// set data
chart.setData(data);