I want d3 to work badly. I have this JFXPanel which displays a html page, which references d3.js. It is almost a duplicate of my other question but have not received much response - How to determine if i have implemented d3 correctly?
Went to research on JavaFX, WampServer, D3.js (all due to recommendations) on top of much troubleshooting but still no avail. All I need is the HTML page to display some visual elements & im all set to proceed further. Can someone pls tell me why i cannot reference any d3 elements with the following, after every period? The website run on WampServer does not display as expected as well.
- jfxpanel in a swing project, eclipse, where jfxpanel runs html page.
- html page and d3.js are in the same folder.
- i can see the source of 'd3.js' when i 'inspect element' @ the html page.
- i will not see the source if i set the src to 'd3.v3.js'
- html elements (not within js) are working properly though.
Code:
<!DOCTYPE html>
<html lang = "en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta content="utf-8" http-equiv="encoding">
<title>D3 test</title>
<script type = "text / javascript" src= "d3.js"></script>
</head>
<body>
<p></p>
<script type = "text / javascript">
d3.select("body").append("p").text("Hello, world!");
</script>
</body>
</html>