JAVASCRIPT create userfriendly canvas chart javascript - Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!




Just a Web Code Solution

How to create userfriendly canvas chart using javascript ?


 242

Show ResultJAVASCRIPT


2

<!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>


By     Created   
The power of the user (%)
51%



The most helpful JAVASCRIPT solutions

How to get client machine name or computer name with javascript ?How to get client machine name or computer name with javascript ?JAVASCRIPT

Click to see more ...

  10.3K     390

get client hostname javascriptget client hostname javascriptJAVASCRIPT

Click to see more ...

  3.9K     273

detect ie javascriptdetect ie javascriptJAVASCRIPT

Click to see more ...

  2.3K     187

Create fireworks using javascriptCreate fireworks using javascriptJAVASCRIPT

Click to see more ...

  2.2K     147

fire event when user is idle javascriptfire event when user is idle javascriptJAVASCRIPT

Click to see more ...

  2K     116

create 3d barrel using javascriptcreate 3d barrel using javascriptJAVASCRIPT

Click to see more ...

  1.9K     112

how to create foreach class using javascript ?how to create foreach class using javascript ?JAVASCRIPT

Click to see more ...

  1.6K     109

create qr code javascriptcreate qr code javascriptJAVASCRIPT

Click to see more ...

  1.2K     101

get ip address javascriptget ip address javascriptJAVASCRIPT

Click to see more ...

  1.1K     76

get filename using javascript get filename using javascript JAVASCRIPT

Click to see more ...

  768     63