Search found 201 matches

by remiohead
Fri May 31, 2013 3:21 pm
Forum: JFreeChart
Topic: Big Legend Hides Graph
Replies: 9
Views: 9230

Re: Big Legend Hides Graph

What did you try and where did it fail specifically? Please post your code as a SSCCE (http://sscce.org/) and I'll be happy to look over it.
by remiohead
Thu May 30, 2013 8:15 pm
Forum: JFreeChart
Topic: How to make category chart start from most left of x axis
Replies: 2
Views: 3038

Re: How to make category chart start from most left of x axi

Perhaps this: http://www.jfree.org/jfreechart/api/jav ... in(double).

If this does not fix it use a debugger to step through the code and figure out where the spacing is coming from.
by remiohead
Thu May 23, 2013 7:41 pm
Forum: JFreeChart
Topic: Need to remove vertical white lines in stackedareachart
Replies: 4
Views: 6449

Re: Need to remove vertical white lines in stackedareachart

Our approach was create a new interface called SeriesRenderer (extends from CategoryItemRenderer) which together with a slightly modified plot and implementing version of AreaRenderer, paints one series at a time, rather than one category at the time.
by remiohead
Tue May 21, 2013 8:18 pm
Forum: JFreeChart
Topic: TimeSeriesCollection in a JScrollpane?
Replies: 1
Views: 2920

Re: TimeSeriesCollection in a JScrollpane?

The general steps would be 1. Create the chart 2. Add chart to ChartPanel (one of the constructors allows you to specify desired width/height, or call setPreferredSize()) 3. Add ChartPanel to a JScrollPane If you want a bit more control over the scrolling you'll want to extend ChartPanel and impleme...
by remiohead
Tue May 21, 2013 8:10 pm
Forum: JFreeChart
Topic: DefaultCategoryDataset filled from DB
Replies: 1
Views: 2780

Re: DefaultCategoryDataset filled from DB

Problem line is this:

Code: Select all

dataset = new DefaultCategoryDataset();
You're creating a brand new dataset for each row. Create the dataset before you iterate the rows.
by remiohead
Wed May 08, 2013 8:39 pm
Forum: JFreeChart
Topic: On Zoom, providing more detailed data and stuff
Replies: 2
Views: 3368

Re: On Zoom, providing more detailed data and stuff

There is no specific zoom notification that I can see.You could listen for axis changes, but I'd do it by extending ChartPanel and adding specific zoom events to those methods.

Everything else you mention is absolutely possible and in most cases very easy to do.
by remiohead
Wed May 08, 2013 12:48 pm
Forum: JFreeChart
Topic: Gradient background
Replies: 1
Views: 4904

Re: Gradient background

Code: Select all

ChartUtilities.applyCurrentTheme(chart);
Comment out this line and you'll start to see things work as you expect.
by remiohead
Fri May 03, 2013 6:11 pm
Forum: JFreeChart
Topic: LineFreeChart, passing arrays to dataset.addValue()
Replies: 2
Views: 4018

Re: LineFreeChart, passing arrays to dataset.addValue()

Provide us with some sample values you're passing into the constructor. I'm suspicious about the "counter" argument.
by remiohead
Thu May 02, 2013 6:37 pm
Forum: JFreeChart
Topic: How Do You Use jfreechart In A Java Program?
Replies: 1
Views: 2554

Re: How Do You Use jfreechart In A Java Program?

Can you narrow this down a bit. Which part of the process are you have having trouble with?
by remiohead
Thu Apr 25, 2013 8:47 pm
Forum: JFreeChart
Topic: WaterfallBarRenderer.setSeriesFillPaint() does nothing!
Replies: 5
Views: 6901

Re: WaterfallBarRenderer.setSeriesFillPaint() does nothing!

I agree completely by the way. The class was written by a third party, not David Gilbert, which probably explains the unusual behaviour. I too have written thousands of lines of custom code (and completely new renderers) around the provided classes to get the desired results. Sure I wish I didn't ha...
by remiohead
Wed Apr 24, 2013 9:48 pm
Forum: JFreeChart
Topic: WaterfallBarRenderer.setSeriesFillPaint() does nothing!
Replies: 5
Views: 6901

Re: WaterfallBarRenderer.setSeriesFillPaint() does nothing!

Extend the renderer and add this to the draw method. Very minor changes required.
by remiohead
Wed Apr 24, 2013 7:26 pm
Forum: JFreeChart
Topic: Waterfall chart: 0 values get wrong (last) color!
Replies: 3
Views: 4436

Re: Waterfall chart: 0 values get wrong (last) color!

Zero is neither positive or negative, so the code is explicitly allowing to drop through to use the last bar colour. Not sure if you can say this is a bug.
by remiohead
Wed Apr 24, 2013 7:12 pm
Forum: JFreeChart
Topic: WaterfallBarRenderer.setSeriesFillPaint() does nothing!
Replies: 5
Views: 6901

Re: WaterfallBarRenderer.setSeriesFillPaint() does nothing!

The constructor, or the set methods (setFirstBarPaint(Paint), ...) are the only options. Check the code to WaterfallBarRenderer.java if you want to see it for yourself.
by remiohead
Fri Feb 22, 2013 10:58 pm
Forum: JFreeChart
Topic: change position item values
Replies: 1
Views: 2720

Re: change position item values

An option is to subclass the renderer and override the drawItemLabel() method. You can draw the label wherever you want then.