-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo1.html
34 lines (31 loc) · 892 Bytes
/
demo1.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MetricFlow</title>
<style>
</style>
<script src="../src/components/metricflow-1.2.0.min.js"></script>
<script>
window.onload = function () {
let metricFlow = MetricFlow("graph")
/*定义节点数据*/
let method1Data= {
"id":"primaryKey",
"title":{'name':"运行时间统计"},
"data":[
{'name':'方法:IndexController#method1'},
{'name':'平均耗时:0.333ms'},
]
};
/*在(20,200)坐标上创建一个节点*/
let node1 = metricFlow.createNode(method1Data,10,200);
}
</script>
</head>
<body>
<!--定义一个画布 graph -->
<div id="graph" height="700px" width="1100px" >
</div>
</body>
</html>