coconut-graph
Advanced tools
Comparing version 1.0.6 to 1.0.7
{ | ||
"name": "coconut-graph", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Graph lib using d3 ", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
var d3 = require('d3'); | ||
var d3tip = require('d3-tip')(d3); | ||
var tip = function (amount_key, readable_interval) { | ||
return d3tip().attr('class', 'bar-tooltip') | ||
.offset([-10, 0]) | ||
.html(function(d) { | ||
var tip_elem = d3tip().attr('class', 'bar-tooltip').offset([-10, 0]); | ||
var create_tip = function (amount_key, readable_interval) { | ||
return tip_elem.html(function(d) { | ||
var amount = d[amount_key]; | ||
@@ -31,3 +32,4 @@ if (amount > 1000) { | ||
graph.svg.call(tip(key, graph.meta.readable_interval)); | ||
var tip = create_tip(key, graph.meta.readable_interval); | ||
graph.svg.call(tip); | ||
@@ -50,4 +52,4 @@ var height = graph.height(); | ||
var sel = graph.plotContainer.selectAll('.plot.series-' + plot.key).data(graph.data.values); | ||
sel.exit().remove(); | ||
@@ -54,0 +56,0 @@ sel.enter().append('rect') |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26225