Commit 27778da4 by Clinton Blackburn

Updated Geolocation Map

- Using edX color scheme
- Grading with a square root scale
- Using full container width
parent b9dec3c1
...@@ -15,9 +15,9 @@ define(['jquery', 'd3', 'datamaps', 'underscore', 'views/attribute-listener-view ...@@ -15,9 +15,9 @@ define(['jquery', 'd3', 'datamaps', 'underscore', 'views/attribute-listener-view
// colors can be supplied // colors can be supplied
self.options = _.defaults(options, { self.options = _.defaults(options, {
lowColor: '#f8f8f8', lowColor: '#bee1f5',
highColor: '#e6550d', highColor: '#124d6f',
borderColor: '#c0c0c0' borderColor: '#ffffff'
}); });
self.renderIfDataAvailable(); self.renderIfDataAvailable();
...@@ -57,7 +57,7 @@ define(['jquery', 'd3', 'datamaps', 'underscore', 'views/attribute-listener-view ...@@ -57,7 +57,7 @@ define(['jquery', 'd3', 'datamaps', 'underscore', 'views/attribute-listener-view
colorMap; colorMap;
// single hue linear scaled // single hue linear scaled
colorMap = d3.scale.linear() colorMap = d3.scale.sqrt()
.domain([0, max]) .domain([0, max])
.range([self.options.lowColor, self.options.highColor]); .range([self.options.lowColor, self.options.highColor]);
......
...@@ -35,21 +35,22 @@ ...@@ -35,21 +35,22 @@
.world-map { .world-map {
position: relative; position: relative;
margin: 0 auto; margin: 0 auto;
// this is the ratio of width:height to keep the map from being cut off
width: 900px; width: 100%;
height: 400px; height: 450px;
background-color: white;
border: $edx-gray 1px solid;
} }
@media (max-width: $screen-md) { @media (max-width: $screen-md) {
.world-map { .world-map {
width: 450px; height: 250px;
height: 200px;
} }
} }
@media (max-width: $screen-sm) { @media (max-width: $screen-sm) {
.world-map { .world-map {
width: 100%;
height: 300px; height: 300px;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment