mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-09 14:45:35 +00:00
Responsive tweaks and refactoring
This commit is contained in:
@@ -19,7 +19,7 @@ angular.module('app').directive('areaChart', ['$window', function ($window) {
|
||||
dragging = false,
|
||||
// Define Axes
|
||||
xAxis = d3.svg.axis().outerTickSize(0).orient("bottom").tickFormat(d3.format('.2r')),
|
||||
yAxis = d3.svg.axis().outerTickSize(0).orient("left").tickFormat(fmt),
|
||||
yAxis = d3.svg.axis().ticks(6).outerTickSize(0).orient("left").tickFormat(fmt),
|
||||
x = d3.scale.linear(),
|
||||
y = d3.scale.linear();
|
||||
|
||||
@@ -78,7 +78,7 @@ angular.module('app').directive('areaChart', ['$window', function ($window) {
|
||||
|
||||
function render() {
|
||||
var width = element[0].parentElement.offsetWidth,
|
||||
height = width * 0.6,
|
||||
height = width * 0.5,
|
||||
w = width - margin.left - margin.right,
|
||||
h = height - margin.top - margin.bottom,
|
||||
data = [];
|
||||
|
||||
@@ -50,10 +50,10 @@ angular.module('app').directive('slider', ['$window', function ($window) {
|
||||
.scale(x)
|
||||
.orient("bottom")
|
||||
.tickFormat(function(d) { return d + unit; })
|
||||
.ticks(5)
|
||||
.tickValues([0, scope.max / 4, scope.max / 2, (3 * scope.max) / 4, scope.max])
|
||||
.tickSize(0)
|
||||
.tickPadding(12))
|
||||
.select(".domain");
|
||||
.select(".domain");
|
||||
lbl.attr('x', w + 20);
|
||||
slider.call(brush.extent([val, val])).call(brush.event);
|
||||
slider.selectAll(".extent,.resize").remove();
|
||||
|
||||
Reference in New Issue
Block a user