How to use a JavaScript chart library like D3.js or Raphaël in server-side Java

前端 未结 3 1105
面向向阳花
面向向阳花 2021-02-04 11:56

I would like to use D3.js (or maybe Raphaël) for backend-generated reports using XSL-FO with Java. These JavaScript libraries should be used for several reasons:

  1. T
3条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-04 12:37

    You could use phantom.js. It's a headless browser based on webkit, which allows you to run JavaScript without the need for a browser.

    Using this you could just execute a system call to run phantom.js with for your JavaScript code and inputs. It would then create your output accordingly. See this example.

提交回复
热议问题