In-depth analysis of charts generated by java/word + fusionchart

Source: Internet
Author: User

A friend uses fusionchart in his project and needs to provide the word download function for multiple reports.
There is no doubt that it is only a very difficult problem.

Fusionchart provides the function of generating images on the server and the client, which is based on the flash display on the client.
My friend's project is based on linux, and the com mechanism of the office itself cannot be called through jacob.
Java-only word, POI, and docx4j operations can generate word Documents, tables, and insert images.

A feasible approachWhen you click to download a report, open the flash charts on a new page, and then call the fusoinchart function to generate images on the server,
Finally, js calls servlet to generate the doc, and inserts each image generated in the previous step into the document.
This curve saves the nation with very low performance ,.

Second ideaIs to insert flash directly into the word, as the form of ole to the word, and mixed with other content. The performance of this method should be OK, and the flash will be rendered in real time after the word is opened.
However, if you find that word uses OLE doc, you cannot use HWPF. You can only spell BIFF files a little bit by yourself. This is really hard to do, and you still don't know if OLE can be displayed.
Give up. PS: It is found that the simple support for ActiveX is provided in the wfe-processing ppt function... I will go ..

Third ideaIt is to get the data of the generated chart and directly use the office chart function. Unfortunately, it is found that this function is not available in HWPF, which is available in HSSF's excel processing function.

The last method is relatively simple and feasible, and the performance is acceptable. The background uses jfreechart to generate images and then generates Word documents.
The downside is that the chart style is different from that of fusion. Jfree is too ugly. However, this method is the most suitable method currently.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.