Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html>
<head>
<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
</head>
<body>
<input type="text" id="S3" value="20,50"></br>
<input type="text" id="S4" value="30,50"></p>
<div id="div1">
</div>
<script type="text/javascript">
$(document).ready(function () {
$("#S3").val(function (i, v) {
return v.replace(",", ".");
});
$("#S4").val(function (i, v) {
return v.replace(",", ".");
});
var chart = new CanvasJS.Chart("div1",
{
title: {
text: "My title"
},
animationEnabled: true,
theme: "theme2",
data: [
{
type: "doughnut",
indexLabelFontFamily: "Garamond",
indexLabelFontSize: 12,
startAngle: 0,
indexLabelFontColor: "dimgrey",
indexLabelLineColor: "darkgrey",
toolTipContent: "{y} %",
dataPoints: [
{ y: $("#S3").val(), indexLabel: "Something1" },
{ y: $("#S4").val(), indexLabel: "Something2" },
]
}
]
});
chart.render();
});
</script>
</body>
</html>
The most helpful JAVASCRIPT solutions