summaryrefslogtreecommitdiff
path: root/addicted-brands.html
blob: cc7476c7001089344f461994101dc538affe68e4 (plain)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Addicted Brands</title>
</head>
<style>
html, body {
    padding: 0;
    margin: 0;
}
#legenda { display: none; }
/*
#legenda {
    position: fixed;
}
#legenda span {
    color: white;
    width: 100px;
    display: block;
}
#charts {
    margin-left: 100px;
}
*/
/* graphs and bars */
.graph {
    position: relative;
    height: 200px;
    background: #eee;
    padding: 5px;
    margin: 3px;
    width: 300px;
    display: inline-block;
    border-radius: 16px;
}
body { counter-reset: ht; }
.graph .hashtag:before {
    counter-increment: ht;
    content: counter(ht) ' #';
}
.graph .hashtag {
    font-weight: bold;
    text-shadow: #ccc -1px -1px;
}
.graph .bar {
    text-align: center;
    background: red;
    position: absolute;
    width: 40px;
    bottom: 1em;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}
.graph .perc {
    position: absolute;
    top: -1em;
}
.graph .details {
    color: white;
    text-shadow: #999 0 0 9px;
}
.graph .brand {
    position: absolute;
    bottom: -1em;
    font-size: smaller;
    left: 0;
}
</style>
<link rel="stylesheet" href="svg.css">
<body>

<div id="legenda"></div>
<div id="charts"></div>

<script src="lib/d3.js"></script>
<script src="js/addicted-brands.js"></script>
</body>
</html>