Simple Vaadin application that uses export csv plugin in a chart created using Vaadin Charts
To compile the entire project, run "mvn install".
To run the application, run "mvn jetty:run" and open http://localhost:8080/ .
Debugging client side code
- run "mvn vaadin:run-codeserver" on a separate console while the application is running
- activate Super Dev Mode in the debug window of the application
To produce a deployable production mode WAR:
- change productionMode to true in the servlet class configuration (nested in the UI class)
- run "mvn clean package"
- test the war file with "mvn jetty:run-war"
- Create a Vaadin project using vaadin-archetype-application, add vaadin-charts dependency
- Add
HighchartsPluginResources
class in client package and create aTextResource
for the plugin js file. Add plugin js file in same folder but under src/main/resources. - Create
HighchartsPluginScriptLoader
class extendingHighchartsScriptLoader
. OverrideinjectResources
so that both original and new plugin resources are injected. - In project
widgetset.gwt.xml
file replace the original script loader with extended one:
<replace-with class="uy.com.chartexport.client.HighchartsPluginScriptLoader">
<when-type-is class="com.vaadin.addon.charts.client.HighchartsScriptLoader"/>
</replace-with>
Remember to enable chart exporting.