I want to add specific points on GraphView
that look like this:
This is what I have tried:
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);
And this is the result:
Is has nothing to do with what I want to achieve. The dots are not in the exact place like above. How to solve this?