I’d like to use visjs-addon and tried to compile a weidgetset including the addon Maven dependency, but it seems I am missing something.
vaadin:update-widgetset does not find the widgetset in org.vaadin.addon:visjs-addon. By looking at the jar there’s no gwt.xml file anywhere so I can not include it manually either.
I’d appreciate if anyone can give me a clue as to how to include this addon in my widgetset.
Came up with a solution. I have created org.vaadin.visjs.networkDiagram.NetworkDiagram.gwt.xml under src/main/resource in the XXX-widgetset module (I am using vaadin-archetype-application) and added
to the MyAppWidgetset.gwt.xml. This seemed to work fine - I can see te diagram after recompiling the widget-set.
this addon does not have any ui elements. Therefore no need to compile as a widget.So there is no gwt.xml.
if you go to the visjs-connector.js in source code, you can see how the network is generated.
network is generated by using the layout you put the diagram.Rest of the drawing is done in tha html canvas element.so there are no ui components in this library.
to use the library you just have to include it in the path.if you are using maven you just have to use
org.vaadin.addon
visjs-addon
1.0.0.4
vaadin-addons
http://maven.vaadin.com/vaadin-addons
in your pom file.
then you can create new diagram and add it to the layout you choose.
Options options = new Options(); NetworkDiagram networkDiagram = new NetworkDiagram(options); networkDiagram.setSizeFull(); addComponent(networkDiagram);