<html>
<head>
  <meta charset="UTF-8">
  <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.4/Chart.min.js"></script>
  <style> body {padding: 0; margin: 0;} </style>
</head>

<body>

<input type="file" id="fileinput" />

<select id="chartType">
</select>
<select name="select1" id="select1">
    <option value="">-- select a value --</option>
    <option value="temp">temp</option>
    <option value="humd">humd</option>
    <option value="soil">soil</option>
</select>
<select name="select2" id="select2">
</select>

<canvas id="myChart" width="400" height="200"></canvas>

<pre id="fileDisplayArea"><pre>

<script src="/visualise.js" ></script>

</body>
</html>


<html>
<head>
  <meta charset="UTF-8">
  <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.4/Chart.min.js"></script>
  <style> body {padding: 0; margin: 0;} </style>
</head>

<body>

<input type="file" id="fileinput" />

<select id="chartType">
</select>
<select name="select1" id="select1">
    <option value="">-- select a value --</option>
    <option value="temp">temp</option>
    <option value="humd">humd</option>
    <option value="soil">soil</option>
</select>
<select name="select2" id="select2">
</select>

<canvas id="myChart" width="400" height="200"></canvas>

<pre id="fileDisplayArea"><pre>

<script src="./visualise.js" ></script>

</body>
</html>


Use the visualise.js script in same folder as html (chart) page instead of in the root folder.
Use the visualise.js script in same folder as html (chart) page instead of in the root folder.
