Search found 497 matches
- Tue Nov 17, 2009 3:04 pm
- Forum: JFreeChart
- Topic: TimeTableXYDataset: tick labels wrong (Month +1!)
- Replies: 4
- Views: 4844
TimeTableXYDataset: tick labels wrong (Month +1!)
To support multiple bars in a chart with a time axis, I had to change the dataset to the new TimeTableXYDataset structure. But now the time axis shows the labels shifted to the right! I.e. the tick for February now displays "January", etc. :( The values are 2008-12-31 100.0 2009-01-31 105.7 2009-02-...
- Thu Nov 05, 2009 12:21 pm
- Forum: JFreeChart
- Topic: How do I skip legend color.
- Replies: 3
- Views: 4072
Re: How do I skip legend color.
Of course:
Code: Select all
final XYPlot xyPlot = chart.getXYPlot();
final XYItemRenderer xyir = xyPlot.getRenderer(indexDataset);
if (xyir != null) { //valid indexDataset?
xyir.setSeriesPaint(seriesIndex, color);
}
- Wed Nov 04, 2009 11:37 am
- Forum: JFreeChart
- Topic: TimeTableXYDataset with StackedBars: range y axis too small
- Replies: 1
- Views: 2340
Re: TimeTableXYDataset with StackedBars: range y axis too small
Okay, I found the new method DatasetUtilities
.findStackedRangeBounds(TableXYDataset dataset).
.findStackedRangeBounds(TableXYDataset dataset).
- Tue Nov 03, 2009 7:20 pm
- Forum: JFreeChart
- Topic: TimeTableXYDataset cannot be cast to RangeInfo
- Replies: 0
- Views: 1747
TimeTableXYDataset cannot be cast to RangeInfo
I try to find the maximum value of a TimeTableXYDataset - for a stacke (bar) chart. So far I use DatasetUtilities.findMaximumRangeValue(xyds) but this doesn't work for stack charts. So I tried final RangeInfo ri = (RangeInfo) dataset; ri.getRangeUpperBound(true) but this leads to java.lang.ClassCast...
- Tue Nov 03, 2009 5:29 pm
- Forum: JFreeChart
- Topic: Bar / Line Chart misalignment
- Replies: 30
- Views: 28554
Re: Bar / Line Chart misalignment
Oh boy, this bug comes up again: to "fix" a chart with a time axis and stacked bars, I need the TimeTableXYDataset. After using this, my bars get finally stacked when using StackedXYBarRenderer. But now the bars are very thin (again) ... I thought the reason was this timePeriod for the TimeTableXYDa...
- Tue Nov 03, 2009 3:30 pm
- Forum: JFreeChart
- Topic: TimeTableXYDataset with StackedBars: range y axis too small
- Replies: 1
- Views: 2340
TimeTableXYDataset with StackedBars: range y axis too small
I need to change a TimeSeriesChart (time x axis) that had bars to multiple stacked bars. Unfortunately, when I set the StackedBarRenderer, I get an exception: java.lang.ClassCastException: org.jfree.data.xy.XYBarDataset cannot be cast to org.jfree.data.xy.TableXYDataset at org.jfree.chart.renderer.x...
- Tue Jun 16, 2009 9:29 pm
- Forum: JFreeChart
- Topic: 1.0.13: scatter chart null background color shows chart col
- Replies: 2
- Views: 3055
Re: 1.0.13: scatter chart null background color shows chart col
Hm, I understand. It would be nice, if the plot background could be set to transparent without seeing the chart background. Reason: the chart "frame" around the plot should have a color (grey) and the plot should be "white" - but not exactly white as the paper, the chart is printed on is not white. ...
- Tue Jun 16, 2009 9:29 am
- Forum: JFreeChart
- Topic: 1.0.13: scatter chart null background color shows chart col
- Replies: 2
- Views: 3055
1.0.13: scatter chart null background color shows chart col
JFreeChart 1.0.13: I have a scatter plot with a null background color. This results in the plot background color being the same color as the chart background color. Is this as expected or should the transparency "look through" the whole chart (ignoring the chart background color)?
- Thu Mar 05, 2009 10:38 pm
- Forum: JFreeChart
- Topic: Bar / Line Chart misalignment
- Replies: 30
- Views: 28554
Re: Bar / Line Chart misalignment
I found the problem: I set the bar width workaround for the renderer by getting the renderer without the renderer index - so it only was effective for the first plot/renderer. I changed my code to loop through all available renderers (with index paramater) to catch all possible bar plots. Sorry, for...
- Thu Mar 05, 2009 2:22 pm
- Forum: JFreeChart
- Topic: Bar / Line Chart misalignment
- Replies: 30
- Views: 28554
- Tue Feb 24, 2009 12:30 pm
- Forum: JFreeChart
- Topic: Bar / Line Chart misalignment
- Replies: 30
- Views: 28554
Unfortunately, the bar's width workaround only works with the first dataset. If I have 2 datasets, the bars widths are "100%", i.e. the bars touch themselves. I create the XYBarDataset with the same method: final IntervalXYDataset ixyd = getXYDataset(datarowsXValues, datarowsYValues, datarowsName, "...
- Wed Feb 11, 2009 10:25 am
- Forum: JFreeChart
- Topic: Legend bar item not aligned for small fonts.
- Replies: 4
- Views: 4114
- Fri Feb 06, 2009 10:37 am
- Forum: JFreeChart
- Topic: Legend bar item not aligned for small fonts.
- Replies: 4
- Views: 4114
test case
I was able to write a little test method that shows the effect: /** * The bar in the legend is too big and top aligned. * * @return JFreeChart. */ private JFreeChart testLegend1() { JFreeChart result = null; final XYSeriesCollection xysc = new XYSeriesCollection(); final XYSeries s1 = new XYSeries("...
- Wed Feb 04, 2009 3:30 pm
- Forum: JFreeChart
- Topic: Bar / Line Chart misalignment
- Replies: 30
- Views: 28554
You were right: this pesky little ".0" solved the multiplication overflow: result = new XYBarDataset(ixyd, 30.0 * ICConstants.MILLISECONDS_DAY); Now it finally works as expected. Including the working XYBarRenderer.setMargin(). Now, I will rethink my usage of TimeSeriesCollections as I thought, this...
- Wed Feb 04, 2009 3:17 pm
- Forum: JFreeChart
- Topic: Bar / Line Chart misalignment
- Replies: 30
- Views: 28554
This is strange: I play around with the second parameter of XYBarDataset, but I can only grow the bar's width's to about half the period size (half a month) or a little wider. new XYBarDataset(xysc, 10 * ICConstants.MILLISECONDS_DAY); new XYBarDataset(xysc, 20 * ICConstants.MILLISECONDS_DAY); new XY...