lib/mountain-goat/public/jquery.raphael.js in mountain-goat-1.0.0 vs lib/mountain-goat/public/jquery.raphael.js in mountain-goat-1.0.1

- old
+ new

@@ -193,10 +193,34 @@ if (this.label) { this.label[0].animate({scale: 1}, 500, "bounce"); this.label[1].attr({"font-weight": 400}); } }); - } + } else if (type == "funnel") { + var funnel = r.g.funnelchart(20, 20, $(this).width() * 0.8 - 40, $(this).height() - 40, x, {legend: y, legendcolor: "#d6d6d6", legendpos: "south"}); + funnel.hover(function () { + console.log(this); + this.sector.stop(); + this.sector.scale(1.1, 1.1); + if (this.label) { + this.label[0].stop(); + this.label[0].scale(1.5); + this.label[1].attr({"font-weight": 800}); + } + if (this.sector.insetLabel) { + this.sector.insetLabel.attr({"font-weight": 800}); + } + }, function () { + this.sector.animate({scale: [1, 1]}, 500, "bounce"); + if (this.label) { + this.label[0].animate({scale: 1}, 500, "bounce"); + this.label[1].attr({"font-weight": 400}); + } + if (this.sector.insetLabel) { + this.sector.insetLabel.attr({"font-weight": 400}); + } + }); + } }); }; $(document).ready(function() { \ No newline at end of file