when I add
plot.addRangeMarker(new ValueMarker(0.0));
or
NumberAxis valueAxis = new NumberAxis(valueAxisLabel);
valueAxis.setAutoRangeIncludesZero(true);
when I print from the right click menu, it is sending huge bytes to the printer
you can reproduce this problem with TimeSeriesDemo12.java
add a point s2.add(new Minute(30, 9, 7, 12, 2003), -0.5); below 0.0 to see the effect.
[code] private static XYDataset createDataset() {
TimeSeriesCollection dataset = new TimeSeriesCollection();
TimeSeries s1 = new TimeSeries("Series 1", Minute.class);
s1.add(new Minute(0, 0, 7, 12, 2003), 1.2);
s1.add(new Minute(30, 12, 7, 12, 2003), 3.0);
s1.add(new Minute(15, 14, 7, 12, 2003), 8.0);
TimeSeries s2 = new TimeSeries("Series 2", Minute.class);
s2.add(new Minute(0, 3, 7, 12, 2003), 0.0);
s2.add(new Minute(30, 9, 7, 12, 2003), -0.5);
s2.add(new Minute(15, 10, 7, 12, 2003), 0.0);
dataset.addSeries(s1);
dataset.addSeries(s2);
return dataset;
}[/code]
[code]
plot.addRangeMarker(new ValueMarker(0.0));
[/code]
JFreeChart Printing Problem sending huge data to printer
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Does this problem *only* occur when you add in a negative value? Have you tried different JRE versions? What is your printer? Which operating system (and version) do you use? Have you modified anything else on the chart (any GradientPaint for example)?
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
This is caused by the Printing system of the JDK. Postscript (which is used as backend language) is not able to express Alpha-values on colors, so as soon as you start using transparency, the backend switches from Vector-Graphics into Raster-Image mode.
Another reason for large spool-files can be the use of non-printer fonts. In that case, the fonts get embedded as shapes, which increases the size of the spool-file as well.
However, in almost all cases I had to fix this class of problems in the reporting engine, it turned out that someone used transparent colors.
Another reason for large spool-files can be the use of non-printer fonts. In that case, the fonts get embedded as shapes, which increases the size of the spool-file as well.
However, in almost all cases I had to fix this class of problems in the reporting engine, it turned out that someone used transparent colors.