Update Rickshaw from 1.5.0 to 1.5.1

Change-Id: I88acaab7a0cfff71b9fd96d5a6c8a5fcaae1b8d1
Closes-Bug: #1531313
This commit is contained in:
Rajat Vig 2016-01-05 14:03:17 -08:00
parent d4b60cf4d6
commit 7be3a603cf
3 changed files with 242 additions and 206 deletions

View File

@ -11,7 +11,7 @@ NAME = __name__.split('.')[-1] # package name (e.g. 'foo' or 'foo_bar')
# please use a all-lowercase valid python # please use a all-lowercase valid python
# package name # package name
VERSION = '1.5.0' # version of the packaged files, please use the upstream VERSION = '1.5.1' # version of the packaged files, please use the upstream
# version number # version number
BUILD = '0' # our package build number, so we can release new builds BUILD = '0' # our package build number, so we can release new builds
# with fixes for xstatic stuff. # with fixes for xstatic stuff.

View File

@ -28,6 +28,12 @@
background: white; background: white;
white-space: nowrap; white-space: nowrap;
} }
.rickshaw_graph .detail .x_label.left {
left: 0;
}
.rickshaw_graph .detail .x_label.right {
right: 0;
}
.rickshaw_graph .detail .item { .rickshaw_graph .detail .item {
position: absolute; position: absolute;
z-index: 2; z-index: 2;
@ -40,28 +46,54 @@
color: white; color: white;
border: 1px solid rgba(0, 0, 0, 0.4); border: 1px solid rgba(0, 0, 0, 0.4);
margin-left: 1em; margin-left: 1em;
margin-right: 1em;
margin-top: -1em; margin-top: -1em;
white-space: nowrap; white-space: nowrap;
} }
.rickshaw_graph .detail .item.left {
left: 0;
}
.rickshaw_graph .detail .item.right {
right: 0;
}
.rickshaw_graph .detail .item.active { .rickshaw_graph .detail .item.active {
opacity: 1; opacity: 1;
background: rgba(0, 0, 0, 0.8); background: rgba(0, 0, 0, 0.8);
} }
.rickshaw_graph .detail .item:before { .rickshaw_graph .detail .item:after {
content: "\25c2";
position: absolute; position: absolute;
left: -0.5em; display: block;
color: rgba(0, 0, 0, 0.7);
width: 0; width: 0;
height: 0;
content: "";
border: 5px solid transparent;
}
.rickshaw_graph .detail .item.left:after {
top: 1em;
left: -5px;
margin-top: -5px;
border-right-color: rgba(0, 0, 0, 0.8);
border-left-width: 0;
}
.rickshaw_graph .detail .item.right:after {
top: 1em;
right: -5px;
margin-top: -5px;
border-left-color: rgba(0, 0, 0, 0.8);
border-right-width: 0;
} }
.rickshaw_graph .detail .dot { .rickshaw_graph .detail .dot {
width: 4px; width: 4px;
height: 4px; height: 4px;
margin-left: -4px; margin-left: -3px;
margin-top: -3px; margin-top: -3.5px;
border-radius: 5px; border-radius: 5px;
position: absolute; position: absolute;
box-shadow: 0 0 2px rgba(0, 0, 0, 0.6); box-shadow: 0 0 2px rgba(0, 0, 0, 0.6);
box-sizing: content-box;
-moz-box-sizing: content-box;
background: white; background: white;
border-width: 2px; border-width: 2px;
border-style: solid; border-style: solid;
@ -187,7 +219,7 @@
.rickshaw_graph .x_axis_d3 { .rickshaw_graph .x_axis_d3 {
fill: none; fill: none;
} }
.rickshaw_graph .y_ticks .tick, .rickshaw_graph .y_ticks .tick line,
.rickshaw_graph .x_ticks_d3 .tick { .rickshaw_graph .x_ticks_d3 .tick {
stroke: rgba(0, 0, 0, 0.16); stroke: rgba(0, 0, 0, 0.16);
stroke-width: 2px; stroke-width: 2px;
@ -201,6 +233,9 @@
stroke-width: 1px; stroke-width: 1px;
stroke-dasharray: 1 1; stroke-dasharray: 1 1;
} }
.rickshaw_graph .y_grid .tick[data-y-value="0"] {
stroke-dasharray: 1 0;
}
.rickshaw_graph .y_grid path, .rickshaw_graph .y_grid path,
.rickshaw_graph .x_grid_d3 path { .rickshaw_graph .x_grid_d3 path {
fill: none; fill: none;

View File

@ -1931,6 +1931,8 @@ Rickshaw.Graph.Behavior.Series.Toggle = function(args) {
line.element.classList.add('disabled'); line.element.classList.add('disabled');
} }
self.graph.update();
}.bind(this); }.bind(this);
var label = line.element.getElementsByTagName('span')[0]; var label = line.element.getElementsByTagName('span')[0];
@ -1976,6 +1978,8 @@ Rickshaw.Graph.Behavior.Series.Toggle = function(args) {
} }
self.graph.update();
}; };
}; };
@ -2017,12 +2021,10 @@ Rickshaw.Graph.Behavior.Series.Toggle = function(args) {
} }
s.disabled = true; s.disabled = true;
self.graph.update();
}; };
s.enable = function() { s.enable = function() {
s.disabled = false; s.disabled = false;
self.graph.update();
}; };
} ); } );
}; };
@ -3759,7 +3761,6 @@ Rickshaw.Graph.Smoother = Rickshaw.Class.create({
max: 100, max: 100,
slide: function( event, ui ) { slide: function( event, ui ) {
self.setScale(ui.value); self.setScale(ui.value);
self.graph.update();
} }
} ); } );
} ); } );