function sample() {
var a=new Array();
a[1] = 100;
a[2] = 200;
a[3] = 300;
a[4] = 400;
var container = document.getElementById('memo');
var items = [
{ x: '100', y: a[1] },
{ x: '110', y: a[2] },
{ x: '120', y: a[3] },
{ x: '130', y: a[4] },
{ x: '140', y: a[4] },
{ x: '150', y: a[4] }
];
var dataset = new vis.DataSet(items);
var options = {};
dataset.add([{ x: '250', y: a[2] }]);
var graph2d = new vis.Graph2d(container, dataset, options);
}
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<title>svgの練習</title>
<script src="sample.js"></script>
<script src="jquery.js"></script>
<script src="vis.js"></script>
<link href="vis.css" rel="stylesheet" type="text/css" />
<title>パチンコ</title>
</head>
<body onload="sample()">
<p id="memo"></p>
</body>
</html>
最終更新:2016年03月02日 01:53