From 01eafa2acd049473bfb21a4db8793cfacc4d09b7 Mon Sep 17 00:00:00 2001
From: Akshen
Date: Thu, 14 Sep 2017 13:03:05 +0530
Subject: Adds India Map
- Updates model adds state as option
- Instructor can view number of workshops state-wise in Map of India
- Updates test cases for test_model and test_views
- Updates .gitignore
- Updates form
---
workshop_app/templates/workshop_app/view_faq.html | 5 +-
.../templates/workshop_app/workshop_stats.html | 180 ++++++++++++++++-----
2 files changed, 145 insertions(+), 40 deletions(-)
(limited to 'workshop_app/templates')
diff --git a/workshop_app/templates/workshop_app/view_faq.html b/workshop_app/templates/workshop_app/view_faq.html
index b3eb5f1..9298254 100644
--- a/workshop_app/templates/workshop_app/view_faq.html
+++ b/workshop_app/templates/workshop_app/view_faq.html
@@ -163,6 +163,7 @@
+
+
-
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/workshop_app/templates/workshop_app/workshop_stats.html b/workshop_app/templates/workshop_app/workshop_stats.html
index bc6387b..d923c92 100644
--- a/workshop_app/templates/workshop_app/workshop_stats.html
+++ b/workshop_app/templates/workshop_app/workshop_stats.html
@@ -23,16 +23,21 @@
{% block extra %}
-
-
+
+
+
+
+
+
+
+
+ else if (this.value == 'MOIN') {
+ if(myChart){
+ myChart.destroy();
+ }
+
+ var dWidth = $(window).width() * 0.9;
+ var dHeight = $(window).height() * 0.9;
+
+ $( "#visualization" ).dialog({
+ resizable: false,
+ draggable: true,
+ title: 'Map of India',
+ closeOnEscape: true,
+ stack: true,
+ zIndex: 10000,
+ width: dWidth,
+ height: dHeight,
+ modal: true
+ });
+
+ document.getElementById("visualization").style.visibility='visible';
+ function drawVisualization() {
+ var data = google.visualization.arrayToDataTable(
+ {{ india_map | safe }}
+ );
+
+ var opts = {
+ region: 'IN',
+ domain: 'IN',
+ displayMode: 'regions',
+ resolution: 'provinces',
+ colorAxis: {colors: ['orange']},
+ legend: {position: 'top'},
+ };
+
+ var geochart = new google.visualization.GeoChart(
+ document.getElementById('visualization'));
+ geochart.draw(data, opts);
+ };
+ if(google) {
+ google.load('visualization', '1.0', {
+ packages: ['geochart'],
+ callback: function() {
+ // do stuff, if you wan't - it doesn't matter, because the page isn't blank!
+ drawVisualization();
+ }
+ })
+ }
+ }
+ });
+
+
+