Are javascript chart library customizable or compatible with JavaFX

五迷三道 提交于 2019-12-21 06:07:13

问题


I was wondering if typical javascript topology chart libraries can be easily customized to perform some action when I hover or click on the node object? The libraries I'm currently considering are D3.js, chartjs, and sigma.js and the actions could include calling a Java method through JavaFX. Any suggestions would be appreciated.

Thanks!


回答1:


JavaScript visualization libraries may be integrated with JavaFX via WebView and it's associated Java<->JavaScript bridge technology.

A sample of such integration is this JavaFX application which embed a jQuery DatePicker. OK, so a datepicker is not a chart library, but the general integration principle is the same.

Patrick Martin's Dex project integrates JavaFX (with Groovy) and JavaScript based visualization libraries such as D3.js, so this proves that integration with D3 can occur (though I don't think Patrick makes available the source for the Dex engine which would allow you to see how he does this).

Note that JavaFX includes a native charting library. It's charts tend to be traditional business charts such as line charts, pie charts, etc. rather than vizualization of a mathematical graph.



来源:https://stackoverflow.com/questions/19370769/are-javascript-chart-library-customizable-or-compatible-with-javafx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!