javascript Java 应用程序中的 D3js

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14778493/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-26 22:33:06  来源:igfitidea点击:

D3js within Java application

javajavascriptswingwebd3.js

提问by supyo

What is the best way to embed a D3js visualizationwithin 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. I'm thinking this would include a Javascript interpreter, DOM manipulation, and an HTML/CSS layout engine such as WebKit.

我对可能不包括完整的网络浏览器集成的想法持开放态度,只是 D3 可视化所需的最小集合。我认为这将包括一个 Javascript 解释器、DOM 操作和一个 HTML/CSS 布局引擎,如 WebKit。

回答by serg.nechaev

You could use SWT's browser component via SWT/AWT bridge

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

回答by KIC

I have used JavaFX and webengine for this. But I am really thinkig about porting d3 to Java ...

为此,我使用了 JavaFX 和 webengine。但我真的很想将 d3 移植到 Java ......

回答by blueray

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.

到目前为止,这似乎是最好的选择。

回答by lony

I just stumbled upon this d3jswithout testing it.

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

回答by Abdulkareem Tayeb

the best way i have seen till now that importing jxBrowser library and call your html...or what ever extension was to java application. Later, you play with the Jfram change the size you want and etc..

到目前为止,我所看到的最好的方法是导入 jxBrowser 库并调用您的 html ……或者对 java 应用程序进行任何扩展。稍后,您可以使用 Jfram 更改您想要的大小等等。