0
任何人都可以请帮我解决这个问题,也就是说,我试图用单个LineAndPointFormatter使用android plot绘制一个多色图。根据范围值LineAndPointFormatter颜色将会改变,即假设范围值在0-50之间,那么线颜色将是蓝色,如果范围值在50-100,那么颜色将是绿色,如果范围值在100-200,那么颜色将是黑色和100以上它将是灰色的。AndroidPlot多色LineAndPointFormatter
Check and let me know if below solution is fine or not i.e.
LineAndPointFormatter formatter;
formatter = new LineAndPointFormatter(Color.rgb(50, 143, 222),
null, null, null);
Paint paint = formatter.getLinePaint();
paint.setStrokeWidth(10); // Set the formatter width
paint.setColor(Color.BLUE); // Set the formatter color
formatter.setLinePaint(paint);
但现在面临的问题是如何获得的数值范围,改变颜色,如果不知何故,我会得到的范围值,则相应地,我可以改变使用paint.setColor(Color.BLUE)的颜色;
让我知道是否有解决方案。