Hello All,
I'm wondernig as to which API should I use to plot traingle-shaped series items only in the ScatterPlotDemo chart.
Any idea on the approach to this problem.
Thanks,
SNK
ScatterPlotDemo: How to get triangle-shaped series only!
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
You need JFreeChart 1.0.6 for this:
...otherwise you'll need to call setSeriesShape(int, shape) for each series on your chart. Whatever shape you supply should be centered on (0, 0) when you define it (JFreeChart will translate the shape to the right place on the chart later).
Code: Select all
GeneralPath gp = new GeneralPath();
gp.moveTo(0.0, 3.0);
gp.lineTo(3.0, -3.0);
gp.lineTo(-3.0, -3.0);
gp.closePath();
renderer.setAutoPopulateSeriesShape(false);
renderer.setBaseShape(gp);
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Circumscribing a triangle (series) shape!
Hi,
Using GeneralPath, no doubt, helps in getting the shape we want the series to display.
However, if I need to circumscribe a triangle i.e., to say if I need to have common centre for both shapes - triangle and circle- for two different datasets, is there any API available for that?
How do I fix the centre of the shape for a TimeSeriesCollection series in a ScatterPlot?...
Thanks in advance for any help.
Regards,
SNK
Using GeneralPath, no doubt, helps in getting the shape we want the series to display.
However, if I need to circumscribe a triangle i.e., to say if I need to have common centre for both shapes - triangle and circle- for two different datasets, is there any API available for that?
How do I fix the centre of the shape for a TimeSeriesCollection series in a ScatterPlot?...
Thanks in advance for any help.
Regards,
SNK