Coordinate « Layout « JFreeChart Q&A





1. Get the Following Coordinate In JFreeChart    stackoverflow.com

I wish to get the following coordinate in JFreeChart. I try to use

chartPanel.getScreenDataArea()
But, it is not the area I want. The returned rectangle is outside the area I wish to have. The coordinate I ...

2. scale problem when getting coordinates of the cursor    jfree.org

Point2D translate(Point p){ XYPlot plot = panel.getChart().getXYPlot(); Point2D p2D = panel.translateScreenToJava2D(p); swap(p2D); p2D.setLocation(plot.getDomainAxis().java2DToValue(p2D.getX(), panel.getScreenDataArea(), plot.getDomainAxisEdge()),plot.getRangeAxis().java2DToValue(p2D.getY(), panel.getScreenDataArea(), plot.getRangeAxisEdge())) ; return p2D ; ...

3. Coordinates of components on bufferedimage    jfree.org

Hi, I am outputting a dynamic chart from a servlet as an image. After i have the bufferedimage of the chart i have then drawn on a jtable to represent the data within the chart. I want the table to be drawn at the axis origin everytime but as the charts are dynamic this can be different. What is the easiest ...

4. how to customize the coordinates?    jfree.org

hi, i am a fresh me in jfreechart, and i met a problem: how to position the axis, such as placing the x-axis in the middle? Please help!!! something likes this: 3 | 2 | 1 | 0 |_______________________________ -1| -2| -3| i know a method is to set a value 3, and another value -3. but i want to make ...

6. Displaying coordinates values on the chart    jfree.org

Hi all, I would like to display the coordinate values (the x and y coordinates) on the chart itself as the crosshair moves from point to point. The values, preferably, should be displayed near the crosshair. In another words, when the crosshair moves to another point, the positioning of the coordinate values would move too, following the crosshair. How should I ...

7. Coordinates X,Y and crosshair    jfree.org

Hi, Sorry, my english is very bad. I have a problem drawing a crosshair because the coordinate Y isn't good. I see others topics related, but not work fine. Code: Select all Point2D p = panelGrafica.translateScreenToJava2D(new Point(x, y)); XYPlot plot = (XYPlot) panelGrafica.getChart().getPlot(); ...

9. org.jfree.ui.RectangleAnchor.coordinates error    jfree.org

hi, iam using the saveChartAsPNG method in the ChartUtilities class and i get the error: Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: org.jfree.ui.RectangleAnchor.coordinates(Ljava/awt/geom/Rectangle2D;Lorg/jfree/ui/RectangleAnchor;)[D at org.jfree.chart.axis.CategoryAxis.drawCategoryLabels(CategoryAxis.java:693) at org.jfree.chart.axis.CategoryAxis.draw(CategoryAxis.java:617) at org.jfree.chart.plot.CategoryPlot.drawAxes(CategoryPlot.java:1996) at org.jfree.chart.plot.CategoryPlot.draw(CategoryPlot.java:1869) at org.jfree.chart.plot.Plot.draw(Plot.java:725) at org.jfree.chart.JFreeChart.draw(JFreeChart.java:904) at org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1037) at org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1020) at org.jfree.chart.ChartUtilities.writeChartAsPNG(ChartUtilities.java:156) at org.jfree.chart.ChartUtilities.saveChartAsPNG(ChartUtilities.java:297) at org.jfree.chart.ChartUtilities.saveChartAsPNG(ChartUtilities.java:270) at rechazos.SqlStatement.CrearImagenGraficaMensual(SqlStatement.java:1988) at rechazos.Frame_RepGrafDefMensual.jButtonProcesar_actionPerformed(Frame_RepGrafDefMensual.java:359) at rechazos.Frame_RepGrafDefMensual_jButtonProcesar_actionAdapter.actionPerformed(Frame_RepGrafDefMensual.java:573) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6038) ...





11. how to draw annotations in view coordinates?    jfree.org

Apologies if this has been posted elsewhere - my search did not turn up a relevant answer. I have an issues with JFreeChart annotations - I would like to draw one of several Shapes at a given size, say 10x10 pixels. However, the Annotation API appears to require data space coordinates. I am able to calculate this using the java2DToValue() method ...

12. coordinate starting point problem    jfree.org

14. Determing coordinates of point on XY curve    jfree.org

Hello all, Is there any way to determine both coordinates of a point on an XY-curve knowing only one (x or y)? Please note that the point belongs to the line but is not part of the underlying dataset. Per example, if I have an XYDataSet containing the following points: (0,0), (1,1), (2,3) Once the corresponding curve is created, is it ...

15. Possibilty of Tooltip displaying Cursor's XY Coordinates...    jfree.org

Hello Everyone, I am fairly new with JFreeChart as I have only been working with it for a few weeks. However, it has been delivering everything I could have asked for and more so far. This program I am making right now takes points from a text file and connects them on a standard XY Line graph. It works like a ...