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 display Charts within Vaadin Spreadsheet

rajendraprasad alladi
6 years ago Oct 26, 2016 6:34am

I have vaadin spreadsheet  and Charts license,
I am using Spreadsheet Version 1.2.2  and Charts 3.2.
Now My requirement is Including charts in Vaadin Spreadsheet. 
I am able to create charts and spreadsheet in sepeate layouts, unable to combine them together.
Gone through Vaadin Book we got Vaadin-Speadsheet-charts addon added those addon in pom.xml same as the spreadsheet vesion (1.2.2).

There is no examples for  how to use the Vaadin-SpreadSheet-Charts  anywhere.  

thanks in advance  


Adil Rizwan Mohammad
6 years ago Oct 26, 2016 6:40am

even i am looking for the same solution. gone through this link but unable to find integration of vaadin chart within vaadin spreadsheet
Thanks in advance

Jens Jansson
6 years ago Oct 26, 2016 6:55am

The integration of charts to spreadsheet is quite simple. In your pom.xml (assuming you use Maven), you just have change your dependency from vaadin-spreadsheet to vaadin-spreadsheet-charts (just add -charts in the end). vaadin-spreadsheet-charts depends on both vaadin-spreadsheet and vaadin-charts, all you need in is the vaadin-spreadsheet-charts dependency. It should still work jsut as well even if you explicitely add the others there.

After that, any XLSX file that includes Excel defined charts will be rendered with the help of Vaadin Charts. If this is not the case, then I'd like to hear more on what is happening.

The documentation for the integration can be found here: https://vaadin.com/docs/-/part/spreadsheet/spreadsheet-quickstart.html

Adil Rizwan Mohammad
6 years ago Oct 31, 2016 11:36am

thanx Jens Jansson as am using MAVEN, followed the same steps as you mentioned, now am able to display charts within spreadsheets cells using SpreadsheetComponentFactory interface. But after writing into the XLSX file am able to get whole data including styles, numeric values but charts are not displaying.

Thanks in advance

rajendraprasad alladi
6 years ago Nov 03, 2016 6:51am

Thnaks Jens Jansson,

Now I Can able to display the Vaadin Components (Charts and Combobox) in Spreadsheet  using SpreadsheetComponentFactory interface. 

Now am using only Vaadin-Spreadsheet-Charts (Version 1.2.2) addon and removed vaadin-spreadsheet addon .

Now am successfully able to display charts in Spreadsheet cells and Spreadsheet within vaadin Window.

But the issue is, if we download this spreadsheet into XLSX file, In that XLSX file Content and styles are displaying, But Charts are not dispaying.

My requirement is Along with the data, charts also should download.   

Where I am creating a file and Outputstream object and 
writing the content as using Spreadsheet.write(out); method.

Thank you in advance.

rajendraprasad alladi
6 years ago Nov 04, 2016 4:47am

Any body know the solution for this problem give replay,
This is necessary for me ...


rajendraprasad alladi
6 years ago Nov 05, 2016 8:13am