Search found 138 matches

by dhchou
Mon Sep 18, 2006 7:23 pm
Forum: JFreeChart
Topic: How to remove an entity from legend in case of Line chart
Replies: 2
Views: 7514

Get the renderer you are you using and then apply the setSeriesVisibleInLegend method.

Daniel
by dhchou
Wed Jun 28, 2006 7:57 pm
Forum: JFreeChart
Topic: Line Chart - bold a certain range grid (the zero line)
Replies: 4
Views: 5539

In that case, remove the code for changing the domain axis stroke. What you wanted to do could be accomplished by using the CategoryPlot.addRangeMarker method. Set the marker value to zero.

Daniel
by dhchou
Tue Jun 27, 2006 5:07 pm
Forum: JFreeChart
Topic: What is this thing? Make it go away!
Replies: 3
Views: 3453

You can set the legend boolean parameter to false when you create the chart.

Daniel
by dhchou
Tue Jun 27, 2006 4:55 pm
Forum: JFreeChart
Topic: Line Chart - bold a certain range grid (the zero line)
Replies: 4
Views: 5539

Bolding the zero line is equivalent to bolding the x-axis. So when you define the x-axis, use:

setAxisLineStroke(Stroke stroke)

Stroke is from Java AWT

Daniel.
by dhchou
Tue Jun 27, 2006 4:30 pm
Forum: JFreeChart
Topic: XYSereies and Legend customisation
Replies: 2
Views: 3416

Suppose renderer is the XYLineAndShapeRenderer of your chart, and you want to disable the series j in the legend. Then you do:

renderer.setSeriesVisibleInLegend(j, new Boolean(false));

Hope this helps.

Daniel
by dhchou
Wed May 31, 2006 8:54 pm
Forum: JFreeChart
Topic: Series break in a line chart
Replies: 4
Views: 5732

Let me clarify what I said. When there is a domain value (usually horizontal axis) but no range value (usually vertical) axis in a XYPlot, then JFreeChart will render a gap in the line. If you do no have data for a particular period, you will know the domain value. Just use null as the range value f...
by dhchou
Wed May 24, 2006 8:27 pm
Forum: JFreeChart
Topic: How to let the line be painted in any Color EXCEPT red?
Replies: 1
Views: 2501

Get the renderer from your plot. Check whether the series color is red by applying the getSeriesPaint method to the renderer. If a series is red, then apply the setSeriesPaint method to the renderer and change it to a different color.

Daniel
by dhchou
Wed May 24, 2006 8:23 pm
Forum: JFreeChart
Topic: scatterplot and linechart
Replies: 4
Views: 5095

JFreeChart does not have a special class for scatter plot. However, you can get the XYLineAndShapeRenderer from your chart using the getPlotRenderer method. Then apply the setShapesVisible and setLinesVisible methods to the renderer to get the plot you want. If renderer is your XYLineAndShapeRendere...
by dhchou
Wed May 24, 2006 8:11 pm
Forum: JFreeChart
Topic: Can I remove a serie that is not visible?
Replies: 1
Views: 2441

You need to get the dataset from your plot instance. Then apply the removeSeries method to your dataset.

Daniel
by dhchou
Tue May 16, 2006 11:03 pm
Forum: JFreeChart
Topic: ValueMarker doesn't show up when outside data value range.
Replies: 3
Views: 4224

You can check whether the value of the ValueMarker is bigger than the highest data point. Then apply the setRange method to your axis to set the upperbound to be the larger of either the ValueMarker or the highest data point. This probably isn't the most efficient solution, but it will do what you w...
by dhchou
Tue May 02, 2006 9:47 pm
Forum: JFreeChart
Topic: Series break in a line chart
Replies: 4
Views: 5732

You simply add a data point that has the x value of the point you want to skip and null for the missing y value. In the plot, points with null values will show up as gaps in the plot.

Daniel
by dhchou
Tue Apr 18, 2006 3:23 pm
Forum: JFreeChart
Topic: Series color
Replies: 5
Views: 5662

Every Plot instance has a renderer. You need to figure out the renderer you are using and apply

getSeriesPaint(int series, java.awt.Paint paint)

Daniel
by dhchou
Fri Apr 07, 2006 8:46 pm
Forum: JFreeChart
Topic: Formatting Questions
Replies: 1
Views: 2811

For the question with the line chart, you might consider using SymbolicAxis.

Daniel
by dhchou
Mon Apr 03, 2006 7:13 pm
Forum: JFreeChart
Topic: LABEL FONT PROBLEM.
Replies: 2
Views: 3537

This is probably not a problem with JFreeChart. I believe this has to do with the way Linux renders fonts. Maybe you should adjust font settings for antialiasing and subpixel smoothing.

Daniel
by dhchou
Fri Mar 17, 2006 7:56 pm
Forum: JFreeChart
Topic: Is there a way to show legent with out the enclosing box?
Replies: 4
Views: 4441

Another way is to specify the border:

LegendTitle legendtitle = (LegendTitle)chart.getLegend();
legendtitle.setBorder(BlockBorder.NONE);

Daniel