Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use heatmap.js and refresh seat positions

  • Loading branch information...
commit 8412fd885ecbb548a2538169fe7afa63bdf65ce3 1 parent 6c8be55
Alexandre Girard authored
BIN  heatmap_js/.DS_Store
View
Binary file not shown
358 heatmap_js/heatmap.js
View
@@ -0,0 +1,358 @@
+/*
+ * heatmap.js 1.0 - JavaScript Heatmap Library
+ *
+ * Copyright (c) 2011, Patrick Wied (http://www.patrick-wied.at)
+ * Dual-licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
+ * and the Beerware (http://en.wikipedia.org/wiki/Beerware) license.
+ */
+
+(function(w){
+ // the heatmapFactory creates heatmap instances
+ var heatmapFactory = (function(){
+
+ // store object constructor
+ // a heatmap contains a store
+ // the store has to know about the heatmap in order to trigger heatmap updates when datapoints get added
+ function store(hmap){
+
+ var _ = {
+ // data is a two dimensional array
+ // a datapoint gets saved as data[point-x-value][point-y-value]
+ // the value at [point-x-value][point-y-value] is the occurrence of the datapoint
+ data: [],
+ // tight coupling of the heatmap object
+ heatmap: hmap
+ };
+ // the max occurrence - the heatmaps radial gradient alpha transition is based on it
+ this.max = 0;
+
+ this.get = function(key){
+ return _[key];
+ },
+ this.set = function(key, value){
+ _[key] = value;
+ };
+ };
+
+ store.prototype = {
+ // function for adding datapoints to the store
+ // datapoints are usually defined by x and y but could also contain a third parameter which represents the occurrence
+ addDataPoint: function(x, y){
+ if(x < 0 || y < 0)
+ return;
+
+ var heatmap = this.get("heatmap"),
+ data = this.get("data");
+
+ if(!data[x]) data[x] = [];
+ if(!data[x][y]) data[x][y] = 1;
+ // if count parameter is set increment by count otherwise by 1
+ data[x][y]+=(arguments.length<3)?1:arguments[2];
+
+ // do we have a new maximum?
+ if(this.max < data[x][y]){
+ this.max = data[x][y];
+ // max changed, we need to redraw all existing(lower) datapoints
+ heatmap.get("actx").clearRect(0,0,heatmap.get("width"),heatmap.get("height"));
+ for(var one in data)
+ for(var two in data[one])
+ heatmap.drawAlpha(one, two, data[one][two]);
+
+ // @TODO
+ // implement feature
+ // heatmap.drawLegend(); ?
+ return;
+ }
+ heatmap.drawAlpha(x, y, data[x][y]);
+ },
+ setDataSet: function(obj){
+
+ this.max = obj.max;
+ var heatmap = this.get("heatmap"),
+ data = this.get("data"),
+ d = obj.data,
+ dlen = d.length;
+ // clear the heatmap before the data set gets drawn
+ heatmap.clear();
+
+ while(dlen--){
+ var point = d[dlen];
+ heatmap.drawAlpha(point.x, point.y, point.count);
+ if(!data[point.x]) data[point.x] = [];
+ if(!data[point.x][point.y]) data[point.x][point.y] = 1;
+ data[point.x][point.y]+=point.count;
+ }
+ },
+ exportDataSet: function(){
+ var data = this.get("data");
+ var exportData = [];
+ for(var one in data){
+ // jump over undefined indexes
+ if(one === undefined)
+ continue;
+ for(var two in data[one]){
+ if(two === undefined)
+ continue;
+ // if both indexes are defined, push the values into the array
+ exportData.push({x: parseInt(one, 10), y: parseInt(two, 10), count: data[one][two]});
+ }
+ }
+
+ return exportData;
+ },
+ generateRandomDataSet: function(points){
+ var heatmap = this.get("heatmap"),
+ w = heatmap.get("width"),
+ h = heatmap.get("height");
+ var randomset = {},
+ max = Math.floor(Math.random()*1000+1);
+ randomset.max = max;
+ var data = [];
+ while(points--){
+ data.push({x: Math.floor(Math.random()*w+1), y: Math.floor(Math.random()*h+1), count: Math.floor(Math.random()*max+1)});
+ }
+ randomset.data = data;
+ this.setDataSet(randomset);
+ }
+ };
+
+
+ // heatmap object constructor
+ function heatmap(config){
+ // private variables
+ var _ = {
+ radiusIn : 20,
+ radiusOut : 40,
+ element : {},
+ canvas : {},
+ acanvas: {},
+ ctx : {},
+ actx : {},
+ visible : true,
+ width : 0,
+ height : 0,
+ max : false,
+ gradient : false,
+ opacity: 180
+ };
+ // heatmap store containing the datapoints and information about the maximum
+ // accessible via instance.store
+ this.store = new store(this);
+
+ this.get = function(key){
+ return _[key];
+ },
+ this.set = function(key, value){
+ _[key] = value;
+ };
+ // configure the heatmap when an instance gets created
+ this.configure(config);
+ // and initialize it
+ this.init();
+ };
+
+ // public functions
+ heatmap.prototype = {
+ configure: function(config){
+ if(config.radius){
+ var rout = config.radius,
+ rin = parseInt(rout/2);
+ }
+ this.set("radiusIn", rin || 15),
+ this.set("radiusOut", rout || 40),
+ this.set("element", (config.element instanceof Object)?config.element:document.getElementById(config.element));
+ this.set("visible", config.visible);
+ this.set("max", config.max || false);
+ this.set("gradient", config.gradient || { 0.45: "rgb(0,0,255)", 0.55: "rgb(0,255,255)", 0.65: "rgb(0,255,0)", 0.95: "yellow", 1.0: "rgb(255,0,0)"}); // default is the common blue to red gradient
+ this.set("opacity", parseInt(255/(100/config.opacity), 10) || 180);
+ this.set("width", config.width || 0);
+ this.set("height", config.height || 0);
+ },
+ init: function(){
+ this.initColorPalette();
+ var canvas = document.createElement("canvas"),
+ acanvas = document.createElement("canvas"),
+ element = this.get("element");
+ this.set("canvas", canvas);
+ this.set("acanvas", acanvas);
+ canvas.width = acanvas.width = element.style.width.replace(/px/,"") || this.getWidth(element);
+ this.set("width", canvas.width);
+ canvas.height = acanvas.height = element.style.height.replace(/px/,"") || this.getHeight(element);
+ this.set("height", canvas.height);
+ canvas.style.position = acanvas.style.position = "absolute";
+ canvas.style.top = acanvas.style.top = "0";
+ canvas.style.left = acanvas.style.left = "0";
+ canvas.style.zIndex = 1000000;
+ if(!this.get("visible"))
+ canvas.style.display = "none";
+
+ this.get("element").appendChild(canvas);
+ this.set("ctx", canvas.getContext("2d"));
+ this.set("actx", acanvas.getContext("2d"));
+ },
+ initColorPalette: function(){
+
+ var canvas = document.createElement("canvas");
+ canvas.width = "1";
+ canvas.height = "256";
+ var ctx = canvas.getContext("2d");
+ var grad = ctx.createLinearGradient(0,0,1,256),
+ gradient = this.get("gradient");
+ for(var x in gradient){
+ grad.addColorStop(x, gradient[x]);
+ }
+
+ ctx.fillStyle = grad;
+ ctx.fillRect(0,0,1,256);
+
+ this.set("gradient", ctx.getImageData(0,0,1,256).data);
+ delete canvas;
+ delete grad;
+ delete ctx;
+ },
+ getWidth: function(element){
+ var width = element.offsetWidth;
+ if(element.style.paddingLeft)
+ width+=element.style.paddingLeft;
+ if(element.style.paddingRight)
+ width+=element.style.paddingRight;
+
+ return width;
+ },
+ getHeight: function(element){
+ var height = element.offsetHeight;
+ if(element.style.paddingTop)
+ height+=element.style.paddingTop;
+ if(element.style.paddingBottom)
+ height+=element.style.paddingBottom;
+
+ return height;
+ },
+ colorize: function(x, y){
+ // get the private variables
+ var width = this.get("width"),
+ radiusOut = this.get("radiusOut"),
+ height = this.get("height"),
+ actx = this.get("actx"),
+ ctx = this.get("ctx");
+
+ var x2 = radiusOut*2;
+
+ if(x+x2>width)
+ x=width-x2;
+ if(x<0)
+ x=0;
+ if(y<0)
+ y=0;
+ if(y+x2>height)
+ y=height-x2;
+ // get the image data for the mouse movement area
+ var image = actx.getImageData(x,y,x2,x2),
+ // some performance tweaks
+ imageData = image.data,
+ length = imageData.length,
+ palette = this.get("gradient"),
+ opacity = this.get("opacity");
+ // loop thru the area
+ for(var i=3; i < length; i+=4){
+
+ // [0] -> r, [1] -> g, [2] -> b, [3] -> alpha
+ var alpha = imageData[i],
+ offset = alpha*4;
+
+ if(!offset)
+ continue;
+
+ // we ve started with i=3
+ // set the new r, g and b values
+ imageData[i-3]=palette[offset];
+ imageData[i-2]=palette[offset+1];
+ imageData[i-1]=palette[offset+2];
+ // we want the heatmap to have a gradient from transparent to the colors
+ // as long as alpha is lower than the defined opacity (maximum), we'll use the alpha value
+ imageData[i] = (alpha < opacity)?alpha:opacity;
+ }
+ // the rgb data manipulation didn't affect the ImageData object(defined on the top)
+ // after the manipulation process we have to set the manipulated data to the ImageData object
+ image.data = imageData;
+ ctx.putImageData(image,x,y);
+ },
+ drawAlpha: function(x, y, count){
+ // storing the variables because they will be often used
+ var r1 = this.get("radiusIn"),
+ r2 = this.get("radiusOut"),
+ ctx = this.get("actx"),
+ max = this.get("max"),
+ // create a radial gradient with the defined parameters. we want to draw an alphamap
+ rgr = ctx.createRadialGradient(x,y,r1,x,y,r2),
+ xb = x-r2, yb = y-r2, mul = 2*r2;
+ // the center of the radial gradient has .1 alpha value
+ rgr.addColorStop(0, 'rgba(0,0,0,'+((count)?(count/this.store.max):'0.1')+')');
+ // and it fades out to 0
+ rgr.addColorStop(1, 'rgba(0,0,0,0)');
+ // drawing the gradient
+ ctx.fillStyle = rgr;
+ ctx.fillRect(xb,yb,mul,mul);
+ // finally colorize the area
+ this.colorize(xb,yb);
+
+ },
+ toggleDisplay: function(){
+ var visible = this.get("visible"),
+ canvas = this.get("canvas");
+
+ if(!visible)
+ canvas.style.display = "block";
+ else
+ canvas.style.display = "none";
+
+ this.set("visible", !visible);
+ },
+ // dataURL export
+ getImageData: function(){
+ return this.get("canvas").toDataURL();
+ },
+ clear: function(){
+ var w = this.get("width"),
+ h = this.get("height");
+ this.store.set("data",[]);
+ // @TODO: reset stores max to 1
+ //this.store.max = 1;
+ this.get("ctx").clearRect(0,0,w,h);
+ this.get("actx").clearRect(0,0,w,h);
+ }
+ };
+
+ return {
+ create: function(config){
+ return new heatmap(config);
+ },
+ util: {
+ mousePosition: function(ev){
+ // this doesn't work right
+ // rather use
+ /*
+ // this = element to observe
+ var x = ev.pageX - this.offsetLeft;
+ var y = ev.pageY - this.offsetTop;
+
+ */
+ var x, y;
+
+ if (ev.layerX) { // Firefox
+ x = ev.layerX;
+ y = ev.layerY;
+ } else if (ev.offsetX) { // Opera
+ x = ev.offsetX;
+ y = ev.offsetY;
+ }
+ if(typeof(x)=='undefined')
+ return;
+
+ return [x,y];
+ }
+ }
+ };
+ })();
+ w.h337 = w.heatmapFactory = heatmapFactory;
+})(window);
1,240 heatmap_js/index.html
View
@@ -0,0 +1,1240 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+ <title>Politimap</title>
+ <meta name="robots" content="index, follow" />
+ <meta name="description" content="HTML5 canvas heatmap based on Assemblee Nationale" />
+ <meta name="author" content="Alexandre Girard" />
+ <meta name="keywords" content="heatmap, politic, javascript, canvas, html5" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <style>
+ body, html {
+ margin:0;
+ padding:0;
+ font-family:Arial;
+ }
+ h1 {
+ margin-bottom:10px;
+ }
+ #main {
+ position:relative;
+ width:940px;
+ padding:20px;
+ margin:auto;
+ }
+ #heatmapArea {
+ position:relative;
+ float:left;
+ width:600px;
+ height:400px;
+ background-image:url(./seat_map.jpg);
+ border:1px dashed black;
+ }
+ #configArea {
+ position:relative;
+ float:left;
+ width:260px;
+ padding:20px;
+ padding-top:0;
+ }
+ .btn {
+ margin-top:25px;
+ padding:10px 20px 10px 20px;
+ -moz-border-radius:15px;
+ -o-border-radius:15px;
+ -webkit-border-radius:15px;
+ border-radius:15px;
+ border:2px solid black;
+ cursor:pointer;
+ color:white;
+ background-color:black;
+ }
+ #gen:hover{
+ background-color:grey;
+ color:black;
+ }
+ textarea{
+ width:260px;
+ padding:10px;
+ height:200px;
+ }
+ h2{
+ margin-top:0;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="main">
+ <h1>Politimap</h1>
+ <div id="heatmapArea">
+
+ </div>
+ <div id="configArea">
+ <h2>Sidenotes</h2>
+ <div id="dataset" class="btn">Apply DataSet</div>
+ <div id="gen" class="btn">Generate some random data</div>
+ </div>
+ <div style="position:absolute;width:940px;top:650px;text-align:center;">
+ <a href="http://www.patrick-wied.at/static/heatmapjs/">heatmap.js</a> by <a href="http://www.patrick-wied.at" target="_blank">Patrick Wied</a>
+ </div>
+
+ </div>
+ <script type="text/javascript" src="./heatmap.js"></script>
+ <script type="text/javascript">
+
+
+ window.onload = function(){
+ var xx = h337.create({"element":document.getElementById("heatmapArea"), "radius":12, "visible":true});
+
+ xx.get("canvas").onclick = function(ev){
+ var pos = h337.util.mousePosition(ev);
+ xx.store.addDataPoint(pos[0],pos[1]);
+ };
+
+ document.getElementById("dataset").onclick = function(){
+ var el = document.getElementById("data").value;
+ var obj = eval('('+el+')');
+
+ // call the heatmap's store's setDataSet method in order to set static data
+ xx.store.setDataSet(obj);
+ };
+ document.getElementById("gen").onclick = function(){
+ xx.store.generateRandomDataSet(100);
+ };
+
+ var seats = [
+ {id: 1, x: 410, y: 308},
+ {id: 2, x: 409, y: 297},
+ {id: 3, x: 407, y: 285},
+ {id: 5, x: 427, y: 309},
+ {id: 6, x: 426, y: 294},
+ {id: 7, x: 425, y: 281},
+ {id: 8, x: 447, y: 310},
+ {id: 9, x: 446, y: 298},
+ {id: 10, x: 445, y: 286},
+ {id: 11, x: 443, y: 274},
+ {id: 12, x: 465, y: 314},
+ {id: 13, x: 465, y: 302},
+ {id: 14, x: 464, y: 291},
+ {id: 15, x: 462, y: 281},
+ {id: 16, x: 460, y: 270},
+ {id: 17, x: 482, y: 317},
+ {id: 18, x: 482, y: 306},
+ {id: 19, x: 481, y: 296},
+ {id: 20, x: 480, y: 285},
+ {id: 21, x: 478, y: 274},
+ {id: 22, x: 475, y: 265},
+ {id: 23, x: 507, y: 330},
+ {id: 24, x: 508, y: 316},
+ {id: 25, x: 508, y: 305},
+ {id: 26, x: 508, y: 293},
+ {id: 27, x: 506, y: 273},
+ {id: 28, x: 503, y: 262},
+ {id: 30, x: 525, y: 330},
+ {id: 31, x: 526, y: 318},
+ {id: 32, x: 526, y: 305},
+ {id: 33, x: 525, y: 292},
+ {id: 35, x: 523, y: 270},
+ {id: 36, x: 520, y: 258},
+ {id: 38, x: 543, y: 332},
+ {id: 39, x: 544, y: 318},
+ {id: 40, x: 544, y: 304},
+ {id: 41, x: 543, y: 290},
+ {id: 43, x: 541, y: 272},
+ {id: 44, x: 540, y: 262},
+ {id: 45, x: 538, y: 252},
+ {id: 47, x: 561, y: 334},
+ {id: 48, x: 562, y: 323},
+ {id: 49, x: 563, y: 311},
+ {id: 50, x: 563, y: 300},
+ {id: 51, x: 562, y: 288},
+ {id: 52, x: 559, y: 268},
+ {id: 53, x: 557, y: 257},
+ {id: 54, x: 554, y: 246},
+ {id: 56, x: 578, y: 335},
+ {id: 57, x: 579, y: 322},
+ {id: 58, x: 579, y: 311},
+ {id: 59, x: 579, y: 300},
+ {id: 60, x: 578, y: 287},
+ {id: 62, x: 576, y: 265},
+ {id: 63, x: 574, y: 252},
+ {id: 64, x: 571, y: 240},
+ {id: 66, x: 596, y: 320},
+ {id: 67, x: 596, y: 310},
+ {id: 68, x: 596, y: 300},
+ {id: 70, x: 592, y: 265},
+ {id: 71, x: 590, y: 253},
+ {id: 72, x: 588, y: 243},
+ {id: 73, x: 586, y: 233},
+ {id: 75, x: 384, y: 273, count:90},
+ {id: 76, x: 380, y: 264, count:90},
+ {id: 77, x: 375, y: 255, count:90},
+ {id: 78, x: 402, y: 267, count:90},
+ {id: 79, x: 397, y: 255, count:90},
+ {id: 80, x: 390, y: 244, count:90},
+ {id: 81, x: 419, y: 263, count:90},
+ {id: 82, x: 415, y: 252, count:90},
+ {id: 83, x: 410, y: 242, count:90},
+ {id: 84, x: 403, y: 232, count:90},
+ {id: 85, x: 437, y: 259, count:90},
+ {id: 86, x: 432, y: 245, count:90},
+ {id: 87, x: 426, y: 233, count:90},
+ {id: 88, x: 418, y: 222, count:90},
+ {id: 89, x: 455, y: 254, count:90},
+ {id: 90, x: 450, y: 243, count:90},
+ {id: 91, x: 445, y: 231, count:90},
+ {id: 92, x: 439, y: 220, count:90},
+ {id: 93, x: 433, y: 209, count:90},
+ {id: 94, x: 470, y: 249, count:90},
+ {id: 95, x: 466, y: 238, count:90},
+ {id: 96, x: 462, y: 228, count:90},
+ {id: 97, x: 457, y: 218, count:90},
+ {id: 98, x: 451, y: 207, count:90},
+ {id: 99, x: 445, y: 198, count:90},
+ {id: 100, x: 497, y: 242, count:90},
+ {id: 101, x: 493, y: 231, count:90},
+ {id: 102, x: 488, y: 219, count:90},
+ {id: 103, x: 483, y: 209, count:90},
+ {id: 104, x: 477, y: 200, count:90},
+ {id: 105, x: 471, y: 191, count:90},
+ {id: 106, x: 464, y: 182, count:90},
+ {id: 108, x: 513, y: 236, count:90},
+ {id: 109, x: 509, y: 224, count:90},
+ {id: 110, x: 504, y: 213, count:90},
+ {id: 111, x: 498, y: 202, count:90},
+ {id: 112, x: 493, y: 191, count:90},
+ {id: 113, x: 486, y: 181, count:90},
+ {id: 114, x: 479, y: 170, count:90},
+ {id: 116, x: 531, y: 233, count:90},
+ {id: 117, x: 527, y: 223, count:90},
+ {id: 118, x: 523, y: 212, count:90},
+ {id: 119, x: 518, y: 202, count:90},
+ {id: 120, x: 514, y: 193, count:90},
+ {id: 122, x: 509, y: 184, count:90},
+ {id: 123, x: 503, y: 175, count:90},
+ {id: 124, x: 496, y: 166, count:90},
+ {id: 125, x: 489, y: 157, count:90},
+ {id: 126, x: 548, y: 228, count:90},
+ {id: 127, x: 544, y: 217, count:90},
+ {id: 128, x: 540, y: 206, count:90},
+ {id: 129, x: 535, y: 195, count:90},
+ {id: 130, x: 530, y: 184, count:90},
+ {id: 132, x: 524, y: 174, count:90},
+ {id: 133, x: 518, y: 164, count:90},
+ {id: 134, x: 512, y: 155, count:90},
+ {id: 135, x: 506, y: 146, count:90},
+ {id: 136, x: 565, y: 224, count:90},
+{id: 137, x: 562, y: 214, count:90},
+{id: 138, x: 559, y: 204, count:90},
+{id: 139, x: 555, y: 194, count:90},
+{id: 140, x: 550, y: 184, count:90},
+{id: 142, x: 545, y: 174, count:90},
+{id: 143, x: 540, y: 165, count:90},
+{id: 144, x: 535, y: 155, count:90},
+{id: 145, x: 529, y: 147, count:90},
+{id: 146, x: 523, y: 139, count:90},
+{id: 147, x: 516, y: 132, count:90},
+{id: 148, x: 581, y: 219, count:90},
+{id: 149, x: 577, y: 208, count:90},
+{id: 150, x: 574, y: 197, count:90},
+{id: 151, x: 570, y: 187, count:90},
+{id: 152, x: 565, y: 176, count:90},
+{id: 153, x: 560, y: 166, count:90},
+{id: 154, x: 554, y: 157, count:90},
+{id: 155, x: 548, y: 148, count:90},
+{id: 156, x: 543, y: 140, count:90},
+{id: 157, x: 536, y: 132, count:90},
+{id: 158, x: 529, y: 123, count:90},
+
+{id: 162, x: 362, y: 241, count:90},
+{id: 163, x: 355, y: 234, count:90},
+{id: 164, x: 346, y: 229, count:90},
+{id: 165, x: 377, y: 229, count:90},
+{id: 166, x: 365, y: 220, count:90},
+{id: 167, x: 353, y: 212, count:90},
+{id: 168, x: 388, y: 216, count:90},
+{id: 169, x: 379, y: 209, count:90},
+{id: 170, x: 370, y: 202, count:90},
+{id: 171, x: 360, y: 196, count:90},
+{id: 172, x: 402, y: 206, count:90},
+{id: 173, x: 392, y: 197, count:90},
+{id: 174, x: 380, y: 188, count:90},
+{id: 175, x: 369, y: 181, count:90},
+{id: 176, x: 417, y: 194, count:90},
+{id: 177, x: 408, y: 185, count:90},
+{id: 178, x: 398, y: 176, count:90},
+{id: 179, x: 387, y: 169, count:90},
+{id: 180, x: 376, y: 163, count:90},
+{id: 181, x: 431, y: 183, count:90},
+{id: 182, x: 422, y: 174, count:90},
+{id: 183, x: 413, y: 166, count:90},
+{id: 184, x: 403, y: 159, count:90},
+{id: 185, x: 392, y: 153, count:90},
+{id: 186, x: 381, y: 147, count:90},
+{id: 187, x: 452, y: 166, count:90},
+{id: 188, x: 443, y: 157, count:90},
+{id: 189, x: 435, y: 149, count:90},
+{id: 190, x: 425, y: 141, count:90},
+{id: 191, x: 415, y: 134, count:90},
+{id: 192, x: 404, y: 128, count:90},
+{id: 193, x: 394, y: 123, count:90},
+{id: 195, x: 464, y: 153, count:90},
+{id: 196, x: 453, y: 143, count:90},
+{id: 197, x: 443, y: 134, count:90},
+{id: 198, x: 430, y: 125, count:90},
+{id: 199, x: 420, y: 119, count:90},
+{id: 200, x: 410, y: 113, count:90},
+{id: 201, x: 400, y: 108, count:90},
+{id: 203, x: 478, y: 143, count:90},
+{id: 204, x: 469, y: 135, count:90},
+{id: 205, x: 461, y: 128, count:90},
+{id: 206, x: 453, y: 121, count:90},
+{id: 207, x: 444, y: 113, count:90},
+{id: 209, x: 435, y: 107, count:90},
+{id: 210, x: 426, y: 102, count:90},
+{id: 211, x: 417, y: 97, count:90},
+{id: 212, x: 407, y: 93, count:90},
+{id: 213, x: 491, y: 130, count:90},
+{id: 214, x: 482, y: 122, count:90},
+{id: 215, x: 474, y: 114, count:90},
+{id: 216, x: 465, y: 106, count:90},
+{id: 217, x: 456, y: 98, count:90},
+{id: 219, x: 446, y: 92, count:90},
+{id: 220, x: 436, y: 86, count:90},
+{id: 221, x: 425, y: 79, count:90},
+{id: 222, x: 415, y: 74, count:90},
+{id: 223, x: 506, y: 121, count:90},
+{id: 224, x: 499, y: 113, count:90},
+{id: 225, x: 491, y: 105, count:90},
+{id: 226, x: 483, y: 97, count:90},
+{id: 227, x: 475, y: 91, count:90},
+{id: 228, x: 466, y: 84, count:90},
+{id: 230, x: 458, y: 78, count:90},
+{id: 231, x: 450, y: 72, count:90},
+{id: 232, x: 441, y: 67, count:90},
+{id: 233, x: 433, y: 62, count:90},
+{id: 234, x: 425, y: 58, count:90},
+{id: 235, x: 519, y: 110, count:90},
+{id: 236, x: 510, y: 101, count:90},
+{id: 237, x: 501, y: 93, count:90},
+{id: 238, x: 492, y: 84, count:90},
+{id: 239, x: 484, y: 77, count:90},
+{id: 240, x: 476, y: 70, count:90},
+{id: 241, x: 468, y: 64, count:90},
+{id: 242, x: 460, y: 59, count:90},
+{id: 243, x: 450, y: 53, count:90},
+{id: 244, x: 440, y: 48, count:90},
+{id: 245, x: 430, y: 43, count:90},
+{id: 248, x: 345, y: 188, count:90},
+{id: 249, x: 333, y: 184, count:90},
+{id: 250, x: 321, y: 181, count:90},
+{id: 251, x: 309, y: 180, count:90},
+{id: 253, x: 351, y: 170, count:90},
+{id: 254, x: 337, y: 166, count:90},
+{id: 255, x: 324, y: 164, count:90},
+{id: 256, x: 311, y: 162, count:90},
+{id: 257, x: 361, y: 155, count:90},
+{id: 258, x: 347, y: 151, count:90},
+{id: 259, x: 335, y: 148, count:90},
+{id: 260, x: 323, y: 146, count:90},
+{id: 261, x: 310, y: 145, count:90},
+{id: 262, x: 367, y: 140, count:90},
+{id: 263, x: 355, y: 136, count:90},
+{id: 264, x: 343, y: 132, count:90},
+{id: 265, x: 332, y: 130, count:90},
+{id: 266, x: 321, y: 128, count:90},
+{id: 267, x: 309, y: 127, count:90},
+{id: 268, x: 379, y: 115, count:90},
+{id: 269, x: 367, y: 111, count:90},
+{id: 270, x: 356, y: 107, count:90},
+{id: 271, x: 344, y: 104, count:90},
+{id: 272, x: 332, y: 102, count:90},
+{id: 273, x: 321, y: 101, count:90},
+{id: 274, x: 309, y: 101, count:90},
+{id: 276, x: 386, y: 100, count:90},
+{id: 277, x: 373, y: 95, count:90},
+{id: 278, x: 361, y: 91, count:90},
+{id: 279, x: 348, y: 88, count:90},
+{id: 280, x: 335, y: 85, count:90},
+{id: 281, x: 322, y: 84, count:90},
+{id: 282, x: 309, y: 83, count:90},
+{id: 284, x: 395, y: 84, count:90},
+{id: 285, x: 384, y: 80, count:90},
+{id: 286, x: 374, y: 76, count:90},
+{id: 287, x: 363, y: 73, count:90},
+{id: 288, x: 352, y: 70, count:90},
+{id: 290, x: 341, y: 68, count:90},
+{id: 291, x: 330, y: 66, count:90},
+{id: 292, x: 319, y: 65, count:90},
+{id: 293, x: 308, y: 64, count:90},
+{id: 294, x: 400, y: 66, count:90},
+{id: 295, x: 390, y: 62, count:90},
+{id: 296, x: 379, y: 59, count:90},
+{id: 297, x: 368, y: 56, count:90},
+{id: 298, x: 356, y: 53, count:90},
+{id: 300, x: 344, y: 50, count:90},
+{id: 301, x: 332, y: 48, count:90},
+{id: 302, x: 320, y: 47, count:90},
+{id: 303, x: 308, y: 47, count:90},
+{id: 304, x: 408, y: 51, count:90},
+{id: 305, x: 398, y: 47, count:90},
+{id: 306, x: 388, y: 44, count:90},
+{id: 307, x: 378, y: 41, count:90},
+{id: 308, x: 368, y: 38, count:90},
+{id: 309, x: 358, y: 36, count:90},
+{id: 311, x: 348, y: 34, count:90},
+{id: 312, x: 338, y: 32, count:90},
+{id: 313, x: 328, y: 31, count:90},
+{id: 314, x: 318, y: 30, count:90},
+{id: 315, x: 308, y: 30, count:90},
+{id: 317, x: 414, y: 37, count:90},
+{id: 318, x: 403, y: 32, count:90},
+{id: 319, x: 392, y: 28, count:90},
+{id: 320, x: 380, y: 24, count:90},
+{id: 321, x: 370, y: 21, count:90},
+{id: 322, x: 360, y: 19, count:90},
+{id: 323, x: 349, y: 17, count:90},
+{id: 324, x: 339, y: 15, count:90},
+{id: 325, x: 329, y: 14, count:90},
+{id: 326, x: 318, y: 13, count:90},
+{id: 327, x: 308, y: 13, count:90},
+{id: 329, x: 292, y: 181, count:90},
+{id: 330, x: 280, y: 182, count:90},
+{id: 331, x: 267, y: 185, count:90},
+{id: 332, x: 255, y: 188, count:90},
+{id: 333, x: 292, y: 160, count:90},
+{id: 334, x: 277, y: 162, count:90},
+{id: 335, x: 263, y: 165, count:90},
+{id: 336, x: 248, y: 170, count:90},
+{id: 337, x: 293, y: 143, count:90},
+{id: 338, x: 279, y: 145, count:90},
+{id: 339, x: 265, y: 147, count:90},
+{id: 340, x: 252, y: 150, count:90},
+{id: 341, x: 240, y: 154, count:90},
+{id: 342, x: 292, y: 126, count:90},
+{id: 343, x: 280, y: 128, count:90},
+{id: 344, x: 268, y: 130, count:90},
+{id: 345, x: 255, y: 132, count:90},
+{id: 346, x: 244, y: 135, count:90},
+{id: 347, x: 233, y: 139, count:90},
+{id: 348, x: 292, y: 100, count:90},
+{id: 349, x: 279, y: 100, count:90},
+{id: 350, x: 266, y: 102, count:90},
+{id: 351, x: 255, y: 104, count:90},
+{id: 352, x: 242, y: 107, count:90},
+{id: 353, x: 231, y: 111, count:90},
+{id: 354, x: 220, y: 115, count:90},
+{id: 356, x: 293, y: 82, count:90},
+{id: 357, x: 279, y: 83, count:90},
+{id: 358, x: 265, y: 85, count:90},
+{id: 359, x: 251, y: 87, count:90},
+{id: 360, x: 238, y: 91, count:90},
+{id: 361, x: 226, y: 95, count:90},
+{id: 362, x: 214, y: 100, count:90},
+{id: 364, x: 294, y: 64, count:90},
+{id: 365, x: 283, y: 64, count:90},
+{id: 366, x: 272, y: 65, count:90},
+{id: 367, x: 261, y: 67, count:90},
+{id: 368, x: 250, y: 69, count:90},
+{id: 370, x: 239, y: 71, count:90},
+{id: 371, x: 228, y: 74, count:90},
+{id: 372, x: 217, y: 78, count:90},
+{id: 373, x: 206, y: 82, count:90},
+{id: 374, x: 294, y: 46, count:90},
+{id: 375, x: 282, y: 47, count:90},
+{id: 376, x: 270, y: 48, count:90},
+{id: 377, x: 258, y: 49, count:90},
+{id: 378, x: 246, y: 51, count:90},
+{id: 380, x: 234, y: 54, count:90},
+{id: 381, x: 222, y: 58, count:90},
+{id: 382, x: 210, y: 62, count:90},
+{id: 383, x: 198, y: 67, count:90},
+{id: 384, x: 294, y: 29, count:90},
+{id: 385, x: 283, y: 30, count:90},
+{id: 386, x: 272, y: 31, count:90},
+{id: 387, x: 261, y: 32, count:90},
+{id: 388, x: 250, y: 34, count:90},
+{id: 389, x: 239, y: 36, count:90},
+{id: 391, x: 230, y: 38, count:90},
+{id: 392, x: 220, y: 41, count:90},
+{id: 393, x: 210, y: 44, count:90},
+{id: 394, x: 200, y: 47, count:90},
+{id: 395, x: 190, y: 51, count:90},
+{id: 397, x: 294, y: 14, count:90},
+{id: 398, x: 282, y: 14, count:90},
+{id: 399, x: 270, y: 15, count:90},
+{id: 400, x: 258, y: 16, count:90},
+{id: 401, x: 246, y: 18, count:90},
+{id: 402, x: 235, y: 20, count:90},
+{id: 403, x: 225, y: 23, count:90},
+{id: 404, x: 215, y: 26, count:90},
+{id: 405, x: 205, y: 29, count:90},
+{id: 406, x: 195, y: 32, count:90},
+{id: 407, x: 185, y: 36, count:90},
+{id: 409, x: 237, y: 196, count:90},
+{id: 410, x: 228, y: 202, count:90},
+{id: 411, x: 219, y: 209, count:90},
+{id: 412, x: 209, y: 217, count:90},
+{id: 413, x: 231, y: 179, count:90},
+{id: 414, x: 219, y: 186, count:90},
+{id: 415, x: 208, y: 194, count:90},
+{id: 416, x: 197, y: 205, count:90},
+{id: 417, x: 222, y: 163, count:90},
+{id: 418, x: 211, y: 169, count:90},
+{id: 419, x: 200, y: 176, count:90},
+{id: 420, x: 190, y: 185, count:90},
+{id: 421, x: 181, y: 194, count:90},
+{id: 422, x: 216, y: 147, count:90},
+{id: 423, x: 206, y: 153, count:90},
+{id: 424, x: 197, y: 159, count:90},
+{id: 425, x: 187, y: 166, count:90},
+{id: 426, x: 177, y: 174, count:90},
+{id: 427, x: 168, y: 183, count:90},
+{id: 428, x: 206, y: 121, count:90},
+{id: 429, x: 196, y: 126, count:90},
+{id: 430, x: 186, y: 133, count:90},
+{id: 431, x: 175, y: 140, count:90},
+{id: 432, x: 165, y: 149, count:90},
+{id: 433, x: 155, y: 157, count:90},
+{id: 434, x: 146, y: 166, count:90},
+{id: 436, x: 198, y: 106, count:90},
+{id: 437, x: 188, y: 111, count:90},
+{id: 438, x: 177, y: 118, count:90},
+{id: 439, x: 166, y: 126, count:90},
+{id: 440, x: 155, y: 135, count:90},
+{id: 441, x: 144, y: 145, count:90},
+{id: 442, x: 134, y: 155, count:90},
+{id: 444, x: 192, y: 90, count:90},
+{id: 445, x: 183, y: 95, count:90},
+{id: 446, x: 172, y: 101, count:90},
+{id: 447, x: 162, y: 108, count:90},
+{id: 448, x: 153, y: 114, count:90},
+{id: 450, x: 144, y: 121, count:90},
+{id: 451, x: 136, y: 128, count:90},
+{id: 452, x: 128, y: 135, count:90},
+{id: 453, x: 120, y: 143, count:90},
+{id: 454, x: 184, y: 73, count:90},
+{id: 455, x: 173, y: 79, count:90},
+{id: 456, x: 162, y: 86, count:90},
+{id: 457, x: 151, y: 93, count:90},
+{id: 458, x: 141, y: 100, count:90},
+{id: 460, x: 132, y: 108, count:90},
+{id: 461, x: 123, y: 116, count:90},
+{id: 462, x: 114, y: 125, count:90},
+{id: 463, x: 105, y: 133, count:90},
+{id: 464, x: 176, y: 58, count:90},
+{id: 465, x: 166, y: 63, count:90},
+{id: 466, x: 156, y: 69, count:90},
+{id: 467, x: 148, y: 74, count:90},
+{id: 468, x: 140, y: 80, count:90},
+{id: 469, x: 132, y: 86, count:90},
+{id: 471, x: 123, y: 92, count:90},
+{id: 472, x: 115, y: 98, count:90},
+{id: 473, x: 107, y: 106, count:90},
+{id: 474, x: 100, y: 114, count:90},
+{id: 475, x: 93, y: 122, count:90},
+{id: 478, x: 169, y: 44, count:90},
+{id: 479, x: 160, y: 48, count:90},
+{id: 480, x: 151, y: 53, count:90},
+{id: 481, x: 142, y: 58, count:90},
+{id: 482, x: 133, y: 64, count:90},
+{id: 483, x: 125, y: 71, count:90},
+{id: 484, x: 116, y: 77, count:90},
+{id: 485, x: 106, y: 85, count:90},
+{id: 486, x: 98, y: 92, count:90},
+{id: 487, x: 90, y: 101, count:90},
+{id: 488, x: 80, y: 110, count:90},
+{id: 489, x: 227, y: 254, count:90},
+{id: 490, x: 221, y: 264, count:90},
+{id: 491, x: 217, y: 274, count:90},
+{id: 492, x: 213, y: 243, count:90},
+{id: 493, x: 205, y: 255, count:90},
+{id: 494, x: 198, y: 268, count:90},
+{id: 495, x: 199, y: 232, count:90},
+{id: 496, x: 191, y: 241, count:90},
+{id: 497, x: 185, y: 253, count:90},
+{id: 498, x: 180, y: 264, count:90},
+{id: 499, x: 183, y: 221, count:90},
+{id: 500, x: 175, y: 232, count:90},
+{id: 501, x: 167, y: 246, count:90},
+{id: 502, x: 162, y: 259, count:90},
+{id: 503, x: 170, y: 208, count:90},
+{id: 504, x: 162, y: 218, count:90},
+{id: 505, x: 155, y: 229, count:90},
+{id: 506, x: 148, y: 241, count:90},
+{id: 507, x: 144, y: 253, count:90},
+{id: 508, x: 157, y: 197, count:90},
+{id: 509, x: 149, y: 206, count:90},
+{id: 510, x: 142, y: 216, count:90},
+{id: 511, x: 137, y: 226, count:90},
+{id: 512, x: 132, y: 238, count:90},
+{id: 513, x: 128, y: 249, count:90},
+{id: 514, x: 136, y: 179, count:90},
+{id: 515, x: 129, y: 188, count:90},
+{id: 516, x: 123, y: 197, count:90},
+{id: 517, x: 118, y: 207, count:90},
+{id: 518, x: 111, y: 219, count:90},
+{id: 519, x: 106, y: 230, count:90},
+{id: 520, x: 102, y: 241, count:90},
+{id: 522, x: 123, y: 168, count:90},
+{id: 523, x: 116, y: 178, count:90},
+{id: 524, x: 109, y: 188, count:90},
+{id: 525, x: 102, y: 199, count:90},
+{id: 526, x: 95, y: 211, count:90},
+{id: 527, x: 90, y: 224, count:90},
+{id: 528, x: 86, y: 237, count:90},
+{id: 530, x: 109, y: 156, count:90},
+{id: 531, x: 103, y: 165, count:90},
+{id: 532, x: 96, y: 174, count:90},
+{id: 533, x: 90, y: 183, count:90},
+{id: 534, x: 84, y: 193, count:90},
+{id: 536, x: 79, y: 204, count:90},
+{id: 537, x: 75, y: 214, count:90},
+{id: 538, x: 71, y: 223, count:90},
+{id: 539, x: 68, y: 233, count:90},
+{id: 540, x: 96, y: 144, count:90},
+{id: 541, x: 90, y: 153, count:90},
+{id: 542, x: 83, y: 163, count:90},
+{id: 543, x: 77, y: 172, count:90},
+{id: 544, x: 72, y: 182, count:90},
+{id: 545, x: 66, y: 193, count:90},
+{id: 546, x: 61, y: 203, count:90},
+{id: 547, x: 57, y: 213, count:90},
+{id: 548, x: 54, y: 222, count:90},
+{id: 549, x: 51, y: 231, count:90},
+{id: 550, x: 82, y: 134, count:90},
+{id: 551, x: 76, y: 143, count:90},
+{id: 552, x: 70, y: 152, count:90},
+{id: 553, x: 64, y: 160, count:90},
+{id: 554, x: 59, y: 168, count:90},
+{id: 555, x: 54, y: 176, count:90},
+{id: 557, x: 50, y: 185, count:90},
+{id: 558, x: 46, y: 194, count:90},
+{id: 559, x: 42, y: 204, count:90},
+{id: 560, x: 37, y: 215, count:90},
+{id: 561, x: 33, y: 226, count:90},
+{id: 564, x: 71, y: 122, count:90},
+{id: 565, x: 64, y: 132, count:90},
+{id: 566, x: 56, y: 142, count:90},
+{id: 567, x: 50, y: 152, count:90},
+{id: 568, x: 44, y: 162, count:90},
+{id: 569, x: 39, y: 172, count:90},
+{id: 570, x: 34, y: 182, count:90},
+{id: 571, x: 29, y: 192, count:90},
+{id: 572, x: 24, y: 202, count:90},
+{id: 573, x: 21, y: 212, count:90},
+{id: 574, x: 19, y: 222, count:90},
+{id: 576, x: 193, y: 286, count:90},
+{id: 577, x: 192, y: 298, count:90},
+{id: 578, x: 191, y: 310, count:90},
+{id: 580, x: 175, y: 282, count:90},
+{id: 581, x: 174, y: 295, count:90},
+{id: 582, x: 173, y: 308, count:90},
+{id: 583, x: 157, y: 276, count:90},
+{id: 584, x: 156, y: 287, count:90},
+{id: 585, x: 155, y: 298, count:90},
+{id: 586, x: 154, y: 309, count:90},
+{id: 587, x: 140, y: 271, count:90},
+{id: 588, x: 138, y: 282, count:90},
+{id: 589, x: 137, y: 293, count:90},
+{id: 590, x: 137, y: 304, count:90},
+{id: 591, x: 137, y: 315, count:90},
+{id: 592, x: 123, y: 266, count:90},
+{id: 593, x: 122, y: 276, count:90},
+{id: 594, x: 121, y: 286, count:90},
+{id: 595, x: 120, y: 296, count:90},
+{id: 596, x: 119, y: 306, count:90},
+{id: 597, x: 119, y: 316, count:90},
+{id: 599, x: 96, y: 260, count:90},
+{id: 600, x: 94, y: 271, count:90},
+{id: 601, x: 92, y: 293, count:90},
+{id: 602, x: 92, y: 305, count:90},
+{id: 603, x: 92, y: 317, count:90},
+{id: 604, x: 92, y: 329, count:90},
+{id: 606, x: 81, y: 257, count:90},
+{id: 607, x: 78, y: 269, count:90},
+{id: 609, x: 76, y: 291, count:90},
+{id: 610, x: 75, y: 305, count:90},
+{id: 611, x: 75, y: 318, count:90},
+{id: 612, x: 76, y: 331, count:90},
+{id: 614, x: 63, y: 250, count:90},
+{id: 615, x: 61, y: 260, count:90},
+{id: 616, x: 60, y: 271, count:90},
+{id: 618, x: 58, y: 289, count:90},
+{id: 619, x: 58, y: 303, count:90},
+{id: 620, x: 58, y: 317, count:90},
+{id: 621, x: 58, y: 331, count:90},
+{id: 623, x: 46, y: 247, count:90},
+{id: 624, x: 44, y: 258, count:90},
+{id: 625, x: 42, y: 269, count:90},
+{id: 626, x: 40, y: 288, count:90},
+{id: 627, x: 40, y: 299, count:90},
+{id: 628, x: 40, y: 310, count:90},
+{id: 629, x: 40, y: 321, count:90},
+{id: 630, x: 41, y: 332, count:90},
+{id: 632, x: 29, y: 243, count:90},
+{id: 633, x: 26, y: 254, count:90},
+{id: 634, x: 24, y: 265, count:90},
+{id: 636, x: 24, y: 284, count:90},
+{id: 637, x: 23, y: 296, count:90},
+{id: 638, x: 23, y: 309, count:90},
+{id: 639, x: 23, y: 322, count:90},
+{id: 640, x: 24, y: 335, count:90},
+{id: 642, x: 14, y: 236, count:90},
+{id: 643, x: 11, y: 246, count:90},
+{id: 644, x: 10, y: 256, count:90},
+{id: 645, x: 8, y: 266, count:90},
+{id: 648, x: 5, y: 300, count:90},
+{id: 649, x: 5, y: 311, count:90},
+{id: 650, x: 6, y: 322, count:90},
+
+ ]
+
+ var test = { max: 90, data: [
+ {x: 410, y: 308, count: 90},
+ {x: 409, y: 297, count: 60},
+
+ {id: 30, x: 525, y: 330, count: 90},
+ {id: 31, x: 526, y: 318, count: 90},
+ {id: 32, x: 526, y: 305, count: 90},
+ {id: 33, x: 525, y: 292, count: 90},
+ {id: 35, x: 523, y: 270, count: 90},
+ {id: 36, x: 520, y: 258, count: 90},
+
+ {id: 75, x: 384, y: 273, count:90},
+ {id: 76, x: 380, y: 264, count:90},
+ {id: 77, x: 375, y: 255, count:90},
+ {id: 78, x: 402, y: 267, count:90},
+ {id: 79, x: 397, y: 255, count:90},
+ {id: 80, x: 390, y: 244, count:90},
+ {id: 81, x: 419, y: 263, count:90},
+ {id: 82, x: 415, y: 252, count:90},
+ {id: 83, x: 410, y: 242, count:90},
+ {id: 84, x: 403, y: 232, count:90},
+ {id: 85, x: 437, y: 259, count:90},
+ {id: 86, x: 432, y: 245, count:90},
+ {id: 87, x: 426, y: 233, count:90},
+ {id: 88, x: 418, y: 222, count:90},
+ {id: 89, x: 455, y: 254, count:90},
+ {id: 90, x: 450, y: 243, count:90},
+ {id: 91, x: 445, y: 231, count:90},
+ {id: 92, x: 439, y: 220, count:90},
+ {id: 93, x: 433, y: 209, count:90},
+ {id: 94, x: 470, y: 249, count:90},
+ {id: 95, x: 466, y: 238, count:90},
+ {id: 96, x: 462, y: 228, count:90},
+ {id: 97, x: 457, y: 218, count:90},
+ {id: 98, x: 451, y: 207, count:90},
+ {id: 99, x: 445, y: 198, count:90},
+ {id: 100, x: 497, y: 242, count:90},
+ {id: 101, x: 493, y: 231, count:90},
+ {id: 102, x: 488, y: 219, count:90},
+ {id: 103, x: 483, y: 209, count:90},
+ {id: 104, x: 477, y: 200, count:90},
+ {id: 105, x: 471, y: 191, count:90},
+ {id: 106, x: 464, y: 182, count:90},
+ {id: 108, x: 513, y: 236, count:90},
+ {id: 109, x: 509, y: 224, count:90},
+ {id: 110, x: 504, y: 213, count:90},
+ {id: 111, x: 498, y: 202, count:90},
+ {id: 112, x: 493, y: 191, count:90},
+ {id: 113, x: 486, y: 181, count:90},
+ {id: 114, x: 479, y: 170, count:90},
+ {id: 116, x: 531, y: 233, count:90},
+ {id: 117, x: 527, y: 223, count:90},
+ {id: 118, x: 523, y: 212, count:90},
+ {id: 119, x: 518, y: 202, count:90},
+ {id: 120, x: 514, y: 193, count:90},
+ {id: 122, x: 509, y: 184, count:90},
+ {id: 123, x: 503, y: 175, count:90},
+ {id: 124, x: 496, y: 166, count:90},
+ {id: 125, x: 489, y: 157, count:90},
+ {id: 126, x: 548, y: 228, count:90},
+ {id: 127, x: 544, y: 217, count:90},
+ {id: 128, x: 540, y: 206, count:90},
+ {id: 129, x: 535, y: 195, count:90},
+ {id: 130, x: 530, y: 184, count:90},
+ {id: 132, x: 524, y: 174, count:90},
+ {id: 133, x: 518, y: 164, count:90},
+ {id: 134, x: 512, y: 155, count:90},
+ {id: 135, x: 506, y: 146, count:90},
+ {id: 136, x: 565, y: 224, count:90},
+{id: 137, x: 562, y: 214, count:90},
+{id: 138, x: 559, y: 204, count:90},
+{id: 139, x: 555, y: 194, count:90},
+{id: 140, x: 550, y: 184, count:90},
+{id: 142, x: 545, y: 174, count:90},
+{id: 143, x: 540, y: 165, count:90},
+{id: 144, x: 535, y: 155, count:90},
+{id: 145, x: 529, y: 147, count:90},
+{id: 146, x: 523, y: 139, count:90},
+{id: 147, x: 516, y: 132, count:90},
+{id: 148, x: 581, y: 219, count:90},
+{id: 149, x: 577, y: 208, count:90},
+{id: 150, x: 574, y: 197, count:90},
+{id: 151, x: 570, y: 187, count:90},
+{id: 152, x: 565, y: 176, count:90},
+{id: 153, x: 560, y: 166, count:90},
+{id: 154, x: 554, y: 157, count:90},
+{id: 155, x: 548, y: 148, count:90},
+{id: 156, x: 543, y: 140, count:90},
+{id: 157, x: 536, y: 132, count:90},
+{id: 158, x: 529, y: 123, count:90},
+
+{id: 162, x: 362, y: 241, count:90},
+{id: 163, x: 355, y: 234, count:90},
+{id: 164, x: 346, y: 229, count:90},
+{id: 165, x: 377, y: 229, count:90},
+{id: 166, x: 365, y: 220, count:90},
+{id: 167, x: 353, y: 212, count:90},
+{id: 168, x: 388, y: 216, count:90},
+{id: 169, x: 379, y: 209, count:90},
+{id: 170, x: 370, y: 202, count:90},
+{id: 171, x: 360, y: 196, count:90},
+{id: 172, x: 402, y: 206, count:90},
+{id: 173, x: 392, y: 197, count:90},
+{id: 174, x: 380, y: 188, count:90},
+{id: 175, x: 369, y: 181, count:90},
+{id: 176, x: 417, y: 194, count:90},
+{id: 177, x: 408, y: 185, count:90},
+{id: 178, x: 398, y: 176, count:90},
+{id: 179, x: 387, y: 169, count:90},
+{id: 180, x: 376, y: 163, count:90},
+{id: 181, x: 431, y: 183, count:90},
+{id: 182, x: 422, y: 174, count:90},
+{id: 183, x: 413, y: 166, count:90},
+{id: 184, x: 403, y: 159, count:90},
+{id: 185, x: 392, y: 153, count:90},
+{id: 186, x: 381, y: 147, count:90},
+{id: 187, x: 452, y: 166, count:90},
+{id: 188, x: 443, y: 157, count:90},
+{id: 189, x: 435, y: 149, count:90},
+{id: 190, x: 425, y: 141, count:90},
+{id: 191, x: 415, y: 134, count:90},
+{id: 192, x: 404, y: 128, count:90},
+{id: 193, x: 394, y: 123, count:90},
+{id: 195, x: 464, y: 153, count:90},
+{id: 196, x: 453, y: 143, count:90},
+{id: 197, x: 443, y: 134, count:90},
+{id: 198, x: 430, y: 125, count:90},
+{id: 199, x: 420, y: 119, count:90},
+{id: 200, x: 410, y: 113, count:90},
+{id: 201, x: 400, y: 108, count:90},
+{id: 203, x: 478, y: 143, count:90},
+{id: 204, x: 469, y: 135, count:90},
+{id: 205, x: 461, y: 128, count:90},
+{id: 206, x: 453, y: 121, count:90},
+{id: 207, x: 444, y: 113, count:90},
+{id: 209, x: 435, y: 107, count:90},
+{id: 210, x: 426, y: 102, count:90},
+{id: 211, x: 417, y: 97, count:90},
+{id: 212, x: 407, y: 93, count:90},
+{id: 213, x: 491, y: 130, count:90},
+{id: 214, x: 482, y: 122, count:90},
+{id: 215, x: 474, y: 114, count:90},
+{id: 216, x: 465, y: 106, count:90},
+{id: 217, x: 456, y: 98, count:90},
+{id: 219, x: 446, y: 92, count:90},
+{id: 220, x: 436, y: 86, count:90},
+{id: 221, x: 425, y: 79, count:90},
+{id: 222, x: 415, y: 74, count:90},
+{id: 223, x: 506, y: 121, count:90},
+{id: 224, x: 499, y: 113, count:90},
+{id: 225, x: 491, y: 105, count:90},
+{id: 226, x: 483, y: 97, count:90},
+{id: 227, x: 475, y: 91, count:90},
+{id: 228, x: 466, y: 84, count:90},
+{id: 230, x: 458, y: 78, count:90},
+{id: 231, x: 450, y: 72, count:90},
+{id: 232, x: 441, y: 67, count:90},
+{id: 233, x: 433, y: 62, count:90},
+{id: 234, x: 425, y: 58, count:90},
+{id: 235, x: 519, y: 110, count:90},
+{id: 236, x: 510, y: 101, count:90},
+{id: 237, x: 501, y: 93, count:90},
+{id: 238, x: 492, y: 84, count:90},
+{id: 239, x: 484, y: 77, count:90},
+{id: 240, x: 476, y: 70, count:90},
+{id: 241, x: 468, y: 64, count:90},
+{id: 242, x: 460, y: 59, count:90},
+{id: 243, x: 450, y: 53, count:90},
+{id: 244, x: 440, y: 48, count:90},
+{id: 245, x: 430, y: 43, count:90},
+{id: 248, x: 345, y: 188, count:90},
+{id: 249, x: 333, y: 184, count:90},
+{id: 250, x: 321, y: 181, count:90},
+{id: 251, x: 309, y: 180, count:90},
+{id: 253, x: 351, y: 170, count:90},
+{id: 254, x: 337, y: 166, count:90},
+{id: 255, x: 324, y: 164, count:90},
+{id: 256, x: 311, y: 162, count:90},
+{id: 257, x: 361, y: 155, count:90},
+{id: 258, x: 347, y: 151, count:90},
+{id: 259, x: 335, y: 148, count:90},
+{id: 260, x: 323, y: 146, count:90},
+{id: 261, x: 310, y: 145, count:90},
+{id: 262, x: 367, y: 140, count:90},
+{id: 263, x: 355, y: 136, count:90},
+{id: 264, x: 343, y: 132, count:90},
+{id: 265, x: 332, y: 130, count:90},
+{id: 266, x: 321, y: 128, count:90},
+{id: 267, x: 309, y: 127, count:90},
+{id: 268, x: 379, y: 115, count:90},
+{id: 269, x: 367, y: 111, count:90},
+{id: 270, x: 356, y: 107, count:90},
+{id: 271, x: 344, y: 104, count:90},
+{id: 272, x: 332, y: 102, count:90},
+{id: 273, x: 321, y: 101, count:90},
+{id: 274, x: 309, y: 101, count:90},
+{id: 276, x: 386, y: 100, count:90},
+{id: 277, x: 373, y: 95, count:90},
+{id: 278, x: 361, y: 91, count:90},
+{id: 279, x: 348, y: 88, count:90},
+{id: 280, x: 335, y: 85, count:90},
+{id: 281, x: 322, y: 84, count:90},
+{id: 282, x: 309, y: 83, count:90},
+{id: 284, x: 395, y: 84, count:90},
+{id: 285, x: 384, y: 80, count:90},
+{id: 286, x: 374, y: 76, count:90},
+{id: 287, x: 363, y: 73, count:90},
+{id: 288, x: 352, y: 70, count:90},
+{id: 290, x: 341, y: 68, count:90},
+{id: 291, x: 330, y: 66, count:90},
+{id: 292, x: 319, y: 65, count:90},
+{id: 293, x: 308, y: 64, count:90},
+{id: 294, x: 400, y: 66, count:90},
+{id: 295, x: 390, y: 62, count:90},
+{id: 296, x: 379, y: 59, count:90},
+{id: 297, x: 368, y: 56, count:90},
+{id: 298, x: 356, y: 53, count:90},
+{id: 300, x: 344, y: 50, count:90},
+{id: 301, x: 332, y: 48, count:90},
+{id: 302, x: 320, y: 47, count:90},
+{id: 303, x: 308, y: 47, count:90},
+{id: 304, x: 408, y: 51, count:90},
+{id: 305, x: 398, y: 47, count:90},
+{id: 306, x: 388, y: 44, count:90},
+{id: 307, x: 378, y: 41, count:90},
+{id: 308, x: 368, y: 38, count:90},
+{id: 309, x: 358, y: 36, count:90},
+{id: 311, x: 348, y: 34, count:90},
+{id: 312, x: 338, y: 32, count:90},
+{id: 313, x: 328, y: 31, count:90},
+{id: 314, x: 318, y: 30, count:90},
+{id: 315, x: 308, y: 30, count:90},
+{id: 317, x: 414, y: 37, count:90},
+{id: 318, x: 403, y: 32, count:90},
+{id: 319, x: 392, y: 28, count:90},
+{id: 320, x: 380, y: 24, count:90},
+{id: 321, x: 370, y: 21, count:90},
+{id: 322, x: 360, y: 19, count:90},
+{id: 323, x: 349, y: 17, count:90},
+{id: 324, x: 339, y: 15, count:90},
+{id: 325, x: 329, y: 14, count:90},
+{id: 326, x: 318, y: 13, count:90},
+{id: 327, x: 308, y: 13, count:90},
+{id: 329, x: 292, y: 181, count:90},
+{id: 330, x: 280, y: 182, count:90},
+{id: 331, x: 267, y: 185, count:90},
+{id: 332, x: 255, y: 188, count:90},
+{id: 333, x: 292, y: 160, count:90},
+{id: 334, x: 277, y: 162, count:90},
+{id: 335, x: 263, y: 165, count:90},
+{id: 336, x: 248, y: 170, count:90},
+{id: 337, x: 293, y: 143, count:90},
+{id: 338, x: 279, y: 145, count:90},
+{id: 339, x: 265, y: 147, count:90},
+{id: 340, x: 252, y: 150, count:90},
+{id: 341, x: 240, y: 154, count:90},
+{id: 342, x: 292, y: 126, count:90},
+{id: 343, x: 280, y: 128, count:90},
+{id: 344, x: 268, y: 130, count:90},
+{id: 345, x: 255, y: 132, count:90},
+{id: 346, x: 244, y: 135, count:90},
+{id: 347, x: 233, y: 139, count:90},
+{id: 348, x: 292, y: 100, count:90},
+{id: 349, x: 279, y: 100, count:90},
+{id: 350, x: 266, y: 102, count:90},
+{id: 351, x: 255, y: 104, count:90},
+{id: 352, x: 242, y: 107, count:90},
+{id: 353, x: 231, y: 111, count:90},
+{id: 354, x: 220, y: 115, count:90},
+{id: 356, x: 293, y: 82, count:90},
+{id: 357, x: 279, y: 83, count:90},
+{id: 358, x: 265, y: 85, count:90},
+{id: 359, x: 251, y: 87, count:90},
+{id: 360, x: 238, y: 91, count:90},
+{id: 361, x: 226, y: 95, count:90},
+{id: 362, x: 214, y: 100, count:90},
+{id: 364, x: 294, y: 64, count:90},
+{id: 365, x: 283, y: 64, count:90},
+{id: 366, x: 272, y: 65, count:90},
+{id: 367, x: 261, y: 67, count:90},
+{id: 368, x: 250, y: 69, count:90},
+{id: 370, x: 239, y: 71, count:90},
+{id: 371, x: 228, y: 74, count:90},
+{id: 372, x: 217, y: 78, count:90},
+{id: 373, x: 206, y: 82, count:90},
+{id: 374, x: 294, y: 46, count:90},
+{id: 375, x: 282, y: 47, count:90},
+{id: 376, x: 270, y: 48, count:90},
+{id: 377, x: 258, y: 49, count:90},
+{id: 378, x: 246, y: 51, count:90},
+{id: 380, x: 234, y: 54, count:90},
+{id: 381, x: 222, y: 58, count:90},
+{id: 382, x: 210, y: 62, count:90},
+{id: 383, x: 198, y: 67, count:90},
+{id: 384, x: 294, y: 29, count:90},
+{id: 385, x: 283, y: 30, count:90},
+{id: 386, x: 272, y: 31, count:90},
+{id: 387, x: 261, y: 32, count:90},
+{id: 388, x: 250, y: 34, count:90},
+{id: 389, x: 239, y: 36, count:90},
+{id: 391, x: 230, y: 38, count:90},
+{id: 392, x: 220, y: 41, count:90},
+{id: 393, x: 210, y: 44, count:90},
+{id: 394, x: 200, y: 47, count:90},
+{id: 395, x: 190, y: 51, count:90},
+{id: 397, x: 294, y: 14, count:90},
+{id: 398, x: 282, y: 14, count:90},
+{id: 399, x: 270, y: 15, count:90},
+{id: 400, x: 258, y: 16, count:90},
+{id: 401, x: 246, y: 18, count:90},
+{id: 402, x: 235, y: 20, count:90},
+{id: 403, x: 225, y: 23, count:90},
+{id: 404, x: 215, y: 26, count:90},
+{id: 405, x: 205, y: 29, count:90},
+{id: 406, x: 195, y: 32, count:90},
+{id: 407, x: 185, y: 36, count:90},
+{id: 409, x: 237, y: 196, count:90},
+{id: 410, x: 228, y: 202, count:90},
+{id: 411, x: 219, y: 209, count:90},
+{id: 412, x: 209, y: 217, count:90},
+{id: 413, x: 231, y: 179, count:90},
+{id: 414, x: 219, y: 186, count:90},
+{id: 415, x: 208, y: 194, count:90},
+{id: 416, x: 197, y: 205, count:90},
+{id: 417, x: 222, y: 163, count:90},
+{id: 418, x: 211, y: 169, count:90},
+{id: 419, x: 200, y: 176, count:90},
+{id: 420, x: 190, y: 185, count:90},
+{id: 421, x: 181, y: 194, count:90},
+{id: 422, x: 216, y: 147, count:90},
+{id: 423, x: 206, y: 153, count:90},
+{id: 424, x: 197, y: 159, count:90},
+{id: 425, x: 187, y: 166, count:90},
+{id: 426, x: 177, y: 174, count:90},
+{id: 427, x: 168, y: 183, count:90},
+{id: 428, x: 206, y: 121, count:90},
+{id: 429, x: 196, y: 126, count:90},
+{id: 430, x: 186, y: 133, count:90},
+{id: 431, x: 175, y: 140, count:90},
+{id: 432, x: 165, y: 149, count:90},
+{id: 433, x: 155, y: 157, count:90},
+{id: 434, x: 146, y: 166, count:90},
+{id: 436, x: 198, y: 106, count:90},
+{id: 437, x: 188, y: 111, count:90},
+{id: 438, x: 177, y: 118, count:90},
+{id: 439, x: 166, y: 126, count:90},
+{id: 440, x: 155, y: 135, count:90},
+{id: 441, x: 144, y: 145, count:90},
+{id: 442, x: 134, y: 155, count:90},
+{id: 444, x: 192, y: 90, count:90},
+{id: 445, x: 183, y: 95, count:90},
+{id: 446, x: 172, y: 101, count:90},
+{id: 447, x: 162, y: 108, count:90},
+{id: 448, x: 153, y: 114, count:90},
+{id: 450, x: 144, y: 121, count:90},
+{id: 451, x: 136, y: 128, count:90},
+{id: 452, x: 128, y: 135, count:90},
+{id: 453, x: 120, y: 143, count:90},
+{id: 454, x: 184, y: 73, count:90},
+{id: 455, x: 173, y: 79, count:90},
+{id: 456, x: 162, y: 86, count:90},
+{id: 457, x: 151, y: 93, count:90},
+{id: 458, x: 141, y: 100, count:90},
+{id: 460, x: 132, y: 108, count:90},
+{id: 461, x: 123, y: 116, count:90},
+{id: 462, x: 114, y: 125, count:90},
+{id: 463, x: 105, y: 133, count:90},
+{id: 464, x: 176, y: 58, count:90},
+{id: 465, x: 166, y: 63, count:90},
+{id: 466, x: 156, y: 69, count:90},
+{id: 467, x: 148, y: 74, count:90},
+{id: 468, x: 140, y: 80, count:90},
+{id: 469, x: 132, y: 86, count:90},
+{id: 471, x: 123, y: 92, count:90},
+{id: 472, x: 115, y: 98, count:90},
+{id: 473, x: 107, y: 106, count:90},
+{id: 474, x: 100, y: 114, count:90},
+{id: 475, x: 93, y: 122, count:90},
+{id: 478, x: 169, y: 44, count:90},
+{id: 479, x: 160, y: 48, count:90},
+{id: 480, x: 151, y: 53, count:90},
+{id: 481, x: 142, y: 58, count:90},
+{id: 482, x: 133, y: 64, count:90},
+{id: 483, x: 125, y: 71, count:90},
+{id: 484, x: 116, y: 77, count:90},
+{id: 485, x: 106, y: 85, count:90},
+{id: 486, x: 98, y: 92, count:90},
+{id: 487, x: 90, y: 101, count:90},
+{id: 488, x: 80, y: 110, count:90},
+{id: 489, x: 227, y: 254, count:90},
+{id: 490, x: 221, y: 264, count:90},
+{id: 491, x: 217, y: 274, count:90},
+{id: 492, x: 213, y: 243, count:90},
+{id: 493, x: 205, y: 255, count:90},
+{id: 494, x: 198, y: 268, count:90},
+{id: 495, x: 199, y: 232, count:90},
+{id: 496, x: 191, y: 241, count:90},
+{id: 497, x: 185, y: 253, count:90},
+{id: 498, x: 180, y: 264, count:90},
+{id: 499, x: 183, y: 221, count:90},
+{id: 500, x: 175, y: 232, count:90},
+{id: 501, x: 167, y: 246, count:90},
+{id: 502, x: 162, y: 259, count:90},
+{id: 503, x: 170, y: 208, count:90},
+{id: 504, x: 162, y: 218, count:90},
+{id: 505, x: 155, y: 229, count:90},
+{id: 506, x: 148, y: 241, count:90},
+{id: 507, x: 144, y: 253, count:90},
+{id: 508, x: 157, y: 197, count:90},
+{id: 509, x: 149, y: 206, count:90},
+{id: 510, x: 142, y: 216, count:90},
+{id: 511, x: 137, y: 226, count:90},
+{id: 512, x: 132, y: 238, count:90},
+{id: 513, x: 128, y: 249, count:90},
+{id: 514, x: 136, y: 179, count:90},
+{id: 515, x: 129, y: 188, count:90},
+{id: 516, x: 123, y: 197, count:90},
+{id: 517, x: 118, y: 207, count:90},
+{id: 518, x: 111, y: 219, count:90},
+{id: 519, x: 106, y: 230, count:90},
+{id: 520, x: 102, y: 241, count:90},
+{id: 522, x: 123, y: 168, count:90},
+{id: 523, x: 116, y: 178, count:90},
+{id: 524, x: 109, y: 188, count:90},
+{id: 525, x: 102, y: 199, count:90},
+{id: 526, x: 95, y: 211, count:90},
+{id: 527, x: 90, y: 224, count:90},
+{id: 528, x: 86, y: 237, count:90},
+{id: 530, x: 109, y: 156, count:90},
+{id: 531, x: 103, y: 165, count:90},
+{id: 532, x: 96, y: 174, count:90},
+{id: 533, x: 90, y: 183, count:90},
+{id: 534, x: 84, y: 193, count:90},
+{id: 536, x: 79, y: 204, count:90},
+{id: 537, x: 75, y: 214, count:90},
+{id: 538, x: 71, y: 223, count:90},
+{id: 539, x: 68, y: 233, count:90},
+{id: 540, x: 96, y: 144, count:90},
+{id: 541, x: 90, y: 153, count:90},
+{id: 542, x: 83, y: 163, count:90},
+{id: 543, x: 77, y: 172, count:90},
+{id: 544, x: 72, y: 182, count:90},
+{id: 545, x: 66, y: 193, count:90},
+{id: 546, x: 61, y: 203, count:90},
+{id: 547, x: 57, y: 213, count:90},
+{id: 548, x: 54, y: 222, count:90},
+{id: 549, x: 51, y: 231, count:90},
+{id: 550, x: 82, y: 134, count:90},
+{id: 551, x: 76, y: 143, count:90},
+{id: 552, x: 70, y: 152, count:90},
+{id: 553, x: 64, y: 160, count:90},
+{id: 554, x: 59, y: 168, count:90},
+{id: 555, x: 54, y: 176, count:90},
+{id: 557, x: 50, y: 185, count:90},
+{id: 558, x: 46, y: 194, count:90},
+{id: 559, x: 42, y: 204, count:90},
+{id: 560, x: 37, y: 215, count:90},
+{id: 561, x: 33, y: 226, count:90},
+{id: 564, x: 71, y: 122, count:90},
+{id: 565, x: 64, y: 132, count:90},
+{id: 566, x: 56, y: 142, count:90},
+{id: 567, x: 50, y: 152, count:90},
+{id: 568, x: 44, y: 162, count:90},
+{id: 569, x: 39, y: 172, count:90},
+{id: 570, x: 34, y: 182, count:90},
+{id: 571, x: 29, y: 192, count:90},
+{id: 572, x: 24, y: 202, count:90},
+{id: 573, x: 21, y: 212, count:90},
+{id: 574, x: 19, y: 222, count:90},
+{id: 576, x: 193, y: 286, count:90},
+{id: 577, x: 192, y: 298, count:90},
+{id: 578, x: 191, y: 310, count:90},
+{id: 580, x: 175, y: 282, count:90},
+{id: 581, x: 174, y: 295, count:90},
+{id: 582, x: 173, y: 308, count:90},
+{id: 583, x: 157, y: 276, count:90},
+{id: 584, x: 156, y: 287, count:90},
+{id: 585, x: 155, y: 298, count:90},
+{id: 586, x: 154, y: 309, count:90},
+{id: 587, x: 140, y: 271, count:90},
+{id: 588, x: 138, y: 282, count:90},
+{id: 589, x: 137, y: 293, count:90},
+{id: 590, x: 137, y: 304, count:90},
+{id: 591, x: 137, y: 315, count:90},
+{id: 592, x: 123, y: 266, count:90},
+{id: 593, x: 122, y: 276, count:90},
+{id: 594, x: 121, y: 286, count:90},
+{id: 595, x: 120, y: 296, count:90},
+{id: 596, x: 119, y: 306, count:90},
+{id: 597, x: 119, y: 316, count:90},
+{id: 599, x: 96, y: 260, count:90},
+{id: 600, x: 94, y: 271, count:90},
+{id: 601, x: 92, y: 293, count:90},
+{id: 602, x: 92, y: 305, count:90},
+{id: 603, x: 92, y: 317, count:90},
+{id: 604, x: 92, y: 329, count:90},
+{id: 606, x: 81, y: 257, count:90},
+{id: 607, x: 78, y: 269, count:90},
+{id: 609, x: 76, y: 291, count:90},
+{id: 610, x: 75, y: 305, count:90},
+{id: 611, x: 75, y: 318, count:90},
+{id: 612, x: 76, y: 331, count:90},
+{id: 614, x: 63, y: 250, count:90},
+{id: 615, x: 61, y: 260, count:90},
+{id: 616, x: 60, y: 271, count:90},
+{id: 618, x: 58, y: 289, count:90},
+{id: 619, x: 58, y: 303, count:90},
+{id: 620, x: 58, y: 317, count:90},
+{id: 621, x: 58, y: 331, count:90},
+{id: 623, x: 46, y: 247, count:90},
+{id: 624, x: 44, y: 258, count:90},
+{id: 625, x: 42, y: 269, count:90},
+{id: 626, x: 40, y: 288, count:90},
+{id: 627, x: 40, y: 299, count:90},
+{id: 628, x: 40, y: 310, count:90},
+{id: 629, x: 40, y: 321, count:90},
+{id: 630, x: 41, y: 332, count:90},
+{id: 632, x: 29, y: 243, count:90},
+{id: 633, x: 26, y: 254, count:90},
+{id: 634, x: 24, y: 265, count:90},
+{id: 636, x: 24, y: 284, count:90},
+{id: 637, x: 23, y: 296, count:90},
+{id: 638, x: 23, y: 309, count:90},
+{id: 639, x: 23, y: 322, count:90},
+{id: 640, x: 24, y: 335, count:90},
+{id: 642, x: 14, y: 236, count:90},
+{id: 643, x: 11, y: 246, count:90},
+{id: 644, x: 10, y: 256, count:90},
+{id: 645, x: 8, y: 266, count:90},
+{id: 648, x: 5, y: 300, count:90},
+{id: 649, x: 5, y: 311, count:90},
+{id: 650, x: 6, y: 322, count:90},
+
+
+
+
+
+
+
+ ]};
+ xx.store.setDataSet(test);
+ };
+
+ </script>
+ </body>
+</html>
BIN  heatmap_js/seat_map.jpg
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 seat_map/click_seat.rb
View
@@ -1,8 +1,8 @@
-seat_file = "/Users/alx/dev/politimap/seat_map/seatmap.txt"
+seat_file = "/Users/alx/dev/tetalab/politimap/seat_map/seatmap.txt"
-Shoes.app :title => "Seat Map" , :width => 459 do
+Shoes.app :title => "Seat Map" , :width => 600 do
- current = 642
+ current = 136
last_log=""
image("seat_map.jpg")
@@ -15,15 +15,28 @@
click do |button, x, y|
# Do not log if superior at seats height
- if y < 260
- last_log = "#{current}, #{x}, #{y}"
+ #if y < 260
+ last_log = "{id: #{current}, x: #{x - 1}, y: #{y + 5}, count:90},"
File.open(seat_file, 'a') do |f|
f.puts "#{last_log}\n"
end
- end
+ #end
# Update in all case, allow to pass missing numbers by clicking in grey area
current += 1
+ if [
+ 4, 29, 34, 37, 42, 46, 55, 61, 65, 69, 74,
+ 107, 115, 121, 131, 141, 159, 160, 161, 194,
+ 202, 208, 218, 229, 246, 247, 252, 275, 283, 289, 299,
+ 310, 316, 328, 355, 363, 369, 379, 390, 396,
+ 408, 435, 443, 449, 459, 470, 476, 477,
+ 521, 529, 535, 556, 562, 563, 575, 579, 598,
+ 605, 608, 613, 617, 622, 631, 635, 641, 646, 647
+ ].include? current
+ current += 1
+ current += 1 if [247, 477, 563, 647].include?(current)
+ current = 162 if current == 160
+ end
end
-end
+end
BIN  seat_map/seat_map.jpg
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  seat_map/seat_map_frame.jpg
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,175 seat_map/seatmap.txt
View
@@ -1,583 +1,592 @@
-1, 315, 234
-2, 316, 224
-3, 312, 213
-5, 328, 234
-6, 328, 222
-7, 325, 212
-8, 341, 235
-9, 341, 225
-10, 340, 217
-11, 338, 208
-12, 355, 237
-13, 354, 228
-14, 354, 219
-15, 353, 210
-16, 353, 204
-17, 368, 237
-18, 368, 230
-19, 369, 221
-20, 368, 216
-21, 366, 208
-22, 365, 201
-23, 388, 248
-24, 388, 238
-25, 388, 231
-26, 389, 224
-27, 386, 207
-28, 384, 197
-30, 401, 248
-31, 401, 241
-32, 402, 230
-33, 401, 221
-35, 398, 205
-36, 397, 191
-38, 413, 250
-39, 414, 241
-40, 415, 231
-41, 416, 220
-43, 413, 205
-44, 411, 196
-45, 409, 187
-47, 427, 251
-48, 429, 243
-49, 429, 234
-50, 429, 226
-51, 429, 217
-52, 426, 202
-53, 425, 194
-54, 422, 183
-56, 443, 253
-57, 443, 244
-58, 444, 234
-59, 444, 226
-60, 443, 219
-62, 440, 201
-63, 440, 190
-64, 437, 180
-66, 457, 241
-67, 456, 234
-68, 456, 225
-70, 453, 199
-71, 453, 192
-72, 451, 184
-73, 450, 176
-75, 296, 205
-76, 293, 198
-77, 289, 191
-78, 308, 201
-79, 305, 192
-80, 299, 184
-81, 321, 197
-82, 317, 190
-83, 314, 182
-84, 309, 175
-85, 335, 193
-86, 330, 185
-87, 325, 175
-88, 319, 167
-89, 349, 190
-90, 345, 182
-91, 339, 173
-92, 334, 166
-93, 329, 159
-94, 360, 186
-95, 357, 179
-96, 353, 171
-97, 349, 163
-98, 345, 157
-99, 339, 150
-100, 380, 180
-101, 377, 173
-102, 373, 164
-103, 369, 157
-104, 365, 150
-105, 360, 143
-106, 355, 135
-108, 392, 177
-109, 389, 168
-110, 384, 159
-111, 379, 150
-112, 375, 143
-113, 371, 137
-114, 365, 129
-116, 406, 173
-117, 402, 166
-118, 400, 159
-119, 396, 152
-120, 392, 144
-122, 389, 138
-123, 383, 131
-124, 379, 124
-125, 373, 118
-126, 418, 169
-127, 415, 162
-128, 412, 152
-129, 407, 144
-130, 404, 138
-132, 400, 130
-133, 395, 123
-134, 389, 116
-135, 385, 110
-136, 432, 164
-137, 429, 158
-138, 427, 151
-139, 424, 144
-140, 420, 138
-141, 417, 131
-143, 414, 124
-144, 409, 117
-145, 405, 112
-146, 401, 106
-147, 395, 99
-148, 445, 161
-149, 442, 154
-150, 439, 146
-151, 436, 140
-152, 433, 131
-153, 429, 124
-154, 425, 117
-155, 420, 111
-156, 416, 104
-157, 411, 97
-158, 406, 91
-162, 279, 180
-163, 272, 175
-164, 266, 170
-165, 290, 172
-166, 283, 166
-167, 272, 159
-168, 298, 162
-169, 291, 156
-170, 285, 152
-171, 278, 147
-172, 309, 154
-173, 301, 148
-174, 292, 140
-175, 283, 134
-176, 319, 146
-177, 311, 139
-178, 305, 133
-179, 298, 127
-180, 288, 123
-181, 330, 137
-182, 323, 131
-183, 316, 125
-184, 308, 119
-185, 300, 115
-186, 293, 110
-187, 345, 123
-188, 339, 117
-189, 332, 111
-190, 325, 107
-191, 317, 100
-192, 310, 96
-193, 302, 93
-195, 353, 115
-196, 348, 108
-197, 341, 103
-198, 333, 95
-199, 324, 91
-200, 317, 86
-201, 307, 81
-203, 364, 105
-204, 359, 100
-205, 354, 95
-206, 347, 89
-207, 340, 85
-208, 334, 80
-209, 327, 75
-210, 321, 71
-211, 313, 68
-212, 375, 97
-213, 374, 97
-214, 370, 92
-215, 362, 85
-216, 356, 79
-217, 350, 75
-219, 340, 69
-220, 333, 65
-221, 326, 61
-222, 318, 57
-223, 386, 87
-224, 381, 82
-225, 374, 77
-226, 370, 73
-227, 364, 67
-228, 356, 63
-230, 351, 57
-231, 344, 53
-232, 338, 50
-233, 332, 47
-234, 325, 41
-235, 395, 78
-236, 390, 73
-237, 384, 67
-238, 377, 62
-239, 371, 56
-240, 364, 52
-241, 359, 47
-242, 352, 42
-243, 345, 37
-244, 339, 34
-245, 331, 31
-248, 263, 141
-249, 255, 138
-250, 247, 136
-251, 238, 136
-253, 269, 130
-254, 260, 126
-255, 250, 123
-256, 239, 121
-257, 275, 117
-258, 266, 114
-259, 257, 111
-260, 247, 110
-261, 238, 108
-262, 281, 105
-263, 272, 102
-264, 263, 97
-265, 254, 97
-266, 246, 94
-267, 237, 95
-268, 289, 87
-269, 280, 83
-270, 271, 81
-271, 264, 79
-272, 255, 77
-273, 246, 76
-274, 236, 76
-276, 294, 74
-277, 285, 71
-278, 277, 69
-279, 268, 66
-280, 256, 65
-281, 248, 63
-282, 237, 63
-284, 300, 63
-285, 292, 60
-286, 286, 58
-287, 277, 55
-288, 269, 53
-290, 260, 51
-291, 253, 49
-292, 246, 50
-293, 238, 49
-294, 306, 50
-295, 297, 48
-296, 289, 45
-297, 281, 42
-298, 271, 39
-300, 263, 38
-301, 255, 37
-302, 246, 36
-303, 238, 36
-304, 313, 37
-305, 305, 34
-306, 298, 32
-307, 292, 29
-308, 284, 28
-309, 277, 26
-311, 268, 23
-312, 261, 23
-313, 254, 21
-314, 245, 22
-315, 237, 21
-317, 316, 24
-318, 311, 22
-319, 303, 18
-320, 295, 17
-321, 286, 14
-322, 278, 12
-323, 270, 11
-324, 262, 9
-325, 254, 8
-326, 246, 7
-327, 238, 7
-329, 222, 135
-330, 213, 136
-331, 205, 139
-332, 197, 142
-333, 222, 122
-334, 213, 122
-335, 203, 125
-336, 193, 130
-337, 223, 107
-338, 213, 109
-339, 204, 111
-340, 194, 113
-341, 186, 117
-342, 221, 95
-343, 214, 95
-344, 205, 96
-345, 196, 98
-346, 189, 101
-347, 180, 105
-348, 222, 75
-349, 213, 76
-350, 206, 77
-351, 196, 78
-352, 188, 80
-353, 181, 83
-354, 173, 85
-356, 221, 63
-357, 213, 63
-358, 203, 65
-359, 194, 66
-360, 185, 68
-361, 177, 70
-362, 166, 74
-364, 223, 49
-365, 215, 50
-366, 207, 51
-367, 198, 52
-368, 191, 52
-370, 183, 56
-371, 175, 57
-372, 168, 59
-373, 160, 63
-374, 223, 36
-375, 214, 36
-376, 205, 38
-377, 196, 38
-378, 187, 40
-380, 178, 42
-381, 171, 45
-382, 162, 47
-383, 155, 50
-384, 223, 21
-385, 215, 21
-386, 208, 23
-387, 201, 23
-388, 193, 24
-389, 185, 25
-391, 177, 27
-392, 171, 28
-393, 162, 31
-394, 155, 34
-395, 149, 37
-397, 221, 7
-398, 215, 7
-399, 207, 9
-400, 199, 9
-401, 192, 10
-402, 182, 11
-403, 175, 13
-404, 167, 16
-405, 159, 19
-406, 152, 20
-407, 144, 24
-409, 183, 147
-410, 176, 153
-411, 168, 157
-412, 162, 162
-413, 177, 136
-414, 168, 141
-415, 160, 145
-416, 152, 152
-417, 173, 122
-418, 165, 126
-419, 157, 133
-420, 149, 138
-421, 141, 146
-422, 168, 111
-423, 159, 115
-424, 153, 119
-425, 144, 124
-426, 139, 130
-427, 131, 135
-428, 159, 92
-429, 152, 97
-430, 144, 99
-431, 137, 106
-432, 130, 111
-433, 123, 116
-434, 116, 121
-436, 152, 80
-437, 145, 86
-438, 136, 90
-439, 130, 95
-440, 121, 101
-441, 115, 107
-442, 108, 114
-444, 147, 68
-445, 140, 73
-446, 135, 76
-447, 128, 80
-448, 121, 84
-450, 114, 91
-451, 109, 94
-452, 102, 99
-453, 97, 106
-454, 142, 56
-455, 134, 61
-456, 127, 65
-457, 119, 69
-458, 113, 74
-460, 105, 79
-461, 99, 84
-462, 93, 90
-463, 87, 95
-464, 137, 42
-465, 130, 46
-466, 122, 50
-467, 116, 53
-468, 111, 57
-469, 103, 62
-471, 98, 66
-472, 92, 72
-473, 87, 77
-474, 81, 81
-475, 75, 86
-478, 131, 29
-479, 124, 34
-480, 118, 37
-481, 110, 42
-482, 103, 46
-483, 96, 51
-484, 89, 55
-485, 84, 61
-486, 79, 65
-487, 73, 71
-488, 66, 76
-489, 172, 191
-490, 168, 197
-491, 165, 205
-492, 162, 182
-493, 157, 191
-494, 152, 199
-495, 152, 175
-496, 146, 183
-497, 144, 188
-498, 140, 197
-499, 141, 167
-500, 137, 173
-501, 132, 182
-502, 128, 191
-503, 131, 156
-504, 126, 164
-505, 121, 172
-506, 118, 180
-507, 114, 188
-508, 122, 148
-509, 117, 153
-510, 112, 162
-511, 108, 168
-512, 104, 177
-513, 102, 184
-514, 108, 135
-515, 102, 141
-516, 97, 149
-517, 93, 155
-518, 88, 164
-519, 86, 173
-520, 81, 180
-522, 97, 126
-523, 90, 135
-524, 88, 141
-525, 81, 150
-526, 77, 158
-527, 73, 166
-528, 69, 174
-530, 86, 117
-531, 81, 123
-532, 77, 129
-533, 72, 138
-534, 69, 143
-536, 65, 150
-537, 62, 158
-538, 59, 164
-539, 56, 172
-540, 76, 107
-541, 70, 115
-542, 65, 122
-543, 60, 129