【发布时间】:2019-02-18 15:35:03
【问题描述】:
我想在GraphView 上添加如下所示的特定点:
这是我尝试过的:
GraphView graphView = findViewById(R.id.graph_view);
graphView.getGridLabelRenderer().setNumVerticalLabels(9);
graphView.getGridLabelRenderer().setNumHorizontalLabels(9);
PointsGraphSeries<DataPoint> series = new PointsGraphSeries<>(new DataPoint[] {
new DataPoint(-9, 9),
new DataPoint(-9, 0),
new DataPoint(-9, -9),
new DataPoint(0, 9),
new DataPoint(0, 0),
new DataPoint(0, -9),
new DataPoint(9, 9),
new DataPoint(9, 0),
new DataPoint(9, -9)
});
graphView.addSeries(series);
series.setShape(PointsGraphSeries.Shape.POINT);
结果如下:
Is 与我想要实现的目标无关。这些点不在上面的确切位置。如何解决?
【问题讨论】:
标签: java android android-graphview