Skip to content

Commit

Permalink
Fixes issue w3c#119
Browse files Browse the repository at this point in the history
  • Loading branch information
almossawi committed Aug 19, 2014
1 parent e55b748 commit c5ff49d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
12 changes: 8 additions & 4 deletions css/metrics-graphics-darkness.css
Expand Up @@ -29,10 +29,6 @@ a:visited {
fill: #f7f7f7;
}

.bar rect {
fill: #ffd300;
}

.baselines line {
stroke: #fff;
}
Expand Down Expand Up @@ -81,6 +77,14 @@ h2.chart_title span {
stroke: #ccc;
}

.histogram .bar rect {
fill: #d8b307;
}

.histogram .bar rect.active {
fill: #b3960f;
}

.histogram .bar text {
fill: #fff;
}
Expand Down
14 changes: 9 additions & 5 deletions css/metrics-graphics.css
Expand Up @@ -57,11 +57,6 @@ a.active {
stroke: none;
}

.bar rect {
shape-rendering: crispEdges;
fill: #9d9dff;
}

body {
background-color: #fff;
color: #000;
Expand Down Expand Up @@ -149,6 +144,15 @@ h2.chart_title .fa {
stroke: #ccc;
}

.histogram .bar rect {
shape-rendering: crispEdges;
fill: #b6b6fc;
}

.histogram .bar rect.active {
fill: #9e9efc;
}

.light-bg {
background-color: #f1f1f1;
}
Expand Down
10 changes: 5 additions & 5 deletions js/metrics-graphics.js
Expand Up @@ -1283,8 +1283,8 @@ charts.histogram = function(args) {
}

//highlight active bar
$(args.target + ' svg .bar :eq(' + i + ')')
.css('opacity', 0.8);
d3.selectAll($(args.target + ' svg .bar :eq(' + i + ')'))
.classed('active', true);

//update rollover text
if (args.show_rollover_text) {
Expand Down Expand Up @@ -1316,9 +1316,9 @@ charts.histogram = function(args) {

return function(d, i) {
//reset all bars' opacity
$('.histogram .bar rect')
.css('opacity', 1);

d3.selectAll($(args.target + ' svg .bar :eq(' + i + ')'))
.classed('active', false);
//reset active data point text
svg.select('.active_datapoint')
.text('');
Expand Down

0 comments on commit c5ff49d

Please sign in to comment.