简体   繁体   English

Java应用程序中的D3js

[英]D3js within Java application

What is the best way to embed a D3js visualization within a Java application? 在Java应用程序中嵌入D3js可视化的最佳方法是什么?

Initial thoughts: 初步想法:

There have been related SO questions ( such as this ), I'm looking for solutions specific to supporting D3js. 已经有相关的SO问题( 例如这个 ),我正在寻找特定于支持D3js的解决方案。

I am open to ideas that may not include a full blown web-browser integration, just the minimal set required for D3 visualization. 我愿意接受可能不包括完整的网络浏览器集成的想法,只是D3可视化所需的最小集合。 I'm thinking this would include a Javascript interpreter, DOM manipulation, and an HTML/CSS layout engine such as WebKit. 我认为这将包括一个Javascript解释器,DOM操作和一个HTML / CSS布局引擎,如WebKit。

您可以通过SWT / AWT 使用SWT的浏览器组件

I have used JavaFX and webengine for this. 我已经使用了JavaFX和webengine。 But I am really thinkig about porting d3 to Java ... 但我真的认为将d3移植到Java ...

javafx-d3 - Provides a Java API to use the JavaScript library d3.js with the JavaFx WebView. javafx-d3 - 提供Java API以将JavaScript库d3.js与JavaFx WebView一起使用。

So far this seems to be the best option. 到目前为止,这似乎是最好的选择。

我在没有测试的情况下偶然发现了这个d3js

the best way i have seen till now that importing jxBrowser library and call your html...or what ever extension was to java application. 到目前为止我见过的最好的方法是导入jxBrowser库并调用你的html ...或者扩展到java应用程序。 Later, you play with the Jfram change the size you want and etc.. 之后,你玩Jfram改变你想要的大小等等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM