canvas-heatmap
Advanced tools
Comparing version 1.2.24 to 1.2.25
{ | ||
"name": "canvas-heatmap", | ||
"version": "1.2.24", | ||
"version": "1.2.25", | ||
"description": "Interactive heatmap, capable of displaying 1,000,000+ data points using canvas and d3. ", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -66,3 +66,3 @@ import { | ||
if (options.addTitle) addTitle(svg, div, options); | ||
if (options.backgroundColor) addBackground(svg, options); | ||
if (options.backgroundColor) addBackground(div, options); | ||
if (options.legendRight) addLegendRight(svg, options); | ||
@@ -357,3 +357,3 @@ if (options.setDownloadGraph) | ||
.attr("width", options.width) | ||
.style("z-index", 1) | ||
.style("z-index", 2) | ||
.style("position", "absolute") | ||
@@ -378,3 +378,3 @@ .attr("height", options.height) | ||
.style("pointer-events", "none") | ||
.style("z-index", 0) | ||
.style("z-index", 1) | ||
.style("position", "absolute") | ||
@@ -501,8 +501,15 @@ .style("left", left) | ||
const addBackground = (svg, options) => { | ||
svg | ||
const addBackground = (div, options) => { | ||
select("#" + div) | ||
.append("svg") | ||
.attr("id", "background_" + div) | ||
.attr("width", options.width) | ||
.style("z-index", 0) | ||
.style("position", "absolute") | ||
.attr("height", options.height) | ||
.append("g") | ||
.append("rect") | ||
.attr("x", 1) | ||
.attr("width", options.canvasWidth) | ||
.attr("height", options.canvasHeight) | ||
.attr("width", options.width) | ||
.attr("height", options.height) | ||
.attr("fill", options.backgroundColor); | ||
@@ -605,5 +612,7 @@ }; | ||
.style("opacity", 0) | ||
.style("z-index", 2) | ||
.attr("id", "tooltip_" + div) | ||
.attr("class", "tooltip"); | ||
// Add axis locators | ||
@@ -610,0 +619,0 @@ var symbolGenerator = symbol().type(symbolTriangle).size(25); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
931522
7949