Search found 50 matches

by tedbyers
Wed Jun 10, 2009 3:58 pm
Forum: JFreeChart
Topic: One problem remaining with my legend
Replies: 2
Views: 1038

Re: One problem remaining with my legend

Thanks for your reply. These options help, but don't quite solve the problem. XYLineAndShapeRenderer.setLegendLine(Shape line); almost does it, but what I get is a rectangle with the border in the colour and the interior white. But I made it servicable by using a height argument equal to 1. That cre...
by tedbyers
Thu Jun 04, 2009 9:45 pm
Forum: JFreeChart
Topic: One problem remaining with my legend
Replies: 2
Views: 1038

One problem remaining with my legend

OK, after a little trial and tribulation, I have it all working, as far as my legend goes. The lines on the chart are fine, and their respective colours are easy to identify. However, the lines used for the legend are much too short and thin for me to easily see what the colour is. How does one thic...
by tedbyers
Thu Jun 04, 2009 8:29 pm
Forum: JFreeChart
Topic: How do cahnge the pallete used by a renderer?
Replies: 2
Views: 1174

Re: How do cahnge the pallete used by a renderer?

Well, I found two logical places to handle this. The first is the DefaultDrawingSupplier class, but it does not provide an interface for changing the pallete. Since a 'setPallete(java.awt.Paint[] v)' function isn't there, where is it. Or do I have to extend the DefaultDrawingSupplier class and the r...
by tedbyers
Thu Jun 04, 2009 6:00 pm
Forum: JFreeChart
Topic: How do cahnge the pallete used by a renderer?
Replies: 2
Views: 1174

How do cahnge the pallete used by a renderer?

Actually, I have three questions. The first is in the subject line. If I create a java.util.Vector<Color>, how can I use it to change the default pallete the renderer uses. I really don't care what colour is used for a given series. I just don't want certain colours used. For example, I have a custo...
by tedbyers
Thu Jul 31, 2008 9:08 pm
Forum: JFreeChart
Topic: How to add a source to a legend?
Replies: 2
Views: 1175

Thanks Dave Using "setSeriesVisibleInLegend()" on the renderer for the plot of interest did the trick. If ever I get time, instead of writing a custom LegendItemSource that is specific to a given situation, like mine, I'd look at writing one for combination plots that look at the items in the plots ...
by tedbyers
Wed Jul 30, 2008 9:18 pm
Forum: JFreeChart
Topic: How to add a source to a legend?
Replies: 2
Views: 1175

How to add a source to a legend?

I create my legend as follows: org.jfree.chart.title.LegendTitle aLegend = new org.jfree.chart.title.LegendTitle(ReturnsPlot); And then I work with it. This is for a combo lot, which is created as follows. org.jfree.chart.plot.CombinedDomainXYPlot cplot = new org.jfree.chart.plot.CombinedDomainXYPlo...
by tedbyers
Fri May 16, 2008 4:51 am
Forum: JFreeChart
Topic: Mysterious invisible chart :-9
Replies: 0
Views: 518

Mysterious invisible chart :-9

I don't understand this. Similar logic does not produce the expected outcome. Here are two functions that generate charts: private static JFreeChart createChart(String lbl, double lb, double ub, double value) { DefaultValueDataset dataset = new DefaultValueDataset(value); ThermometerPlot plot = new ...
by tedbyers
Thu May 15, 2008 9:33 pm
Forum: JFreeChart
Topic: Two quick questions about XYBarCharts
Replies: 7
Views: 1167

One last question, I hope. I have created a decent 2D bar chart with timer series data. I used: TimeSeriesCollection TimeSeries ChartFactory.createXYBarChart org.jfree.chart.axis.DateAxis axis = (org.jfree.chart.axis.DateAxis) plot.getDomainAxis(); axis.setTickMarkPosition(org.jfree.chart.axis.DateT...
by tedbyers
Thu May 15, 2008 9:19 pm
Forum: JFreeChart
Topic: Two quick questions about XYBarCharts
Replies: 7
Views: 1167

What are the lower and upper margins for the axis? If you reduce these, the extra labels will probably disappear. I used the defaults. The time series gets only month objects. that is why I was surprised that the month before the series starts and the month after it ends appear as markers. A puzzle...
by tedbyers
Thu May 15, 2008 8:34 pm
Forum: JFreeChart
Topic: Two quick questions about XYBarCharts
Replies: 7
Views: 1167

Re: Two quick questions about XYBarCharts

2) The labels appear correctly centred above, or below, the bar. However, the domain axis markers appear only at the edges of the bars. The dataset is a time series collection BTW, if that matters. So, the marker for January 2000 appears on the left edge of the bar representing the gain for that mo...
by tedbyers
Thu May 15, 2008 6:41 pm
Forum: JFreeChart
Topic: Two quick questions about XYBarCharts
Replies: 7
Views: 1167

Two quick questions about XYBarCharts

1) The charts appear fine now, with the labels. The labels are, in fact doubles to be interpreted as percent. Is there an easy way to tack the '%' character onto the end of the label produced by the default generator? In other charts, where the figures are currency, is there a similarly easy way to ...
by tedbyers
Thu May 15, 2008 5:23 pm
Forum: JFreeChart
Topic: Why don't my item labels appear?
Replies: 4
Views: 1252

skunk wrote:

Code: Select all

org.jfree.chart.labels.StandardXYItemLabelGenerator
Perfect!

Thanks.

Ted
by tedbyers
Thu May 15, 2008 5:11 pm
Forum: JFreeChart
Topic: Why don't my item labels appear?
Replies: 4
Views: 1252

Probably the baseItemLabelGenerator for the renderer is null (the default, although it would probably be better to have a non-null default). I recall seeing a function to set the baseItemLabelGenerator, but it didn't seem to like any argument I passed to it (based on what I saw in the demos). The e...
by tedbyers
Thu May 15, 2008 4:15 pm
Forum: JFreeChart
Topic: Why don't my item labels appear?
Replies: 4
Views: 1252

Why don't my item labels appear?

Here is a little code snippet: org.jfree.chart.plot.XYPlot plot = (org.jfree.chart.plot.XYPlot) theChart.getPlot(); org.jfree.chart.renderer.xy.XYBarRenderer renderer = (org.jfree.chart.renderer.xy.XYBarRenderer) plot.getRenderer(); renderer.setDrawBarOutline(false); renderer.setSeriesPaint(0, dg); ...
by tedbyers
Thu Apr 03, 2008 7:42 pm
Forum: JFreeChart
Topic: Array of Charts?
Replies: 2
Views: 853

Thank you Richard. I'll take a look. I'll lt you know if I encounter any trouble.

Cheers

Ted