我正在尝试在renderer
中创建achartengine
,但Android
给了我这个错误:
Cannot resolve symbol setLineWidth
我似乎正在做正确的事,因为这是我的代码:
private XYSeriesRenderer renderer = new XYSeriesRenderer();
renderer.setLineWidth(2);
以下是我的导入:
import org.achartengine.model.XYSeries;
import org.achartengine.renderer.XYSeriesRenderer;
答案 0 :(得分:1)
你必须在XYMultipleSeriesRenderer
中循环所有渲染器,使用它:
int length = renderer.getSeriesRendererCount();
for (int i = 0; i < length; i++) {
XYSeriesRenderer seriesRenderer = (XYSeriesRenderer) renderer
.getSeriesRendererAt(i);
seriesRenderer.setLineWidth(2);
}