horizon : properly clean existing label

This commit is contained in:
Florent BEAUCHAMP
2015-09-24 19:50:08 +02:00
parent 1e09e9b322
commit 0007e9ea2b
2 changed files with 6 additions and 5 deletions

View File

@@ -140,14 +140,14 @@
chart-data='stat'
show-axis='true'
axis-orientation='top'
selected='cubism.selected'
selected='cubism.selectedDate'
extent='cubism.extents'
label='{{label}}'
)
horizon(
ng-if='$middle'
chart-data='stat'
selected='cubism.selected'
selected='cubism.selectedDate'
extent='cubism.extents'
label='{{label}}'
)
@@ -156,7 +156,7 @@
chart-data='stat'
show-axis='true'
axis-orientation='bottom'
selected='cubism.selected'
selected='cubism.selectedDate'
extent='cubism.extents'
label='{{label}}'
)

View File

@@ -60,7 +60,6 @@ export default angular.module('xoHorizon', [])
return x(d.date)
})
.y(function (d) {
const val = y(d.value)
return y(d.value)
})
@@ -205,7 +204,9 @@ export default angular.module('xoHorizon', [])
bottomaxis.selectAll('text').style({fill: 'black', stroke: 'transparent'})
}
svg.selectAll('.horizon-area').remove()
if (label) {
label.remove()
}
forEach(splittedData, function (oneSplitted) {
svg
.append('path')