Search found 7 matches
- Fri Dec 24, 2010 2:49 pm
- Forum: JFreeChart
- Topic: Configure Tick Units of DateAxis
- Replies: 3
- Views: 9796
Re: Configure Tick Units of DateAxis
You can use setDateTickMarkPosition to change to the middle or the end of the tick unit (year in your case). But it's not possible to choose the exact month the DateAxis will use for the tick besides the DateTickMarkPosition. But you can extend the DateAxis and override previousStandardDate method t...
- Fri Dec 24, 2010 2:35 pm
- Forum: JFreeChart
- Topic: Gradient line ?
- Replies: 3
- Views: 6330
Re: Gradient line ?
My suggestion is for creating a new GradientXYLineAndShapeRenderer like this: package org.jfree.chart.demo; import java.awt.Color; import java.awt.GradientPaint; import java.awt.Graphics2D; import java.awt.Paint; import java.awt.geom.Rectangle2D; import org.jfree.chart.plot.PlotRenderingInfo; import...
- Fri Dec 24, 2010 1:05 pm
- Forum: JFreeChart
- Topic: AxisTrace is not erased after showing a tooltip
- Replies: 2
- Views: 5368
Re: AxisTrace is not erased after showing a tooltip
It's not a class but rather two different boolean properties of ChartPanel: /** A flag that controls whether or not horizontal tracing is enabled. */ private boolean horizontalAxisTrace = false; /** A flag that controls whether or not vertical tracing is enabled. */ private boolean verticalAxisTrace...
- Fri Dec 24, 2010 12:12 pm
- Forum: JFreeChart
- Topic: Why does the chart refresh all items every time?
- Replies: 3
- Views: 7185
Re: Why does the chart refresh all items every time?
Hi, JFreeChart was not designed for real time charts. It's int the FAQ: 5. Does JFreeChart support real-time charting? Not really. JFreeChart includes an event-notification mechanism that ensures that charts are updated whenever the dataset is updated. However, the chart is completely repainted for ...
- Thu Dec 23, 2010 7:43 pm
- Forum: JFreeChart
- Topic: Gradient Look For AreaChart
- Replies: 1
- Views: 3743
Re: Gradient Look For AreaChart
Hi, I'm still learning JFreechart so my answer might not be the right solution. You can set the Paint used by the renderer as follows: XYItemRenderer renderer = plot.getRenderer(); renderer.setSeriesPaint(seriesIndex, paint); where: seriesIndex: the index of the series you want to set the paint pain...
- Thu Dec 23, 2010 2:04 pm
- Forum: JFreeChart
- Topic: Configure Tick Units of DateAxis
- Replies: 3
- Views: 9796
Re: Configure Tick Units of DateAxis
Hi, All you have to do is to override the date formatter from the DateAxis, like this: DateFormat formatter = new SimpleDateFormat("yyyy"); DateAxis axis = (DateAxis) plot.getDomainAxis(); axis.setDateFormatOverride(formatter); But you can also set the tick unit with the formatter, if you don't want...
- Thu Dec 23, 2010 1:42 pm
- Forum: JFreeChart
- Topic: AxisTrace is not erased after showing a tooltip
- Replies: 2
- Views: 5368
AxisTrace is not erased after showing a tooltip
Hi, I would like to enable a crosshair that changes with the mouse and not only when the chart is clicked. The simplest way seems to be to use HorizontalAxisTrace and VerticalAxisTrace. It works fine until a tooltip is shown. In that case the last trace drawn is not removed. Seems like a bug in the ...