Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

How to add the d3 javascript librariy to vaadin ?

Deleted User
1 decade ago Jul 01, 2012 5:07pm

Good evening guys,

I'm currently trying to add the visualization functionality of d3 to my vaadin application. If you don't know what d3 is, here is a quick link: http://d3js.org/

Yet I am stuck with some problems:

- How can I add the "d3.v2.js" javascript file/library, that is necessary for developing with d3? I tried adding it to an own theme (WebContent/VAADIN/themes/myOwnTheme/..), but through refreshing I'm getting the message: "Errors occurred during the build. Errors running builder 'JavaScript Validator' on project 'VaadinD3Testproject'. 14". I guess that's because the js-file might be too large with around 8000 lines ? I read about somehow adding the file to the web.xml? Is there a way?

- How can I then add javascript code to my application? After my research I know that there are the options to use:



Label test = new Label("<p onmouseover=\"alert('hello');\">move mouse over here..</p>",Label.CONTENT_XHTML);

--> Are there any other ways to integrate javascript code ?

Could someone help me with an kind of "step by step" explanation, how to solve both ways? Help would really be appreciated here, since I'm not that experienced with this.

Deleted User
1 decade ago Jul 02, 2012 8:54am
Jens Jansson
1 decade ago Jul 02, 2012 7:41pm