How can I control the shape of the datapoint in a line chart. For Example, I want to specify that series_1 displays 'CIRCLES' for datapoint and series_2 displays 'DIAMONDS' for datapoints. How can I do that?
Also, is it possible to specify the color for a datapoint.
By using this
plot.setSeriesPaint(new Paint[] { Color.green, Color.orange } );
color for both line and the datapoint is same. Is it possible to set a separate color for datapoint?
Shape of datapoint
Re: Shape of datapoint
I don't think you can currently set a color for the shape to be different from that of the line! However, you can set the shape quite simply by extending the ShapeFactory interface or one of its implementing classes and providing your own implementation for the getShape method. I have extended the SeriesShapeFactory class and managed to set a shape depending on the name of the series. If you would like to do this also I can send you some code snippets.
In terms of changing the color of the shape relative to the line I am sure you can extend how the series paint works and extendit sfunctionality to have two sets of arrays one for the line one for the shape. I haven't tried it but I am sure it will be possible.
In terms of changing the color of the shape relative to the line I am sure you can extend how the series paint works and extendit sfunctionality to have two sets of arrays one for the line one for the shape. I haven't tried it but I am sure it will be possible.
Re: Shape of datapoint
Could you please send me some code snippet on how you are setting shapes in Series ShapeFactory.