ChartPanel « Component « JFreeChart Q&A





1. how can I use drawString() on a ChartPanel    jfree.org

i tried to use chartPanel.getGraphics().drawString() on ChartPanel and it seemed to be working at first. But when the chartPanel redraws,the things are gone!! i traced some code and found that Annotations are drawn by using getGraphics().drawString(),too.And Annotations wouldn't disappeared after chartPanel's redrawing So... I'm wondering how i can use getGraphics().drawString() to draw on the chartPanel and let it not to disappeare ...

2. ChartPanel    jfree.org

4. Cannot see all the value in the ChartPanel    jfree.org

I use a ChartPanel to populate my chart. And this ChartPanel is in a JFrame. But I always have to zoom out several times to see the whole range values in the chart. How can I make the chart fit in size initially to see all the values on the plot. I use a ChartFactory.createScatterPlot() to create the chart. And I ...

5. A problem while using ChartPanel(Please help me!)    jfree.org

A problem while I 'm using ChartPanel. When I' ve added the ChartPanel into the mainPanel and run the program , the graph looks just fine.But when i clicked the maximize button , the ChartPanel enlarge more than the mainPanel. How can I set the program in order for the ChartPanel to enlarge and fit perfectly in the mainPanel ? If ...

6. chartPanel.setOpaque(false);    jfree.org

8. From 0.9 -> 1.0 ?? what happen with ChartPanel.zoomInHori    jfree.org

I'm having too many problems trying to upgrade my application. I was using jfreechart 0.9.19 and now with 1.0.0_rc lots of problems appears. Some classes has been moved to other sublevel packages, and many methods has been changed or simply disappear. For example: in ChartPanel class, I was using zoomInHorizontal, zoomInVertical, zoomOutHorizontal, zoomOutVertical ... and all of them have disapeared. I ...





10. ChartPanel setMouseZoomable() confusion in STABLE_1-0-0    jfree.org

In STABLE_1-0-0 I cannot disable mouse zooming in ChartPanel. I use setMouseZoomable() and it sets the private members domainZoomable and rangeZoomable to false but this does not actually stop mouse zooming. In addition chartChanged() will overwrite the above mentioned members if the Plot instance happens to be zoomable. Is zooming done differently now? Thanks.

11. Language for the properties of a ChartPanel    jfree.org

I am implementing a visualise editor with the help of JFreeChart. Since I have an Operating System in German and my Program is in English I have the problem that the properties of the ChartPanel (Properties, Save as, Print, Zoom in, Zoom out) are shown in German. Do you have a solution for me? I would like to have them all ...

12. Resizing ChartPanel with Dynamic CombinedPlot    jfree.org

Hi! I have a dynamic CombinedPlot chart (this mean that i want add and remove dynamicly the subplots in the chart). My problem is that, when i add somes subplots, the size of plots is readjusted to fit all the chart in the ChartPanel. I would like to manage the sizing of chartpanel, to keep always the same size of the ...

13. Getting ChartPanel to work in Lotus Notes ??    jfree.org

Hi, my first post here Just started using JfreeChart, and Java for that sake so I desperately need your help.. I've created a Jfreechart (Linechart) in eclipse (with extends JApplet) and everything works perfectly in the Java viewer. I've exported everything to .jar-files but when I insert it on my Lotus Notes Form, the Applet is blank, If I draw any ...

14. chartPanel ScaleX issue    jfree.org

chartPanel ScaleX issue by develop Thu Mar 02, 2006 3:12 am my first question is why scalex and scaleY is not initialize with 1. it get values in paintComponent(..) when i call chartPanel.getScreenDataArea(), intially (with resizing the main frame) it gives me zero (rectangle2d with all values zero) then if i resize the main frame, i gives me value all ...

15. Should I overwrite mouseDragged() in ChartPanel?    jfree.org

I encounter a problem about TimeSeriesChart now.I know there are many "zoom" methods in ChartPanel to react to mouse events,but they do not seem to meet my request. And My request is as follows: First I will create a TimeSeriesChart covering a whole day,but I just want to display it in a fixed range.(say one hour,if current time is 7 o'clock,it ...

16. ChartPanel zoomInBoth    jfree.org

Hi, I have only just started learning to work with JFreeChart. Unfortunately, I got stuck while trying to zoom into an area around a double-clicked point on the chart (I got it to zoom, but it does not take any account of the position of the clicked point). I have been trying to adapt the XYPlot example from the free manual. ...





19. Implications of ChartPanel or newAxis...    jfree.org

I have created an charting applet that creats charts and fixed all of my current issues and now my users have asked to be able to create multiple overlayed charts. Unfortunately, I don't know the best method of doing this. I have seen what seems like two viable methods. One using panels. Where you create multiple panels and add them to ...

20. possible Memory Leak in buffered ChartPanel ???    jfree.org

j2re1.4.2_10 jfreechart-1.0.1 Some more info. I have an instance of a chart embedded inside a SWT TabItem. The leak manifests itself when I dispose of the tabItem and create a new one. I though the memory leak was bound to be a result of not disposing of the TabItem properly, so I went through with a fine toothcomb making sure I ...

21. Multiple charts in one chartpanel?    jfree.org

i have the same problem. i want to display up to four pie charts in one chart panel. they all have independent datasets. private void createPieChart(Dataset.Parameter p) { try { PieChart pieChart = new PieChart(p); setPanel(pieChart.getChartPanel(), frame.getchartPanel()); } catch (Exception e) ... } this is for creating one single pie chart in th chartpanel. the parameters p contains data for creating ...

22. How do I force a buffered ChartPanel to redraw ?    jfree.org

How do I force a buffered ChartPanel to redraw ? by Rachel M Fri Sep 01, 2006 4:58 pm Hi, I switched from using a non-buffered to a buffered ChartPanel and it seems like changes I make to the chart randomly get propagated or get thrown out. Just changing the constructor useBuffer parameter causes all of these changes. Each time ...

25. How can I put scrollbar on ChartPanel & space between ta    jfree.org

Hi folks, How can I put scrollbar on ChartPanel and space between tasks? I'm developing a Gantt Chart, but it has many tasks and the labels overload each other, for example the previous task's label overloads the next one. I've created my own gantt renderer to put two labels surround the bar, one above and another one bellow. Does anyone have ...

26. Small enhancement request for ChartPanel    jfree.org

Folks'es, I would like to suggest a small enhancement for the ChartPanel class: drawing a lot of points in a chart can take some considerable time to finish (at least on my system [Sun ULTRA 25, Solaris 10]). in order to let the user know that something is happening, i want to change my cursor to a WAIT_CURSOR. and of course, ...

27. Problems with ChartPanel and dynamic Chart    jfree.org

Hi, I got a problem with displaying and updating my data in a ChartPanel. The ChartPanel is embedded in a normal JFrame with BorderLayout and just displays an empty chart with my axis-configuration. I don't know how to solve the problem in my code because I display the same chart in an external ChartFrame and there it works perfectly. Code: Select ...

29. ChartPanel.getEntityForPoint() Issue    jfree.org

I'm using the ChartPanel.getEntityForPoint(x, y) function to get specific X-Y entities (points) the user has selected using the mouse. The problem is, if the chart is not zoomed in enough, this function will not retrieve "hidden" entities. So if the user selects an area that contains 3 entities, when only 2 entities are showing, they will only get those entities and ...

30. Remove Time Appeared in ChartPanel    jfree.org

Dear All, I am using jfreechart to make a stock exchange project. i am near to complete it, but i need some help i am sending two image in first image u are seeing that inside red circle that a time is appeared without the dataset appeared. i want to remove it, and in second image you are watching that inside ...

31. ChartPanel    jfree.org

It is in ints only (as all Swing components) and you'll start to see funny effects once your overall UI-size is larger than 32768 pixels (this is a Swing limitation, not one of JFreeChart). JFreeChart itself (as non-swing-object) can render itself on any size that a float can hold, but you may need a super-computer for the resulting image.

32. custom chartpanel    jfree.org

33. Enhancement suggestion : ChartPanel in jfreechart 1.10    jfree.org

Hi, I find it very constraining to use the ChartPanel as it, or inherits it. I had some problem with mouse selection because I wanted to permit the selection from left to right but also from right to left. This cannot be done without rewriting ChartPanel because all rectangle mecanism are private. More, when I added some mouseMoved event, I had ...

34. Can not extend ChartPanel class without loss of functions    jfree.org

I created a test custom class called CustChartPanel that for the moment does nothing more than extend ChartPanel and adds nothing. When I attempt to use the CustChartPanel class instead of ChartPanel, things like zooming and the popup menu no longer work. In theory CustChartPanel should work identical to ChartPanel, but it's not. Because of this I can't proceed further to ...

35. ChartPanel - method doSaveAs - change look and feel- 1.0.12    jfree.org

2216 * Opens a file chooser and gives the user an opportunity to save the chart 2217 * in PNG format. 2218 * 2219 * @throws IOException if there ...

36. Customize PopupMenu in ChartPanel    jfree.org

37. set ChartPanel not opaque ?    jfree.org

38. NPE in ChartPanel.displayPopupMenu    jfree.org

This isn't very important but FWIW: I got an NPE in ChartPanel.displayPopupMenu line 3018, JFreeChart 1.0.13. The code there was: Plot plot = this.chart.getPlot(); I got this because I dropped the mouse (literally: I'm wearing a wrist brace and it's cramping my style) and must have clicked somehow during the initialization of the chart. It looks as if this.chart == null. ...

39. How do I put many charts in one chartPanel    jfree.org

Hi, I want to draw a simulation of an electricity network for which I have to draw JFreechart meterplots at arbitrary places in a JPanel. So I need something like ChartPanel() but with a possibility to put more than one chart in it at specific places. Can anyone please tell me how to do that? Thanks Han Noot

40. Better solution for PanMask in ChartPanel?    jfree.org

Thanks for the tip. I'm not 100% familiar with the Mac (I have one at home, but it is mainly used by my children and I just test JFreeChart on it from time to time), so I don't know what is the preferred way to handle this...but I'm sure the current setup isn't optimal. Seems to work alright though.

42. What is wrong with chartPanel.getScreenDataArea()?    jfree.org

chartPanel.addMouseListener( new MouseAdapter() { @Override public void mouseClicked( MouseEvent e ) { Point2D p = chartPanel.translateScreenToJava2D(e.getPoint()); // (*) Rectangle2D plotArea = chartPanel.getChartRenderingInfo().getPlotInfo().getDataArea(); XYPlot plot = (XYPlot)chartPanel.getChart().getPlot(); double ...

43. Wrong calculation of java2d pos. after resizing ChartPanel    jfree.org

public Point getCoordinatesByChartLocation( double value, Calendar Time ) { double timeInMillis = time.getTimeInMillis(); Rectangle2D plotArea = getChartRenderingInfo().getPlotInfo().getDataArea(); XYPlot plot = (XYPlot) getChart().getPlot(); RectangleEdge domainAxisEdge = plot.getDomainAxisEdge(); RectangleEdge rangeAxisEdge = plot.getRangeAxisEdge(); double x = plot.getDomainAxis().valueToJava2D( timeInMillis, plotArea, domainAxisEdge ); double y = ...

44. Chart out ChartPanel    jfree.org

45. ChartPanel    jfree.org

ChartPanel by stephenGalbraith Thu Jul 22, 2004 4:53 pm I got a bit fed up with the zoom window not being drawn smoothly in ChartPanel so I've changed the method to this... Code: Select all /** * Handles a 'mouse dragged' event. * ...