d3-flame-graph
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -209,6 +209,6 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
const delta = d.delta | ||
const delta = d.delta || d.data.d || d.data.delta | ||
const unsignedDelta = Math.abs(delta) | ||
let value = d.value | ||
let value = d.value || d.data.v || d.data.value | ||
if (value <= unsignedDelta) value = unsignedDelta | ||
@@ -215,0 +215,0 @@ |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["colorMapper.min"]=e():(t.flamegraph=t.flamegraph||{},t.flamegraph["colorMapper.min"]=e())}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}({6:function(t,e,r){"use strict";function n(t){if(t.highlight)return"rgb(230, 0, 230)";return`rgb(${function(t,e,r){const n=r,o=1-n;return[Math.round(t[0]*n+e[0]*o),Math.round(t[1]*n+e[1]*o),Math.round(t[2]*n+e[2]*o)]}([0,255,40],[196,245,233],t.data.value/t.value).join()})`}function o(t){if(t.highlight)return"#E600E6";let e=t.data.n||t.data.name,r=0;const n=e.split("`");return n.length>1&&(e=n[n.length-1]),e=e.split("(")[0],r=function(t){var e=0,r=0,n=1;if(t){for(var o=0;o<t.length&&!(o>6);o++)e+=n*(t.charCodeAt(o)%10),r+=9*n,n*=.7;r>0&&(e/=r)}return e}(e),"rgb("+(0+Math.round(55*(1-r)))+","+(0+Math.round(230*(1-r)))+","+(200+Math.round(55*r))+")"}function u(t,e){let r=e;const{v8_jit:n,javascript:o,optimized:u}=t.data.extras||{};if(n&&!o&&(r="#dadada"),o){let e=(u||0)/t.value,n=255,o=0,a=0;e<.4?(e*=2.5,n=240-200*e):e<.9?(e=2*(e-.4),n=0,a=200-200*e,o=100*e):(e=10*(e-.9),n=0,a=0,o=100+150*e),r=`rgb(${n} , ${o}, ${a})`}return r}function a(t){let e=220,r=220,n=220;const o=t.delta,u=Math.abs(o);let a=t.value;return a<=u&&(a=u),o>0?(n=Math.round(210*(1-u/a)),r=n):o<0&&(e=Math.round(210*(1-u/a)),r=e),"rgb("+e+","+r+","+n+")"}r.r(e),r.d(e,"allocationColorMapper",(function(){return n})),r.d(e,"offCpuColorMapper",(function(){return o})),r.d(e,"nodeJsColorMapper",(function(){return u})),r.d(e,"differentialColorMapper",(function(){return a}))}})})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["colorMapper.min"]=e():(t.flamegraph=t.flamegraph||{},t.flamegraph["colorMapper.min"]=e())}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}({6:function(t,e,r){"use strict";function n(t){if(t.highlight)return"rgb(230, 0, 230)";return`rgb(${function(t,e,r){const n=r,o=1-n;return[Math.round(t[0]*n+e[0]*o),Math.round(t[1]*n+e[1]*o),Math.round(t[2]*n+e[2]*o)]}([0,255,40],[196,245,233],t.data.value/t.value).join()})`}function o(t){if(t.highlight)return"#E600E6";let e=t.data.n||t.data.name,r=0;const n=e.split("`");return n.length>1&&(e=n[n.length-1]),e=e.split("(")[0],r=function(t){var e=0,r=0,n=1;if(t){for(var o=0;o<t.length&&!(o>6);o++)e+=n*(t.charCodeAt(o)%10),r+=9*n,n*=.7;r>0&&(e/=r)}return e}(e),"rgb("+(0+Math.round(55*(1-r)))+","+(0+Math.round(230*(1-r)))+","+(200+Math.round(55*r))+")"}function u(t,e){let r=e;const{v8_jit:n,javascript:o,optimized:u}=t.data.extras||{};if(n&&!o&&(r="#dadada"),o){let e=(u||0)/t.value,n=255,o=0,a=0;e<.4?(e*=2.5,n=240-200*e):e<.9?(e=2*(e-.4),n=0,a=200-200*e,o=100*e):(e=10*(e-.9),n=0,a=0,o=100+150*e),r=`rgb(${n} , ${o}, ${a})`}return r}function a(t){let e=220,r=220,n=220;const o=t.delta||t.data.d||t.data.delta,u=Math.abs(o);let a=t.value||t.data.v||t.data.value;return a<=u&&(a=u),o>0?(n=Math.round(210*(1-u/a)),r=n):o<0&&(e=Math.round(210*(1-u/a)),r=e),"rgb("+e+","+r+","+n+")"}r.r(e),r.d(e,"allocationColorMapper",(function(){return n})),r.d(e,"offCpuColorMapper",(function(){return o})),r.d(e,"nodeJsColorMapper",(function(){return u})),r.d(e,"differentialColorMapper",(function(){return a}))}})})); |
{ | ||
"name": "d3-flame-graph", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "A d3.js library to produce flame graphs.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -102,6 +102,6 @@ function pickHex (color1, color2, weight) { | ||
const delta = d.delta | ||
const delta = d.delta || d.data.d || d.data.delta | ||
const unsignedDelta = Math.abs(delta) | ||
let value = d.value | ||
let value = d.value || d.data.v || d.data.value | ||
if (value <= unsignedDelta) value = unsignedDelta | ||
@@ -108,0 +108,0 @@ |
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
562188