Search found 513 matches

by John Matthews
Sun Jul 29, 2012 3:58 am
Forum: JFreeChart
Topic: exclude high brightness yellow series.
Replies: 2
Views: 8307

Re: exclude high brightness yellow series.

I usually just override getItemPaint(), as discussed here , but replacing the DrawingSupplier seems like a more general solution. The default drawing supplier is owned by Plot. Starting from TimeSeriesChartDemo1 , here's a minimal example: http://i.imgur.com/2GHmh.png plot.setDrawingSupplier(new Dra...
by John Matthews
Fri Jul 27, 2012 12:01 am
Forum: JFreeChart
Topic: [solved] custom foregroundAlpha for an XYStepAreaRenderer
Replies: 5
Views: 5963

Re: [solved] custom foregroundAlpha for an XYStepAreaRendere

brimborium wrote, "That's at least what I think he meant by his suggestion."

Exactly. The API goes on to say "You can override this method if you require different behaviour." There's a related example here that varies saturation, rather than alpha.
by John Matthews
Fri Jul 20, 2012 2:28 am
Forum: JFreeChart
Topic: java.util.ConcurrentModificationException
Replies: 3
Views: 4917

Re: java.util.ConcurrentModificationException

An sscce might help isolate the problem, but intermittent failure suggests incorrect synchronization.
by John Matthews
Thu Jul 19, 2012 10:33 am
Forum: JFreeChart
Topic: java.util.ConcurrentModificationException
Replies: 3
Views: 4917

Re: java.util.ConcurrentModificationException

Don't modify the List except via the remove() method of the Iterator or ListIterator, as mentioned here.
by John Matthews
Tue Jul 17, 2012 3:33 pm
Forum: JFreeChart
Topic: age items in a Timed StackedXYAreaChart
Replies: 4
Views: 4123

Re: age items in a Timed StackedXYAreaChart

Have you tried remove() using a TimePeriod that includes the start and end for the specific series?
by John Matthews
Sat Jul 14, 2012 2:42 pm
Forum: JFreeChart
Topic: age items in a Timed StackedXYAreaChart
Replies: 4
Views: 4123

Re: age items in a Timed StackedXYAreaChart

Have you tried clear()?
by John Matthews
Thu Jul 12, 2012 2:21 am
Forum: JFreeChart
Topic: dynamique internalframe control
Replies: 4
Views: 4822

Re: dynamique internalframe control

Your ponderous example is incomplete and incorrectly synchronized. At a minimum:

Construct and manipulate Swing GUI objects only on the event dispatch thread.

Use javax.swing.Timer to pace the animation; its action event handler executes on the event dispatch thread.
by John Matthews
Tue Jul 10, 2012 3:31 am
Forum: JFreeChart
Topic: Dynamic Stacked Area Chart
Replies: 3
Views: 5109

Re: Dynamic Stacked Area Chart

One of my favorite things about JFreeChart is linksource="yes" in build.xml, but I digress. Internally, DatasetUtilities.createCategoryDataset() constructs a DefaultCategoryDataset, which is eminently mutable. I'd say cast the return value or construct your own.
by John Matthews
Mon Jul 09, 2012 4:32 am
Forum: JFreeChart
Topic: How to show today's line in Gantt chart?
Replies: 3
Views: 4162

Re: How to show today's line in Gantt chart?

The ChartFactory.createGanttChart() method specifies a CategoryAxis for the domain and a DateAxis for the range, so a range marker seems appropriate. PlotOrientation.HORIZONTAL may be the missing piece. CategoryPlot plot = new CategoryPlot(dataset, categoryAxis, dateAxis, renderer); plot.setOrientat...
by John Matthews
Wed Jul 04, 2012 4:52 am
Forum: JFreeChart
Topic: createScatterPlot Problem
Replies: 5
Views: 5229

Re: createScatterPlot Problem

Your example is not complete. For reference, a number of complete examples may be found here.
by John Matthews
Thu Jun 28, 2012 4:16 am
Forum: JFreeChart
Topic: HeatMap how to plot negative values with different color
Replies: 1
Views: 2242

Re: HeatMap how to plot negative values with different color

This example constructs a List<Color> for the entire spectrum using Color.getHSBColor(), but you can choose a smaller range of hues. Once you have the list, you can add them to an instance of LookupPaintScale. Use a contrasting Color for the defaultPaint , which is used for negative values. Alternat...
by John Matthews
Fri Jun 15, 2012 1:45 am
Forum: JFreeChart
Topic: scaling in scatter plot
Replies: 3
Views: 3574

Re: scaling in scatter plot

Several variations of ChartFactory.createScatterPlot(), suitable for constructing your sscce, may be found here.
by John Matthews
Wed Jun 13, 2012 5:16 pm
Forum: JFreeChart
Topic: DynamicTimeSeriesCollection limitation
Replies: 3
Views: 3598

Re: DynamicTimeSeriesCollection limitation

There's an example of martin's suggestion here for Millisecond.