Skip to content

Instantly share code, notes, and snippets.

@mulderu
Created January 23, 2019 04:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mulderu/273f24ce129331f1b98229f4678092e1 to your computer and use it in GitHub Desktop.
Save mulderu/273f24ce129331f1b98229f4678092e1 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/nificif
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<link href="https://code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css" rel="stylesheet" type="text/css" />
<script src="https://code.jquery.com/jquery-3.1.0.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
</head>
<body>
<div id="canvas_container">
</div>
<script id="jsbin-javascript">
$(document).ready(function() {
var paper = new Raphael(document.getElementById('canvas_container'), 2000, 2000);
let data = [ 'L1 to NB (angular)',
'Angle A-B, C-D',
[ 1255, 1570 ],
[ 1304, 817 ],
[ 1244, 1526 ],
[ 1280, 1387 ],
-10.79698772142035 ];
data.slice(2,6).forEach((d, i)=>{
console.log(d,i)
paper.circle(d[0]/5, d[1]/5, 5).attr({hue: .45});
paper.text(d[0]/5, d[1]/5, i);
})
});
</script>
<script id="jsbin-source-javascript" type="text/javascript">$(document).ready(function() {
var paper = new Raphael(document.getElementById('canvas_container'), 2000, 2000);
let data = [ 'L1 to NB (angular)',
'Angle A-B, C-D',
[ 1255, 1570 ],
[ 1304, 817 ],
[ 1244, 1526 ],
[ 1280, 1387 ],
-10.79698772142035 ];
data.slice(2,6).forEach((d, i)=>{
console.log(d,i)
paper.circle(d[0]/5, d[1]/5, 5).attr({hue: .45});
paper.text(d[0]/5, d[1]/5, i);
})
});
</script></body>
</html>
$(document).ready(function() {
var paper = new Raphael(document.getElementById('canvas_container'), 2000, 2000);
let data = [ 'L1 to NB (angular)',
'Angle A-B, C-D',
[ 1255, 1570 ],
[ 1304, 817 ],
[ 1244, 1526 ],
[ 1280, 1387 ],
-10.79698772142035 ];
data.slice(2,6).forEach((d, i)=>{
console.log(d,i)
paper.circle(d[0]/5, d[1]/5, 5).attr({hue: .45});
paper.text(d[0]/5, d[1]/5, i);
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment