Showing data points
-
- Posts: 2
- Joined: Fri May 30, 2008 9:43 pm
Showing data points
I guess this is a stupid question, but how do I get data points to show? I did a createXYLineChart and it makes a line, but it doesn't show the points. I've tried for hours but I have no idea how to make it show the points.
-
- Posts: 844
- Joined: Fri Oct 13, 2006 9:29 pm
- Location: Sunnyvale, CA
Re: Showing data points
This is how you do it given the JFreeChart object returned by ChartFactory.createXYLineChart():RedSoxFan620 wrote:I guess this is a stupid question, but how do I get data points to show?
Code: Select all
JFreeChart chart = createXYLineChart(...);
XYPlot plot = chart.getXYPlot();
XYLineAndShapeRenderer renderer = (XYLineAndShapeRenderer)plot.getRenderer();
renderer.setBaseShapesVisible(true);
Richard West
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA