Search found 47 matches

by MitchBuell
Fri Jan 15, 2010 4:40 pm
Forum: JFreeChart
Topic: adding menu item to chartpanel popup menu
Replies: 2
Views: 3554

Re: adding menu item to chartpanel popup menu

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.
by MitchBuell
Thu Jan 14, 2010 4:39 pm
Forum: JFreeChart
Topic: how to implement selecting one line(series) in line chart
Replies: 3
Views: 4602

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...
by MitchBuell
Mon Oct 19, 2009 4:56 pm
Forum: JFreeChart
Topic: Editing a Component using JTable
Replies: 25
Views: 18247

Re: Editing a Component using JTable

You have Double.ValueOf, but the method is Double.valueOf. You have the V in valueOf capitalized.
by MitchBuell
Mon Oct 19, 2009 4:41 pm
Forum: JFreeChart
Topic: Editing a Component using JTable
Replies: 25
Views: 18247

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...
by MitchBuell
Mon Oct 19, 2009 4:31 pm
Forum: JFreeChart
Topic: DefaultPlotEditor class fails
Replies: 2
Views: 2548

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.
by MitchBuell
Mon Oct 19, 2009 4:30 pm
Forum: JFreeChart
Topic: Editing a Component using JTable
Replies: 25
Views: 18247

Re: Editing a Component using JTable

I don't see what's wrong with that code. Do you have an Exception or stack trace?
by MitchBuell
Mon Oct 19, 2009 4:14 pm
Forum: JFreeChart
Topic: Editing a Component using JTable
Replies: 25
Views: 18247

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.
by MitchBuell
Tue Oct 13, 2009 8:59 pm
Forum: JFreeChart
Topic: Better solution for PanMask in ChartPanel?
Replies: 1
Views: 2136

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...
by MitchBuell
Mon Oct 12, 2009 8:09 pm
Forum: JFreeChart
Topic: Merge/Overlay two charts
Replies: 2
Views: 6654

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
by MitchBuell
Tue May 12, 2009 1:55 pm
Forum: JFreeChart
Topic: How to keep series' rendering props after remove?
Replies: 4
Views: 4891

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...
by MitchBuell
Mon May 11, 2009 9:02 pm
Forum: JFreeChart
Topic: How to keep series' rendering props after remove?
Replies: 4
Views: 4891

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...
by MitchBuell
Fri May 08, 2009 8:18 pm
Forum: JFreeChart
Topic: How to Mix ScatterPlot and Lines
Replies: 9
Views: 22008

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(); /...
by MitchBuell
Fri May 08, 2009 7:47 pm
Forum: JFreeChart
Topic: ChartEntity problem cast to XYItemEntity jfreechart-1.0.13
Replies: 4
Views: 4151

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 ...
by MitchBuell
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: 4772

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...
by MitchBuell
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: 4772

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...