WICO Burn Tracker
& Charts
Last 7 days
0
WICO Burned
WICO Circulation Supply
0
Total Supply: 21.00 M
Last Update: UTC
Realtime WICO Burn Chart
WICO 10 Recent Burns
# |
WICO Burned Amount |
% Total |
Wallet Address |
|
What is WICO
What is WICO
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
WICO Heat Map
let chart = hexmap();
d3.select("#vis")
.call(chart);
function hexmap() {
// private variables
var svg = undefined;
var dispatch = d3.dispatch("customHover");
// getter setter defaults
var opts = {
width: 925,
height: 645,
margin: {top: 20, right: 10, bottom: 20, left: 10}
};
var hexbin = d3.hexbin()
.size([opts.width, opts.height])
.radius(7);
//________________________________________________
// RENDER
//________________________________________________
function exports(_selection) {
var canvas = _selection
.append("canvas")
.attr("width", opts.width)
.attr("height", opts.height)
.attr("id", "mapCanvas");
var context = canvas
.node()
.getContext("2d");
var points = [];
var hexagons = [];
var hexagon_empty = [];
var projection = d3.geo.mercator()
.rotate([0, 0])
.scale(145)
.center([15, 65]);
context.fillStyle = "tomato";
context.strokeStyle = "none";
var path = d3.geo.path()
.projection(projection)
.context(context);
// Load world data using d3.json
d3.json("https://wincoins.org/ui/heatmap/world_map_data.json", function (error, world) {
if (error) throw error;
path(topojson.feature(world, world.objects.land));
context.fill();
// use the canvas as the image
var image = document.getElementById("mapCanvas");
context.drawImage(image, 0, 0, opts.width, opts.height);
image = context.getImageData(0, 0, opts.width, opts.height);
// rescale the colors
for (var c, i = 0, n = opts.width * opts.height * 4, d = image.data; i < n; i += 4) {
var x = i / 4 % opts.width;
var y = Math.floor(i / 4 / opts.width);
points.push([x, y, d[i]]);
}
hexagons = hexbin(points);
const wicoData = [
{
"coords": [763.8344061378749,261],
"color": "blue",
"tooltip": "Object 1"
},
{
"coords": [571.5767664977295,396],
"color": "red",
"tooltip": "Object 2"
},
{
"coords": [691.0882722199821,387],
"color": "green",
"tooltip": "Object 3"
},
{
"coords": [555.9883092296096,297],
"color": "yellow",
"tooltip": "Object 4"
},
{
"coords": [488.4383277344234,396],
"color": "orange",
"tooltip": "Object 5"
},
{
"coords": [52.520008, 13.404954],
"color": "purple",
"tooltip": "Object 6"
},
{
"coords": [59.329323, 18.068581],
"color": "pink",
"tooltip": "Object 7"
},
{
"coords": [41.385064, 2.173403],
"color": "blue",
"tooltip": "Object 8"
},
{
"coords": [-33.867856, 151.207416],
"color": "red",
"tooltip": "Object 9"
},
{
"coords": [45.421532, -75.697189],
"color": "green",
"tooltip": "Object 10"
},
{
"coords": [55.755825, 37.617298],
"color": "yellow",
"tooltip": "Object 11"
},
{
"coords": [19.076090, 72.877426],
"color": "orange",
"tooltip": "Object 12"
},
{
"coords": [1.352083, 103.819839],
"color": "purple",
"tooltip": "Object 13"
},
{
"coords": [59.913869, 10.752245],
"color": "pink",
"tooltip": "Object 14"
},
{
"coords": [51.507351, -0.127758],
"color": "blue",
"tooltip": "Object 15"
},
{
"coords": [48.856613, 2.352222],
"color": "red",
"tooltip": "Object 16"
},
{
"coords": [52.520008, 13.404954],
"color": "green",
"tooltip": "Object 17"
},
{
"coords": [59.329323, 18.068581],
"color": "yellow",
"tooltip": "Object 18"
},
{
"coords": [41.385064, 2.173403],
"color": "orange",
"tooltip": "Object 19"
},
{
"coords": [-33.867856, 151.207416],
"color": "purple",
"tooltip": "Object 20"
}
];
hexagons.forEach(function (d) {
d.mean = d3.mean(d, function (p) {
return p[2];
});
});
var svg = _selection
.append("svg")
.attr("width", opts.width)
.attr("height", opts.height);
var hexagon = svg
.append("g")
.attr("class", "hexagons")
.selectAll("path")
.data(hexagons)
.enter()
.append("path")
.attr("d", hexbin.hexagon(4.5))
.attr("transform", function (d) {
return "translate(" + d.x + "," + d.y + ")";
})
.style("fill", function (d) {
const countryData = wicoData.find(country => country.coords[0] === d.x && country.coords[1] === d.y);
if(countryData){
var colorval = countryData ? countryData.color : "#2B2C32";
return colorval;
} else if (d.mean === 0) {
return "transparent";
} else{
return "#2B2C32";
}
})
.on("resize", function() {
var targetWidth = svg.node().getBoundingClientRect().width;
svg.attr("width", targetWidth);
svg.attr("height", targetWidth / aspect);
})
//.style("stroke", "transparent")
.on("click", d => {
alert( [d.x,d.y]);
/* const countryData = wicoData.find(country => country.coords[0] === d.x && country.coords[1] === d.y);
if(countryData){
var tooltip_val = countryData ? countryData.tooltip : "";
alert(d.x + " = " + d.y);
}*/
});
});
} // exports
function getImage(path, callback) {
var image = new Image();
image.onload = function () {
callback(image);
};
image.src = path;
}
//________________________________________________
// GET/SET
//________________________________________________
function getSet(option, component) {
return function (_) {
if (!arguments.length) {
return this[option];
}
this[option] = _;
return component;
};
}
// api for chart, all items in `opts` object made into get-set
for (var key in opts) {
exports[key] = getSet(key, exports).bind(opts);
}
d3.rebind(exports, dispatch, "on");
return exports;
};