Customize PopupMenu in ChartPanel: http://www.jfree.org/phpBB2/viewtopic.php?f=3&t=27752
But to add something to the exisiting PopupMenu, use the above suggestion.
Search found 47 matches
- Fri Jan 15, 2010 4:40 pm
- Forum: JFreeChart
- Topic: adding menu item to chartpanel popup menu
- Replies: 2
- Views: 4358
- Thu Jan 14, 2010 4:39 pm
- Forum: JFreeChart
- Topic: how to implement selecting one line(series) in line chart
- Replies: 3
- Views: 6234
Re: how to implement selecting one line(series) in line chart
There is no highlighting functionality built in that I know of, but you can simulate a highlight by changing the line color and line thickness on a mouse click. The only downside is that the user must click on a datapoint, a click on the line between datapoints wont register. chartPanel.addChartMous...
- Mon Oct 19, 2009 4:56 pm
- Forum: JFreeChart
- Topic: Editing a Component using JTable
- Replies: 25
- Views: 24929
Re: Editing a Component using JTable
You have Double.ValueOf, but the method is Double.valueOf. You have the V in valueOf capitalized.
- Mon Oct 19, 2009 4:41 pm
- Forum: JFreeChart
- Topic: Editing a Component using JTable
- Replies: 25
- Views: 24929
Re: Editing a Component using JTable
The exception is "java.lang.String cannot be cast to java.lang.Double" and the only place that I can see where you are trying to cast a String to a Double is "(Double)tabModel.getValueAt(i,1)". You need to look at exactly what tabModel.getValueAt(i,1) is returning. According to the Exception, getVal...
- Mon Oct 19, 2009 4:31 pm
- Forum: JFreeChart
- Topic: DefaultPlotEditor class fails
- Replies: 2
- Views: 3339
Re: DefaultPlotEditor class fails
See http://www.jfree.org/phpBB2/viewtopic.php?f=3&t=26674 if you'd like to play with editing the chart editors.
- Mon Oct 19, 2009 4:30 pm
- Forum: JFreeChart
- Topic: Editing a Component using JTable
- Replies: 25
- Views: 24929
Re: Editing a Component using JTable
I don't see what's wrong with that code. Do you have an Exception or stack trace?
- Mon Oct 19, 2009 4:14 pm
- Forum: JFreeChart
- Topic: Editing a Component using JTable
- Replies: 25
- Views: 24929
Re: Editing a Component using JTable
What you described is one way, and would be how I would first try it. Basically, you're creating a user interface to edit a PieDataset. A table would be a natural choice, with some logic to populate the table and save the table values back to the dataset.
- Tue Oct 13, 2009 8:59 pm
- Forum: JFreeChart
- Topic: Better solution for PanMask in ChartPanel?
- Replies: 1
- Views: 2991
Better solution for PanMask in ChartPanel?
I apologize for using this Forum instead of SourceForge, but I'm having issues with our network reaching SourceForge. There may be a better way to change the PanMask in ChartPanel for different operating systems. Java provides a method that takes into account different key modifiers on different ope...
- Mon Oct 12, 2009 8:09 pm
- Forum: JFreeChart
- Topic: Merge/Overlay two charts
- Replies: 2
- Views: 8832
Re: Merge/Overlay two charts
JFreeChart also supports multiple charts in the same ChartPanel, which is like overlaying. The added benefit is that zooming will zoom in on both charts at the same time. http://www.jfree.org/phpBB2/viewtopic.p ... 883#p77685
- Tue May 12, 2009 1:55 pm
- Forum: JFreeChart
- Topic: How to keep series' rendering props after remove?
- Replies: 4
- Views: 8259
Re: How to keep series' rendering props after remove?
The AbstractRenderer class, which ALL of the renderers extends, offers a bunch of setAutoPopulateSeriesXXX(boolean) methods to turn on or off the automatic generation of colors/shapes/etc. If you set all of these to false, then your chart will have a whole bunch of exactly similar looking lines. The...
- Mon May 11, 2009 9:02 pm
- Forum: JFreeChart
- Topic: How to keep series' rendering props after remove?
- Replies: 4
- Views: 8259
Re: How to keep series' rendering props after remove?
By default the Plot uses a DrawingSupplier to internally automatically generate some default Series colors, shapes, etc. Each time you add a Series to the Plot, the Plot basically does a DrawingSupplier.getNextColor() and .getNextShape(). If you then remove the Series and add it back, you're going t...
- Fri May 08, 2009 8:18 pm
- Forum: JFreeChart
- Topic: How to Mix ScatterPlot and Lines
- Replies: 9
- Views: 28569
Re: How to Mix ScatterPlot and Lines
Here's my test code I used to figure this out myself. This example will create two separate charts that are overlaid on top of each other. It's like making two separate JFreeCharts then stacking them together. // Create a single plot containing both the scatter and line XYPlot plot = new XYPlot(); /...
- Fri May 08, 2009 7:47 pm
- Forum: JFreeChart
- Topic: ChartEntity problem cast to XYItemEntity jfreechart-1.0.13
- Replies: 4
- Views: 8500
Re: ChartEntity problem cast to XYItemEntity jfreechart-1.0.13
There are multiple types of ChartEntities. JFreeChart 1.0.13 added some more too. You should at least make sure the ChartEntity that you get is an instance of an XYItemEntity. ChartEntity entity = viewerPlot.getChartPanel().getEntityForPoint(event.getTrigger().getX(), event.getTrigger().getY()); if ...
- Thu Apr 23, 2009 3:13 pm
- Forum: JFreeChart
- Topic: Zooming in too far with DateAxis throws Exception in 1.0.13
- Replies: 4
- Views: 9028
Re: Zooming in too far with DateAxis throws Exception in 1.0.13
NumberAxis also have this problem, but you have to keep zooming in a lot further then a DateAxis. In the process of continually zooming in, at some point the tick mark scale on the Domain and Range Axis completely disappears. You've zoomed in so far, all you see is the Axis label. At this point ther...
- Wed Apr 22, 2009 8:09 pm
- Forum: JFreeChart
- Topic: Zooming in too far with DateAxis throws Exception in 1.0.13
- Replies: 4
- Views: 9028
Zooming in too far with DateAxis throws Exception in 1.0.13
In JFreeChart 1.0.13, when using a DateAxis, after zooming in enough I get an Exception thrown: java.lang.IllegalArgumentException: Requires xLow < xHigh. at org.jfree.chart.renderer.RendererUtilities.findLiveItemsLowerBound(RendererUtilities.java:75) at org.jfree.chart.renderer.RendererUtilities.fi...