-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
62 lines (59 loc) · 1.51 KB
/
index.html
File metadata and controls
62 lines (59 loc) · 1.51 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE html>
<html>
<head>
<title>Demo page</title>
</head>
<body>
<script src="libs/d3/d3.min.js"></script>
<script src="src/d3infographics.js"></script>
<div id="viz-holder"></div>
<script>
var infographic = d3i.createInstance();
infographic.createCanvas({
container: '#viz-holder',
width: 500,
height: 500
}).addBackground({
color: {
value: 'rgb(76,175,80)',
opacity: 1
},
pattern: {
url: 'http://www.w3schools.com/tags/img_lamp.jpg',
repeat: true,
x: 50,
y: 50,
width: 400,
height: 400,
opacity: 0.5
},
image: {
url: 'http://www.w3schools.com/tags/img_the_scream.jpg',
x: 80,
y: 80,
opacity: 0.7
}
})
.addImage({
url: 'http://batman-news.com/wp-content/uploads/2014/01/logo-snb.png',
x: 100,
y: 100,
border: {
color: '#FF0000',
width: 20
}
})
.addText({
text: 'Batman fan here!',
size: 20,
style: 'bold',
x: 250,
y: 250,
color: 'rgb(255,25,25)',
font: 'Courier',
opacity: 1,
align: 'center'
}).render();
</script>
</body>
</html>