d3-flame-graph
Advanced tools
Comparing version 2.0.3 to 2.0.4
{ | ||
"name": "d3-flame-graph", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "A d3.js library to produce flame graphs.", | ||
@@ -5,0 +5,0 @@ "main": "dist/d3-flamegraph.js", |
@@ -31,3 +31,3 @@ # d3-flame-graph | ||
<head> | ||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/spiermar/d3-flame-graph@2.0.2/dist/d3-flamegraph.css"> | ||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/spiermar/d3-flame-graph@2.0.3/dist/d3-flamegraph.css"> | ||
</head> | ||
@@ -38,3 +38,3 @@ <body> | ||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3-tip/0.9.1/d3-tip.min.js"></script> | ||
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/spiermar/d3-flame-graph@2.0.2/dist/d3-flamegraph.min.js"></script> | ||
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/spiermar/d3-flame-graph@2.0.3/dist/d3-flamegraph.min.js"></script> | ||
<script type="text/javascript"> | ||
@@ -198,2 +198,10 @@ var flamegraph = d3.flamegraph() | ||
<a name="inverted" href="#inverted">#</a> flamegraph.<b>differential</b>(<i>[differential]</i>) | ||
Use the _differential_ color hash. Frames are sized according to their `value` but colored based on the `delta` property. Blue for negative numbers, red for positive numbers. | ||
<a name="elided" href="#elided">#</a> flamegraph.<b>elided</b>(<i>[elided]</i>) | ||
Use the _elided_ color hash to show elided frames in a differential heat map. The _elided_ color hash is _cold / blue_ to differentiate from the regular _warm_ palette. | ||
<a name="resetZoom" href="#resetZoom">#</a> flamegraph.<b>resetZoom</b>() | ||
@@ -200,0 +208,0 @@ |
@@ -26,2 +26,3 @@ import { select } from 'd3-selection' | ||
var differential = false | ||
var elided = false | ||
var searchSum = 0 | ||
@@ -142,5 +143,5 @@ var totalValue = 0 | ||
// default when libtype is not in use | ||
var hue = 'warm' | ||
var hue = elided ? 'cold' : 'warm' | ||
if (!(typeof libtype === 'undefined' || libtype === '')) { | ||
if (!elided && !(typeof libtype === 'undefined' || libtype === '')) { | ||
// Select hue. Order is important. | ||
@@ -192,2 +193,6 @@ hue = 'red' | ||
b = g | ||
} else if (hue === 'cold') { | ||
r = 0 + Math.round(55 * (1 - vector)) | ||
g = 0 + Math.round(230 * (1 - vector)) | ||
b = 200 + Math.round(55 * vector) | ||
} else { | ||
@@ -577,2 +582,8 @@ // original warm palette | ||
chart.elided = function (_) { | ||
if (!arguments.length) { return elided } | ||
elided = _ | ||
return chart | ||
} | ||
chart.setLabelHandler = function (_) { | ||
@@ -579,0 +590,0 @@ if (!arguments.length) { return labelHandler } |
Sorry, the diff of this file is too big to display
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
12295285
326
9055
1
8