-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
68 lines (65 loc) · 1.82 KB
/
index.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
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
<div id="app">
<h1>{{ message }}</h1>
<apexchart type="heatmap" :options="options" :series="series"/>
</div>
<script src="https://unpkg.com/vue" ></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/apexcharts/3.6.12/apexcharts.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-apexcharts"></script>
<script src="https://annapamma.github.io/vue-heatmap-tutorial/rent-data-62015-62019.js"></script>
<script>
Vue.component('apexchart', VueApexCharts);
const app = new Vue({
el: '#app',
data: {
message: 'My Super Awesome Heatmap',
options: {
dataLabels: {
enabled: false,
},
xaxis: {
labels: {
rotateAlways: true,
rotate: -45,
minHeight: 60,
formatter: function(value, timestamp, index) {
return index % 5 == 0 ? value : ``;
},
},
},
plotOptions: {
heatmap: {
colorScale: {
ranges: [
{
from: 1500,
to: 1999,
color: '#0000ff',
name: '1500 - 1999',
},
{
from: 2000,
to: 3999,
color: '#00A100',
name: '2000 - 3999',
},
{
from: 4000,
to: 5999,
color: '#FFFF00',
name: '4000 - 5999',
},
{
from: 6000,
to: 8000,
color: '#FF0000',
name: '6000 - 8000',
},
],
},
},
}
},
series: rentData,
},
});
</script>