Socket
Socket
Sign inDemoInstall

d3-latency-heatmap

Package Overview
Dependencies
9
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.3 to 1.2.4

2

build/d3-latencyHeatmap.v1.js

@@ -1,2 +0,2 @@

// https://github.com/sengelha/d3-latency-heatmap Version 1.2.3. Copyright 2018 Steven Engelhardt <sengelha@gmail.com>.
// https://github.com/sengelha/d3-latency-heatmap Version 1.2.4. Copyright 2018 Steven Engelhardt <sengelha@gmail.com>.
(function (global, factory) {

@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-array'), require('d3-axis'), require('d3-collection'), require('d3-color'), require('d3-interpolate'), require('d3-scale')) :

@@ -1,2 +0,2 @@

// https://github.com/sengelha/d3-latency-heatmap Version 1.2.3. Copyright 2018 Steven Engelhardt <sengelha@gmail.com>.
// https://github.com/sengelha/d3-latency-heatmap Version 1.2.4. Copyright 2018 Steven Engelhardt <sengelha@gmail.com>.
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("d3-array"),require("d3-axis"),require("d3-collection"),require("d3-color"),require("d3-interpolate"),require("d3-scale")):"function"==typeof define&&define.amd?define(["exports","d3-array","d3-axis","d3-collection","d3-color","d3-interpolate","d3-scale"],e):e(t.d3=t.d3||{},t.d3,t.d3,t.d3,t.d3,t.d3,t.d3)}(this,function(t,e,n,r,l,i,a){"use strict";t.latencyHeatmap=function(){var t={top:1,right:1,bottom:11,left:1},o=600,c=400,s=void 0,u=function(t){return t[0]},f=void 0,d=function(t){return t[1]},p=void 0,g=function(t){return t[2]},h=void 0,x=[l.rgb("#FFFFFF"),l.rgb("#F03524")],y="#ddd",m="#999",v="#000",k=11;function A(l){l.each(function(A){A=A.map(function(t,e){return[u.call(A,t,e),d.call(A,t,e),g.call(A,t,e)]});var F=r.nest().key(function(t){return t[0]}).entries(A).length,b=r.nest().key(function(t){return t[1]}).entries(A).length;s?(o=s[0]*F+t.left+t.right,c=s[1]*b+t.top+t.bottom):s=[(o-t.left-t.right)/F,(c-t.top-t.bottom)/b];var z=o-t.left-t.right,q=c-t.top-t.bottom,S=e.extent(A,function(t){return t[0]}),L=e.extent(A,function(t){return t[1]}),w=e.extent(A,function(t){return t[2]}),O=a.scaleTime().domain(S).range([0,z-s[0]]),j=a.scaleLinear().domain(L).range([q,0]),E=a.scaleLinear().domain(L).range([q-s[1],0]),I=a.scaleLinear().domain(w).interpolate(i.interpolateRgb).range(x),R=l.selectAll("svg").data([A]),T=R.enter().append("svg").append("g");T.append("g").attr("class","elems"),T.append("g").attr("class","x axis"),T.append("g").attr("class","y axis"),(R=l.selectAll("svg")).attr("width",o).attr("height",c);var _=R.select(".elems").attr("class","elems").attr("transform","translate("+t.left+","+t.top+")").selectAll("rect").data(A),B=_.enter();_.exit().remove(),_.attr("x",function(t){return O(t[0])}).attr("y",function(t){return E(t[1])}).attr("fill",function(t){return I(t[2])}),h&&_.selectAll("title").html(function(t){return h(t)});var H=B.append("rect").attr("x",function(t){return O(t[0])}).attr("y",function(t){return E(t[1])}).attr("width",s[0]).attr("height",s[1]).attr("fill",function(t){return I(t[2])});h&&H.append("title").html(function(t){return h(t)});var M=n.axisBottom(O).tickSizeInner(-q).tickSizeOuter(0);f&&M.tickFormat(f);var P=T.select(".x.axis").attr("transform","translate(0,"+q+")").style("font-size",k+"px").call(M);P.selectAll("path").remove(),P.selectAll("line").style("shape-rendering","crispEdges").style("stroke",y),P.selectAll("text").style("text-anchor","start").style("fill",m);var C=n.axisLeft(j).tickSizeInner(-z).tickSizeOuter(0).ticks(1);p&&C.tickFormat(p);var D=T.select(".y.axis").style("font-size",k+"px").call(C);D.selectAll("path").remove(),D.selectAll("line").style("shape-rendering","crispEdges").style("stroke",y),D.selectAll(".tick text").attr("x",2).style("text-anchor","start").style("fill",v),D.selectAll(".tick:last-of-type text").attr("y",8),D.selectAll(".tick:first-of-type text").attr("y",-8)})}return A.width=function(t){return arguments.length?(o=t,A):o},A.height=function(t){return arguments.length?(c=t,A):c},A.rectSize=function(t){return arguments.length?(s=t,A):s},A.x=function(t){return arguments.length?(u=t,A):u},A.y=function(t){return arguments.length?(d=t,A):d},A.count=function(t){return arguments.length?(g=t,A):g},A.xFormat=function(t){return arguments.length?(f=t,A):f},A.yFormat=function(t){return arguments.length?(p=t,A):p},A.colorRange=function(t){return arguments.length?(x=t,A):x},A.tooltipText=function(t){return arguments.length?(h=t,A):h},A},Object.defineProperty(t,"__esModule",{value:!0})});
{
"name": "d3-latency-heatmap",
"version": "1.2.3",
"version": "1.2.4",
"description": "A reusable D3 latency heatmap chart.",

@@ -29,3 +29,3 @@ "keywords": [

"prepare": "npm run test && uglifyjs -b beautify=false,preamble=\"'$(preamble)'\" build/d3-latencyHeatmap.v1.js -c -m -o build/d3-latencyHeatmap.v1.min.js",
"postpublish": "git push && git push --tags && zip -j build/d3-latencyHeatmap.zip -- LICENSE README.md build/d3-latencyHeatmap.v1.js build/d3-latencyHeatmap.v1.min.js && echo \"Don't forget to publish to sengelha.github.io\""
"postpublish": "git push && git push --tags && zip -j build/d3-latencyHeatmap.v1.zip -- LICENSE README.md build/d3-latencyHeatmap.v1.js build/d3-latencyHeatmap.v1.min.js && echo \"Don't forget to publish to sengelha.github.io\""
},

@@ -32,0 +32,0 @@ "dependencies": {

@@ -18,7 +18,8 @@ # D3 Latency Heatmap

If you use NPM, `npm install d3-latency-heatmap`. Otherwise, download the
[latest release](https://github.com/sengelha/d3-latency-heatmap/releases/latest).
You can also load directly from [unpkg.com](https://unpkg.com/d3-latency-heatmap/).
AMD, CommonJS, and vanilla environments are supported. In vanilla, a d3 global
is exported:
If you use NPM, `npm install d3-latency-heatmap`. Otherwise, download
the [latest release binaries](https://sengelha.github.io/d3-latency-heatmap/d3-latencyHeatmap.v1.zip)
or the [latest release source code](https://github.com/sengelha/d3-latency-heatmap/releases/latest).
You can also load directly from
[unpkg.com](https://unpkg.com/d3-latency-heatmap/). AMD, CommonJS, and
vanilla environments are supported. In vanilla, a d3 global is exported:

@@ -41,3 +42,3 @@ ```html

.rectSize([8, 8]);
d3.csv("//cdn.rawgit.com/sengelha/d3-latency-heatmap/master/samples/report-queue-latency.csv", function (data) {
d3.csv("//sengelha.github.io/d3-latency-heatmap/sample-data.csv", function (data) {
var svg = d3.select("#chart")

@@ -223,2 +224,2 @@ .datum(data)

This project is licensed under the MIT License.
This project is licensed under the MIT License.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc