JFreeChartWrapper, chart causes an Internal Error

I have a CssLayout where I have ja table and a JFreeChartWrapper (displaying a pie chart).
Everything is working fine when I’m testing and running the application on Jetty, but on a server (tomcat) I get an Internal Error when displaying the view where the chart is placed. If I use example a label instead of JFreeChartWrapper, everything is OK.

Have anyone else same kind of experience? What can I do to debug the problem, because I don’t get any detailed information ebout the Internal Error?

I’m using latest version from Vaadin and jfreechartwrapper.

Would it be possible to share an example project that causes the issue for you? Which version of tomcat are you using?

cheers,
matti

I am using tomcat version 9. The problem does not occur anymore. I manage to “solve” it with several clean-build. For the future, how I can add logging for such cases?

Hello. i`m new in vaadin.
I would like be know how add jFreeChart Wrapper to vaadin.ui.panel
when i compile there are an internal error.
java.lang.NoClassDefFoundError: org/apache/batik/svggen/SVGGraphics2DIOException.
My code is:

public void chart() {
XYSeries series = new XYSeries(“Sprint 1”);
series.add(0, 165);
series.add(1, 150);
series.add(2, 130);
XYSeriesCollection dataset = new XYSeriesCollection();
dataset.addSeries(series);
// Generate the graph
JFreeChart chart = ChartFactory.createXYLineChart(“Burn Down Chart”, // Title
“days”, // x-axis Label
“Esimated Effort”, // y-axis Label
dataset, // Dataset
PlotOrientation.VERTICAL, // Plot Orientation
true, // Show Legend
true, // Use tooltips
false // Configure chart to generate URLs?
);

    JFreeChartWrapper wrapper = new JFreeChartWrapper(chart);
    
    /////////////////////////////////////////////
    VerticalLayout v = new VerticalLayout();
    this.addComponent(v);
    v.addComponent(wrapper);
    v.setWidth("100%");

}

Hi Matti.
from the company I am asked to use vaadin boards. Download version 1.0.0 and I’m using vaadin 6.6.7. Is this compatible?
If I open another forum (not to mix issues) because I’m having some errors.
Thanks for answering

Hi Mariana congrats on finding the most awesome UI library!

It looks like you are not having a required Batik library on your project. If you added that as a Maven dependency (?), it should work automatically. If it don’t there is probably a dependency conflict and an incompatible Batik version is on your classpath. Could you share what your pom.xml file contains?

cheers,
matti

Vaadin Board is not available for V6 series, but I guess what you want is Vaadin Charts and that is available for V6 series. It might require more recent V6 version, but updating within major versions is super easy. You can see all this data from vaadin.com/directory

I can use vaadin chart with the vaadin version that I have. Does that add-on have any cost?
Could you give me a simple one-pieChart code?

Another query. Using jFreeChart how can I get the gray background color of the graphic.
cake = ChartFactory.createPieChart3D (null, portions, true, true, false);
torta.setBorderVisible (false);
torta.setBackgroundPaint (Color.WHITE);

That is the square that encompasses everything (OK), but I want the background that contains the graphic that is also white.

https://demo.vaadin.com/charts/#PieChart

Charts is included in the Pro subscription or can be bought separately. See pricing:

https://vaadin.com/pricing

Ok thanks.
I try with for now jFreeChart…

Using jFreeChart how can I get the gray background color of the graphic.
torta = ChartFactory.createPieChart3D (null, portions, true, true, false);
torta.setBorderVisible (false);
torta.setBackgroundPaint (Color.WHITE);

That is the square that encompasses everything (OK), but I want the background that contains the graphic that is also white