I'm making live changing graph site using Chart.js Because I'm a noob in Js and HTML, I don't know how to post value on site. I want to post with python. I'll show you my example chart code. please tell me how to post data on my pc to the server.
And data that I want to post is "data: [860,1140,1060,1060,1070,1110,1330,2210,7830,2478]".
<html>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.min.js"></script>
<body>
<canvas id="myChart" style="width:100%;max-width:600px"></canvas>
<script>
var xValues = [100,200,300,400,500,600,700,800,900,1000];
new Chart("myChart", {
type: "line",
data: {
labels: xValues,
datasets: [{
data: [860,1140,1060,1060,1070,1110,1330,2210,7830,2478],
backgroundColor: "rgba(0,0,255,1.0)",
borderColor: "rgba(0,0,255,0.1)",
fill: false,
tension:0.1
}]
},
options: {
legend: {display: false}
}
});
</script>