canvas-heatmap
Advanced tools
Comparing version 1.6.1 to 1.6.2
{ | ||
"name": "canvas-heatmap", | ||
"version": "1.6.1", | ||
"version": "1.6.2", | ||
"description": "Interactive heatmap, capable of displaying 1,000,000+ data points using canvas and d3. ", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -79,3 +79,3 @@ import { | ||
if (options.backgroundColor) addBackground(div, options); | ||
if (options.legendRight) addLegendRight(svg, options); | ||
if (options.legendRight) addLegendRight(svg, div, options); | ||
if (options.setDownloadGraph) | ||
@@ -552,3 +552,3 @@ options.setDownloadGraph(() => downloadGraph(div, options)); | ||
const addLegendRight = (svg, options) => { | ||
const addLegendRight = (svg, div, options) => { | ||
var defs = svg.append("defs"); | ||
@@ -574,3 +574,3 @@ var ndp = 100; | ||
.append("linearGradient") | ||
.attr("id", "svgGradient") | ||
.attr("id", "svgGradient_" + div) | ||
.attr("x1", "0") | ||
@@ -597,3 +597,3 @@ .attr("x2", "0") | ||
.attr("y", 0) | ||
.attr("fill", "url(#svgGradient)"); | ||
.attr("fill", `url(#svgGradient_${div})`); | ||
@@ -600,0 +600,0 @@ svg |
@@ -28,5 +28,5 @@ export const convertToRGB = (hex) => { | ||
if (value < min || value > max) return [0, 0, 0, 0]; | ||
const cacheKey = `${value}-${min}-${max}`; | ||
const cacheKey = `${value}`; | ||
if (colorCache.has(cacheKey)) { | ||
return colorCache.get(cacheKey); | ||
//return colorCache.get(cacheKey); | ||
} | ||
@@ -33,0 +33,0 @@ const range = max - min; |
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
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
978218
8305