Browse Source

Change jVectorMap to JQVMap

christianesperar 8 years ago
parent
commit
c103facfdb

+ 2 - 1
bower.json

@@ -73,7 +73,8 @@
     "jszip": "Stuk/jszip#v2.6.0",
     "echarts": "^3.1.7",
     "malihu-custom-scrollbar-plugin": "^3.1.3",
-    "animate.css": "^3.5.1"
+    "animate.css": "^3.5.1",
+    "jqvmap": "https://github.com/christianesperar/jqvmap.git#master"
   },
   "resolutions": {
     "jquery": "^2.2.3",

+ 18 - 22
production/index.html

@@ -17,8 +17,8 @@
     <link href="../vendors/iCheck/skins/flat/green.css" rel="stylesheet">
     <!-- bootstrap-progressbar -->
     <link href="../vendors/bootstrap-progressbar/css/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet">
-    <!-- jVectorMap -->
-    <link href="css/maps/jquery-jvectormap-2.0.3.css" rel="stylesheet"/>
+    <!-- JQVMap -->
+    <link href="../vendors/jqvmap/dist/jqvmap.min.css" rel="stylesheet"/>
 
     <!-- Custom Theme Style -->
     <link href="../build/css/custom.min.css" rel="stylesheet">
@@ -1006,8 +1006,10 @@
     <script src="js/flot/date.js"></script>
     <script src="js/flot/jquery.flot.spline.js"></script>
     <script src="js/flot/curvedLines.js"></script>
-    <!-- jVectorMap -->
-    <script src="js/maps/jquery-jvectormap-2.0.3.min.js"></script>
+    <!-- JQVMap -->
+    <script src="../vendors/jqvmap/dist/jquery.vmap.js"></script>
+    <script src="../vendors/jqvmap/dist/maps/jquery.vmap.world.js"></script>
+    <script src="../vendors/jqvmap/examples/js/jquery.vmap.sampledata.js"></script>
     <!-- bootstrap-daterangepicker -->
     <script src="js/moment/moment.min.js"></script>
     <script src="js/datepicker/daterangepicker.js"></script>
@@ -1091,30 +1093,24 @@
     </script>
     <!-- /Flot -->
 
-    <!-- jVectorMap -->
-    <script src="js/maps/jquery-jvectormap-world-mill-en.js"></script>
-    <script src="js/maps/jquery-jvectormap-us-aea-en.js"></script>
-    <script src="js/maps/gdp-data.js"></script>
+    <!-- JQVMap -->
     <script>
       $(document).ready(function(){
         $('#world-map-gdp').vectorMap({
-          map: 'world_mill_en',
-          backgroundColor: 'transparent',
-          zoomOnScroll: false,
-          series: {
-            regions: [{
-              values: gdpData,
-              scale: ['#E6F2F0', '#149B7E'],
-              normalizeFunction: 'polynomial'
-            }]
-          },
-          onRegionTipShow: function(e, el, code) {
-            el.html(el.html() + ' (GDP - ' + gdpData[code] + ')');
-          }
+            map: 'world_en',
+            backgroundColor: null,
+            color: '#ffffff',
+            hoverOpacity: 0.7,
+            selectedColor: '#666666',
+            enableZoom: true,
+            showTooltip: true,
+            values: sample_data,
+            scaleColors: ['#E6F2F0', '#149B7E'],
+            normalizeFunction: 'polynomial'
         });
       });
     </script>
-    <!-- /jVectorMap -->
+    <!-- /JQVMap -->
 
     <!-- Skycons -->
     <script>

+ 0 - 2
production/index2.html

@@ -13,8 +13,6 @@
     <link href="../vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
     <!-- Font Awesome -->
     <link href="../vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
-    <!-- jVectorMap -->
-    <link href="css/maps/jquery-jvectormap-2.0.3.css" rel="stylesheet"/>
 
     <!-- Custom Theme Style -->
     <link href="../build/css/custom.min.css" rel="stylesheet">

+ 0 - 185
production/js/maps/gdp-data.js

@@ -1,185 +0,0 @@
-var gdpData = {
-  "AF": 16.63,
-  "AL": 11.58,
-  "DZ": 158.97,
-  "AO": 85.81,
-  "AG": 1.1,
-  "AR": 351.02,
-  "AM": 8.83,
-  "AU": 1219.72,
-  "AT": 366.26,
-  "AZ": 52.17,
-  "BS": 7.54,
-  "BH": 21.73,
-  "BD": 105.4,
-  "BB": 3.96,
-  "BY": 52.89,
-  "BE": 461.33,
-  "BZ": 1.43,
-  "BJ": 6.49,
-  "BT": 1.4,
-  "BO": 19.18,
-  "BA": 16.2,
-  "BW": 12.5,
-  "BR": 2023.53,
-  "BN": 11.96,
-  "BG": 44.84,
-  "BF": 8.67,
-  "BI": 1.47,
-  "KH": 11.36,
-  "CM": 21.88,
-  "CA": 1563.66,
-  "CV": 1.57,
-  "CF": 2.11,
-  "TD": 7.59,
-  "CL": 199.18,
-  "CN": 5745.13,
-  "CO": 283.11,
-  "KM": 0.56,
-  "CD": 12.6,
-  "CG": 11.88,
-  "CR": 35.02,
-  "CI": 22.38,
-  "HR": 59.92,
-  "CY": 22.75,
-  "CZ": 195.23,
-  "DK": 304.56,
-  "DJ": 1.14,
-  "DM": 0.38,
-  "DO": 50.87,
-  "EC": 61.49,
-  "EG": 216.83,
-  "SV": 21.8,
-  "GQ": 14.55,
-  "ER": 2.25,
-  "EE": 19.22,
-  "ET": 30.94,
-  "FJ": 3.15,
-  "FI": 231.98,
-  "FR": 2555.44,
-  "GA": 12.56,
-  "GM": 1.04,
-  "GE": 11.23,
-  "DE": 3305.9,
-  "GH": 18.06,
-  "GR": 305.01,
-  "GD": 0.65,
-  "GT": 40.77,
-  "GN": 4.34,
-  "GW": 0.83,
-  "GY": 2.2,
-  "HT": 6.5,
-  "HN": 15.34,
-  "HK": 226.49,
-  "HU": 132.28,
-  "IS": 12.77,
-  "IN": 1430.02,
-  "ID": 695.06,
-  "IR": 337.9,
-  "IQ": 84.14,
-  "IE": 204.14,
-  "IL": 201.25,
-  "IT": 2036.69,
-  "JM": 13.74,
-  "JP": 5390.9,
-  "JO": 27.13,
-  "KZ": 129.76,
-  "KE": 32.42,
-  "KI": 0.15,
-  "KR": 986.26,
-  "UNDEFINED": 5.73,
-  "KW": 117.32,
-  "KG": 4.44,
-  "LA": 6.34,
-  "LV": 23.39,
-  "LB": 39.15,
-  "LS": 1.8,
-  "LR": 0.98,
-  "LY": 77.91,
-  "LT": 35.73,
-  "LU": 52.43,
-  "MK": 9.58,
-  "MG": 8.33,
-  "MW": 5.04,
-  "MY": 218.95,
-  "MV": 1.43,
-  "ML": 9.08,
-  "MT": 7.8,
-  "MR": 3.49,
-  "MU": 9.43,
-  "MX": 1004.04,
-  "MD": 5.36,
-  "MN": 5.81,
-  "ME": 3.88,
-  "MA": 91.7,
-  "MZ": 10.21,
-  "MM": 35.65,
-  "NA": 11.45,
-  "NP": 15.11,
-  "NL": 770.31,
-  "NZ": 138,
-  "NI": 6.38,
-  "NE": 5.6,
-  "NG": 206.66,
-  "NO": 413.51,
-  "OM": 53.78,
-  "PK": 174.79,
-  "PA": 27.2,
-  "PG": 8.81,
-  "PY": 17.17,
-  "PE": 153.55,
-  "PH": 189.06,
-  "PL": 438.88,
-  "PT": 223.7,
-  "QA": 126.52,
-  "RO": 158.39,
-  "RU": 1476.91,
-  "RW": 5.69,
-  "WS": 0.55,
-  "ST": 0.19,
-  "SA": 434.44,
-  "SN": 12.66,
-  "RS": 38.92,
-  "SC": 0.92,
-  "SL": 1.9,
-  "SG": 217.38,
-  "SK": 86.26,
-  "SI": 46.44,
-  "SB": 0.67,
-  "ZA": 354.41,
-  "ES": 1374.78,
-  "LK": 48.24,
-  "KN": 0.56,
-  "LC": 1,
-  "VC": 0.58,
-  "SD": 65.93,
-  "SR": 3.3,
-  "SZ": 3.17,
-  "SE": 444.59,
-  "CH": 522.44,
-  "SY": 59.63,
-  "TW": 426.98,
-  "TJ": 5.58,
-  "TZ": 22.43,
-  "TH": 312.61,
-  "TL": 0.62,
-  "TG": 3.07,
-  "TO": 0.3,
-  "TT": 21.2,
-  "TN": 43.86,
-  "TR": 729.05,
-  "TM": 0,
-  "UG": 17.12,
-  "UA": 136.56,
-  "AE": 239.65,
-  "GB": 2258.57,
-  "US": 14624.18,
-  "UY": 40.71,
-  "UZ": 37.72,
-  "VU": 0.72,
-  "VE": 285.21,
-  "VN": 101.99,
-  "YE": 30.02,
-  "ZM": 15.69,
-  "ZW": 5.57
-};

File diff suppressed because it is too large
+ 0 - 0
production/js/maps/jquery-jvectormap-2.0.3.min.js


File diff suppressed because it is too large
+ 0 - 0
production/js/maps/jquery-jvectormap-us-aea-en.js


File diff suppressed because it is too large
+ 0 - 0
production/js/maps/jquery-jvectormap-world-mill-en.js


File diff suppressed because it is too large
+ 0 - 0
production/js/maps/us-unemployment.json


+ 41 - 78
production/other_charts.html

@@ -15,8 +15,8 @@
     <link href="../vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
     <!-- iCheck -->
     <link href="../vendors/iCheck/skins/flat/green.css" rel="stylesheet">
-    <!-- jVectorMap -->
-    <link href="css/maps/jquery-jvectormap-2.0.3.css" rel="stylesheet"/>
+    <!-- JQVMap -->
+    <link href="../vendors/jqvmap/dist/jqvmap.min.css" rel="stylesheet"/>
 
     <!-- Custom Theme Style -->
     <link href="../build/css/custom.min.css" rel="stylesheet">
@@ -445,98 +445,61 @@
     <script src="../vendors/nprogress/nprogress.js"></script>
     <!-- jQuery Sparklines -->
     <script src="../vendors/jquery-sparkline/dist/jquery.sparkline.min.js"></script>
-    <!-- jVectorMap -->
-    <script src="js/maps/jquery-jvectormap-2.0.3.min.js"></script>
+    <!-- JQVMap -->
+    <script src="../vendors/jqvmap/dist/jquery.vmap.js"></script>
+    <script src="../vendors/jqvmap/dist/maps/jquery.vmap.world.js"></script>
+    <script src="../vendors/jqvmap/dist/maps/jquery.vmap.usa.js"></script>
+    <script src="../vendors/jqvmap/examples/js/jquery.vmap.sampledata.js"></script>
     <!-- easy-pie-chart -->
     <script src="../vendors/jquery.easy-pie-chart/dist/jquery.easypiechart.min.js"></script>
 
     <!-- Custom Theme Scripts -->
     <script src="../build/js/custom.min.js"></script>
-
-    <!-- jVectorMap -->
-    <script src="js/maps/gdp-data.js"></script>
-    <script src="js/maps/jquery-jvectormap-world-mill-en.js"></script>
-    <script src="js/maps/jquery-jvectormap-us-aea-en.js"></script>
+    
+    <!-- JQVMap -->
     <script>
-      $(document).ready(function() {
-        $.getJSON('js/maps/us-unemployment.json', function(data) {
-          var val = 2009,
-            statesValues = jvm.values.apply({}, jvm.values(data.states)),
-            metroPopValues = Array.prototype.concat.apply([], jvm.values(data.metro.population)),
-            metroUnemplValues = Array.prototype.concat.apply([], jvm.values(data.metro.unemployment));
-
-          $('#usa_map').vectorMap({
-            map: 'us_aea_en',
-            markers: data.metro.coords,
-            backgroundColor: 'transparent',
-            zoomOnScroll: false,
-            series: {
-              markers: [{
-                attribute: 'fill',
-                scale: ['#FEE5D9', '#A50F15'],
-                values: data.metro.unemployment[val],
-                min: jvm.min(metroUnemplValues),
-                max: jvm.max(metroUnemplValues)
-              }, {
-                attribute: 'r',
-                scale: [5, 20],
-                values: data.metro.population[val],
-                min: jvm.min(metroPopValues),
-                max: jvm.max(metroPopValues)
-              }],
-              regions: [{
-                scale: ['#E6F2F0', '#149B7E'],
-                attribute: 'fill',
-                values: data.states[val],
-                min: jvm.min(statesValues),
-                max: jvm.max(statesValues)
-              }]
-            },
-            onMarkerTipShow: function(event, label, index) {
-              label.html(
-                '<b>' + data.metro.names[index] + '</b><br/>' +
-                '<b>Population: </b>' + data.metro.population[val][index] + '</br>' +
-                '<b>Unemployment rate: </b>' + data.metro.unemployment[val][index] + '%'
-              );
-            },
-            onRegionTipShow: function(event, label, code) {
-              label.html(
-                '<b>' + label.html() + '</b></br>' +
-                '<b>Unemployment rate: </b>' + data.states[val][code] + '%'
-              );
-            }
-          });
+      $(document).ready(function(){
+        $('#usa_map').vectorMap({
+            map: 'usa_en',
+            backgroundColor: null,
+            color: '#ffffff',
+            hoverOpacity: 0.7,
+            selectedColor: '#666666',
+            enableZoom: true,
+            showTooltip: true,
+            values: sample_data,
+            scaleColors: ['#E6F2F0', '#149B7E'],
+            normalizeFunction: 'polynomial'
         });
-      });
-    </script>
-    <script>
-      $(document).ready(function() {
+
         $('#world-map-gdp').vectorMap({
-          map: 'world_mill_en',
-          backgroundColor: 'transparent',
-          zoomOnScroll: false,
-          series: {
-            regions: [{
-              values: gdpData,
-              scale: ['#E6F2F0', '#149B7E'],
-              normalizeFunction: 'polynomial'
-            }]
-          },
-          onRegionTipShow: function(e, el, code) {
-            el.html(el.html() + ' (GDP - ' + gdpData[code] + ')');
-          }
+            map: 'world_en',
+            backgroundColor: null,
+            color: '#ffffff',
+            hoverOpacity: 0.7,
+            selectedColor: '#666666',
+            enableZoom: true,
+            showTooltip: true,
+            values: sample_data,
+            scaleColors: ['#E6F2F0', '#149B7E'],
+            normalizeFunction: 'polynomial'
         });
       });
     </script>
-    <!-- /jVectorMap -->
+    <!-- /JQVMap -->
 
     <!-- easy-pie-chart -->
     <script>
       $(document).ready(function() {
         $('.chart').easyPieChart({
-          easing: 'easeOutBounce',
-          lineWidth: '6',
-          barColor: '#75BCDD',
+          easing: 'easeOutElastic',
+          delay: 3000,
+          barColor: '#26B99A',
+          trackColor: '#fff',
+          scaleColor: false,
+          lineWidth: 20,
+          trackWidth: 16,
+          lineCap: 'butt',
           onStep: function(from, to, percent) {
             $(this.el).find('.percent').text(Math.round(percent));
           }

+ 41 - 0
vendors/jqvmap/.bower.json

@@ -0,0 +1,41 @@
+{
+  "name": "jqvmap",
+  "homepage": "http://jqvmap.com",
+  "authors": [
+    "JQVMap"
+  ],
+  "license": "(MIT OR GPL-3.0)",
+  "description": "jQuery Vector Map Library",
+  "main": "dist/jquery.vmap.min.js",
+  "keywords": [
+    "jquery",
+    "map",
+    "svg",
+    "vml",
+    "vector"
+  ],
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/manifestinteractive/jqvmap.git"
+  },
+  "dependencies": {
+    "jquery": ">=1.11.3"
+  },
+  "ignore": [
+    "**/.*",
+    "node_modules",
+    "bower_components",
+    "test",
+    "tests"
+  ],
+  "_release": "3a45b04e09",
+  "_resolution": {
+    "type": "branch",
+    "branch": "master",
+    "commit": "3a45b04e099bdaee5152b39eef21d6568d35c86d"
+  },
+  "_source": "https://github.com/christianesperar/jqvmap.git",
+  "_target": "master",
+  "_originalSource": "https://github.com/christianesperar/jqvmap.git",
+  "_direct": true
+}

Some files were not shown because too many files changed in this diff