Last active
December 17, 2015 08:59
-
-
Save felix-last/5584523 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var legend = document.querySelector('#legend'); | |
$('<span></span>').addClass('value').appendTo('.label, #legend'); | |
value_space = $('.value'); | |
console.log(value_space); | |
var Hover = Rickshaw.Class.create(Rickshaw.Graph.HoverDetail, { | |
render: function(args) { | |
args.detail.sort(function(a, b) { return a.order - b.order }).forEach( function(d) { | |
var value = document.createElement('div'); | |
value.className = 'value '; | |
value.innerHTML = ": " + d.formattedYValue; | |
if(d.name=='GBit Transferred') | |
$(value_space[0]).html(value); | |
if(d.name=='files Transferred') | |
$(value_space[1]).html(value); | |
$(value_space[2]).html(d.formattedXValue); | |
this.show(); | |
}, this ); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment