I'm trying to include both Date and Value in the same cell using Cal-HeatMap
Here is a fiddle example of what I'm trying to do ....
[https://jsfiddle.net/paulrollings/6L36ajhn/12/][2]
Any advice help greatly appreciated. Thanks Paul
I'm trying to include both Date and Value in the same cell using Cal-HeatMap
Here is a fiddle example of what I'm trying to do ....
[https://jsfiddle.net/paulrollings/6L36ajhn/12/][2]
Any advice help greatly appreciated. Thanks Paul
You could hack it in after CalHeatMap renders:
// wrap in timeout to let map render
setTimeout(function(){
var t = d3.selectAll('.subdomain-text') // find all the text blocks
.text(null); // blank them out
t.append('tspan')
.text(function(d){
return new Date(d.t).getDate(); //append tspan with date
})
.attr('x', function(d){
return d3.select(this.parentNode).attr('x'); // steal parent x value so it stays in place
});
t.append('tspan')
.text(function(d){
return "€" + d.v; //append tspan with value
})
.attr('dy','1.2em')
.attr('x', function(d){
return d3.select(this.parentNode).attr('x'); // steal parent x value so it stays in place
});
}, 100);
Updated fiddle here.
&013; / – Paul ROLLINGS Jul 12 '15 at 18:17
a html tag...) – Pinguin Dirk Jul 12 '15 at 19:22