Google recently added some new features to the
PieChart visualization component and the chartArea configuration option is something I’ve been waiting for. What I’m trying to do is to fit a pie chart in a relatively small space which (I think) isn’t possible at the moment because the chart has way too large margins.
Installed versions:
Visualizations for Vaadin: 1.1.1
GWT Visualization: 1.1.0
Vaadin: 6.4.8
These are the commands I’ve tried so far without success:
We also have that problem in our project. I saw the org.vaadin.vaadinvisualizations.widgetset.client.ui.VPieChart setting the option size to 200x200 in the createOptions() method.
I’ve tried all kind of approaches, but can’t get it to work… Latest attempt was
Since this is something we need, I’ve added support for corecharts and the ChartArea options to the VisualizationForVaadin addon.
When I run the VisualizationForVaadin project and test the new functionality, everything works fine. I then selected “Export” on the project and exported it as a Vaadin Add-On. After that, I use this new jar in my project and can set the new options in the Java code.
Problem
After I start the application with Maven and open the debug window, I see that my new widget client code is not executed.
In case you simply copied the JAR to the project, Maven will not use it. All dependencies must come via the Maven dependency mechanism, so you need to e.g. install the file into your local Maven repository with “mvn install:install-file …” (quite a few options if it was not a Maven project, including -DgeneratePom=true).
Then recompile the widgetset with the usual commands, e.g. “mvn clean compile vaadin:update-widgetset gwt:compile”. Check that your widget is listed in compilation log.
Finally, make sure the compiled widgetset is in a location where the server can find it, and there is no old cached copy etc.
I did install the file to my local maven repo and added its dependency to the pom.
After running all the commands, I get the following *.nocache.js files. I wonder if I need one for my widgetset plus one for the add-on and its dependencies?!
I would be very interested by the PieChart chartArea option too, those margins are so annoying.
But for now I don’t really know what to do with Mike’s patch. Is it possible to find an already patched JAR somewhere?