I am trying to change the shape of a line chart's points, in my app. I am using afreechart's TimeSeriesChart
. I want to make this line fancy in terms of thickness, color and points shape. Where to change the code? which method will use for that?
What I'm having now:
(source: googlecode.com)
What I want:
om/svn/doc/screenshot/images/XYDrawableAnnotationDemo01.png)As you can see, in the first chart, the points of the line chart are opaque and rectangle(square?), and in the second one, they are fancy. So, what needs to be changed? I cant seem to figure out the variable used to store this shape value nor how to change it. Any help appreciated. Thanks in advance..
Assuming XYLineAndShapeRenderer
, you'll need to condition the renderer to use the desired shape and make the outlines visible, a shown in this example.
renderer.setSeriesShape(0, circle);
renderer.setSeriesPaint(0, line);
renderer.setUseFillPaint(true);
renderer.setSeriesShapesFilled(0, true);
renderer.setSeriesShapesVisible(0, true);
renderer.setUseOutlinePaint(true);
renderer.setSeriesOutlinePaint(0, line);
来源:https://stackoverflow.com/questions/11383306/android-afreechart-change-point-shape-thickness-and-color-of-line