Skip to content

Commit 8bc8b4b

Browse files
committed
Fixed review comments
1 parent 87f0674 commit 8bc8b4b

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

app/directives/distribution-graph/distribution-graph.directive.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,11 @@ import Tooltip from 'appirio-tech-react-components/components/Tooltip/Tooltip.js
203203
return xScale(i)
204204
})
205205
.attr('y', function(d) {
206-
return padding.top
206+
return yScale(d.number)
207207
})
208208
.attr('width', xScale.rangeBand())
209209
.attr('height', function(d) {
210-
return totalH - padding.bottom - padding.top
210+
return totalH - padding.bottom - yScale(d.number)
211211
})
212212
.on('mouseover', function(d) {
213213
$scope.highlightedRating = d.start

app/directives/history-graph/history-graph.directive.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,9 @@ import Tooltip from 'appirio-tech-react-components/components/Tooltip/Tooltip.js
257257
</div>
258258
</Tooltip>
259259
, document.getElementById('chart-tooltip'))
260-
260+
261+
var toolTipHideIntervalId = null
262+
261263
svg.selectAll('circle')
262264
.data(history)
263265
.enter()
@@ -275,7 +277,7 @@ import Tooltip from 'appirio-tech-react-components/components/Tooltip/Tooltip.js
275277
$scope.historyRating = d.newRating
276278
$scope.historyDate = moment(d.ratingDate).format('YYYY-MM-DD')
277279
$scope.historyChallenge = d.challengeName
278-
280+
window.clearInterval(toolTipHideIntervalId);
279281
$scope.$digest()
280282

281283
d3.select('#chart-tooltip')
@@ -299,6 +301,11 @@ import Tooltip from 'appirio-tech-react-components/components/Tooltip/Tooltip.js
299301
.on('mouseout', function(d) {
300302
$scope.historyRating = undefined
301303
$scope.$digest()
304+
toolTipHideIntervalId = window.setInterval(function(){
305+
d3.select('#chart-tooltip')
306+
.style('left', '-500px')
307+
.style('top', '-500px')
308+
},1500);
302309
})
303310

304311
}

assets/css/my-dashboard/subtrack-stats.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,16 @@
170170

171171
#chart-tooltip .tooltip-challenge {
172172
height: 100%;
173-
width: calc(100% - 100px);
173+
width: calc(100% - 90px);
174174
float: left;
175175
}
176176

177+
#chart-tooltip .tooltip-challenge .challenge-name {
178+
white-space: normal;
179+
line-height: 20px;
180+
word-wrap: break-word;
181+
}
182+
177183
#chart-tooltip .tooltip-challenge .challenge-date {
178184
font-weight: normal;
179185
margin-top: 13px;

0 commit comments

Comments
 (0)