Sha256: 94224a536d90d5efa167b395e4260606bba1d36f6641c317d744a87a1510a9ea

Contents?: true

Size: 1.1 KB

Versions: 4

Compression:

Stored size: 1.1 KB

Contents

<table class="table table-bordered">
  <tr>
    <td>
      <p class="text-center"><b>Visitor Map</b></p>
      <div id="world-map" class="info" style="width: 100%px; height: 160px"></div>
    </td>
  </tr>
</table>

<script type="text/javascript">
  // Map Overlay
  var geoLocationData = {}; 
  $(function(){
    $('#world-map').vectorMap({
      map: 'world_mill_en',
      min: 0,
      backgroundColor: '#fff',
      regionStyle: {
        initial: {
          fill: '#ddd',
          "fill-opacity": 1,
          stroke: 'none',
          "stroke-width": 0,
          "stroke-opacity": 1
        },
        hover: {
          fill: '#bbb',
          "fill-opacity": 0.8
        },
        selected: {
          fill: 'yellow'
        },
        selectedHover: {
        }
      },
      series: {
        regions: [{
          scale: ['#C8EEFF', '#0071A4'],
          values: geoLocationData,
          normalizeFunction: 'polynomial'
        }]
      },
      onRegionLabelShow: function(e, el, code){
	  c = geoLocationData[code];
	  if(c != undefined)
	  el.html(el.html()+' ('+c+')');
      }
    });
  });
</script>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
redis_analytics-1.1.0 app/views/redis_analytics/visits/_world_map.html.erb
redis_analytics-1.0.1 app/views/redis_analytics/visits/_world_map.html.erb
redis_analytics-1.0.0 app/views/redis_analytics/visits/_world_map.html.erb
redis_analytics-0.7.1 app/views/redis_analytics/visits/_world_map.html.erb