@hpcc-js/api
Advanced tools
Comparing version 2.3.2 to 2.3.3
@@ -6,2 +6,11 @@ # Change Log | ||
## [2.3.3](https://github.com/hpcc-systems/Visualization/compare/@hpcc-js/api@2.3.2...@hpcc-js/api@2.3.3) (2019-03-06) | ||
**Note:** Version bump only for package @hpcc-js/api | ||
## [2.3.2](https://github.com/hpcc-systems/Visualization/compare/@hpcc-js/api@2.3.1...@hpcc-js/api@2.3.2) (2019-02-20) | ||
@@ -8,0 +17,0 @@ |
@@ -1510,3 +1510,3 @@ import { Palette, Widget, select, selection } from '@hpcc-js/common'; | ||
var css = ".d3-tip {\r\n line-height: 1;\r\n font-weight: bold;\r\n padding: 12px;\r\n background: rgba(0, 0, 0, 0.66);\r\n color: #fff;\r\n border-radius: 2px;\r\n pointer-events: none !important;\r\n z-index:10;\r\n}\r\n\r\n.d3-tip.hidden {\r\n visibility:hidden;\r\n}\r\n\r\n/* Creates a small triangle extender for the tooltip */\r\n.d3-tip:after {\r\n content: \" \";\r\n box-sizing: border-box;\r\n display: inline-block;\r\n border: 4px solid rgba(0, 0, 0, 0.66);\r\n position: absolute;\r\n pointer-events: none !important;\r\n width: 8px;\r\n height: 8px;\r\n margin: 0;\r\n}\r\n\r\n/* Northward tooltips */\r\n.d3-tip.n:after {\r\n top: 100%;\r\n left: calc(50% - 4px);\r\n border-top-width: 8px;\r\n border-right-color: transparent;\r\n border-bottom-color: transparent;\r\n border-left-color: transparent;\r\n}\r\n\r\n/* Eastward tooltips */\r\n.d3-tip.e:after {\r\n top: calc(50% - 4px);\r\n left: -12px;\r\n border-top-color: transparent;\r\n border-right-width: 8px;\r\n border-bottom-color: transparent;\r\n border-left-color: transparent;\r\n}\r\n\r\n/* Southward tooltips */\r\n.d3-tip.s {\r\n margin-top: 8px;\r\n}\r\n.d3-tip.s:after {\r\n top: -12px;\r\n left: calc(50% - 4px);\r\n border-top-color: transparent;\r\n border-right-color: transparent;\r\n border-bottom-width: 8px;\r\n border-left-color: transparent;\r\n}\r\n\r\n/* Westward tooltips */\r\n.d3-tip.w:after {\r\n top: calc(50% - 4px);\r\n left: 100%;\r\n border-top-color: transparent;\r\n border-right-color: transparent;\r\n border-bottom-color: transparent;\r\n border-left-width: 8px;\r\n}\r\n\r\n.d3-tip.notick:after {\r\n border-color: transparent !important;\r\n}\r\n\r\n.common_Widget .over {\r\n stroke: rgba(0, 0, 0, 0.66);\r\n opacity: 0.66;\r\n}\r\n"; | ||
var css = ".d3-tip {\r\n line-height: 1;\r\n font-weight: bold;\r\n padding: 12px;\r\n background: rgba(0, 0, 0, 0.66);\r\n color: #fff;\r\n border-radius: 2px;\r\n pointer-events: none !important;\r\n z-index:10;\r\n}\r\n\r\n.d3-tip.hidden {\r\n visibility:hidden;\r\n}\r\n\r\n/* Creates a small triangle extender for the tooltip */\r\n.d3-tip:after {\r\n content: \" \";\r\n box-sizing: border-box;\r\n display: inline-block;\r\n border: 4px solid rgba(0, 0, 0, 0.66);\r\n position: absolute;\r\n pointer-events: none !important;\r\n width: 8px;\r\n height: 8px;\r\n margin: 0;\r\n}\r\n\r\n/* Northward tooltips */\r\n.d3-tip.n:after {\r\n top: 100%;\r\n left: calc(50% - 4px);\r\n border-top-width: 8px;\r\n border-right-color: transparent;\r\n border-bottom-color: transparent;\r\n border-left-color: transparent;\r\n}\r\n\r\n/* Eastward tooltips */\r\n.d3-tip.e:after {\r\n top: calc(50% - 4px);\r\n left: -12px;\r\n border-top-color: transparent;\r\n border-right-width: 8px;\r\n border-bottom-color: transparent;\r\n border-left-color: transparent;\r\n}\r\n\r\n/* Southward tooltips */\r\n.d3-tip.s {\r\n margin-top: 8px;\r\n}\r\n.d3-tip.s:after {\r\n top: -12px;\r\n left: calc(50% - 4px);\r\n border-top-color: transparent;\r\n border-right-color: transparent;\r\n border-bottom-width: 8px;\r\n border-left-color: transparent;\r\n}\r\n\r\n/* Westward tooltips */\r\n.d3-tip.w:after {\r\n top: calc(50% - 4px);\r\n left: 100%;\r\n border-top-color: transparent;\r\n border-right-color: transparent;\r\n border-bottom-color: transparent;\r\n border-left-width: 8px;\r\n}\r\n\r\n.d3-tip.notick:after {\r\n border-color: transparent !important;\r\n}\r\n\r\n.common_Widget .over {\r\n stroke: rgba(0, 0, 0, 0.66);\r\n opacity: 0.66;\r\n}\r\n\r\n.d3-tip.ITooltip-tooltipStyle-series-table{\r\n padding: 0;\r\n}\r\n\r\n.d3-tip .ITooltip-series-table th,\r\n.d3-tip .ITooltip-series-table td{\r\n padding: 6px;\r\n text-align: left;\r\n border: 1px solid #D1D1D1;\r\n}\r\n\r\n.d3-tip .ITooltip-series-table .series-table-row-color{\r\n display: inline-block;\r\n height: 10px;\r\n width: 10px;\r\n margin-right: 10px;\r\n}\r\n\r\n.d3-tip .ITooltip-series-table .series-table-row-label{\r\n display: inline-block;\r\n}\r\n\r\n.d3-tip .ITooltip-series-table th{\r\n background-color: #B3B3B3;\r\n}\r\n\r\n.d3-tip .ITooltip-series-table td{\r\n background-color: #FFF;\r\n color: #555;\r\n font-weight: normal;\r\n}\r\n\r\n.d3-tip .ITooltip-series-table td:first-child{\r\n border-right: 0;\r\n}\r\n\r\ntable.ITooltip-series-table td:last-child{\r\n border-left: 1px dotted #A3A3A3;\r\n}\r\n"; | ||
styleInject(css); | ||
@@ -1569,2 +1569,9 @@ | ||
this.tooltip.offset(function () { | ||
if (event && _this.tooltipFollowMouse()) { | ||
var d3tipElement = document.querySelector(".d3-tip"); // d3Tip offers no reference to the '.d3-tip' element...? | ||
d3tipElement.style.display = "block"; | ||
d3tipElement.style.left = _this.tooltipOffset() + (event.clientX) + "px"; | ||
d3tipElement.style.top = event.clientY + "px"; | ||
return []; | ||
} | ||
switch (_this.tooltip.direction()()) { | ||
@@ -1580,2 +1587,8 @@ case "e": | ||
classed = classed.split(" notick").join("") + (this.tooltipTick() ? "" : " notick") + (this.tooltipStyle() === "none" ? " hidden" : ""); | ||
classed = classed.split(" ") | ||
.filter(function (_class) { | ||
return _class.indexOf("ITooltip-tooltipStyle-") !== 0; | ||
}) | ||
.join(" "); | ||
classed += " ITooltip-tooltipStyle-" + this.tooltipStyle(); | ||
this.tooltip | ||
@@ -1609,2 +1622,20 @@ .attr("class", classed); | ||
break; | ||
case "series-table": | ||
var html_1 = '<table class="ITooltip-series-table">' | ||
+ "<thead>" | ||
+ '<tr><th colspan="2">' + opts.label + "</th></tr>" | ||
+ "</thead>" | ||
+ "<tbody>"; | ||
opts.arr.forEach(function (row) { | ||
html_1 += "<tr>"; | ||
html_1 += "<td>"; | ||
html_1 += '<div class="series-table-row-color" style="background-color:' + row.color + '"></div>'; | ||
html_1 += '<div class="series-table-row-label">' + row.label + "</div>"; | ||
html_1 += "</td>"; | ||
html_1 += '<td><div class="series-table-row-value">' + row.value + "</div></td>"; | ||
html_1 += "</tr>"; | ||
}); | ||
html_1 += "</tbody>"; | ||
html_1 += "</table>"; | ||
return html_1; | ||
default: | ||
@@ -1632,3 +1663,4 @@ if (opts.series) { | ||
}(Widget)); | ||
ITooltip.prototype.publish("tooltipStyle", "default", "set", "Style mode", ["default", "none"], {}); | ||
ITooltip.prototype.publish("tooltipStyle", "default", "set", "Style mode", ["default", "none", "series-table"], {}); | ||
ITooltip.prototype.publish("tooltipFollowMouse", false, "boolean", "If true, the tooltip will follow mouse movement", null, {}); | ||
ITooltip.prototype.publish("tooltipValueFormat", ",.2f", "string", "Number format of tooltip value(s)", null, {}); | ||
@@ -1635,0 +1667,0 @@ ITooltip.prototype.publish("tooltipSeriesColor", "#EAFFFF", "html-color", "Color of tooltip series text", null, {}); |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common"],e):e(t["@hpcc-js/api"]={},t["@hpcc-js/common"])}(this,function(t,s){"use strict";function e(){}function n(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function r(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function u(){}e.prototype._dataFamily="1D",e.prototype._palette=s.Palette.rainbow("default"),e.prototype.click=function(t,e,n){console.log("Click: "+JSON.stringify(t)+", "+e+", "+n)},e.prototype.dblclick=function(t,e,n){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+n)};var o=.7,i=1/o,l="\\s*([+-]?\\d+)\\s*",a="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",c="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",p=/^#([0-9a-f]{3})$/,h=/^#([0-9a-f]{6})$/,f=new RegExp("^rgb\\("+[l,l,l]+"\\)$"),d=new RegExp("^rgb\\("+[c,c,c]+"\\)$"),y=new RegExp("^rgba\\("+[l,l,l,a]+"\\)$"),g=new RegExp("^rgba\\("+[c,c,c,a]+"\\)$"),b=new RegExp("^hsl\\("+[a,c,c]+"\\)$"),m=new RegExp("^hsla\\("+[a,c,c,a]+"\\)$"),v={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function w(t){var e;return t=(t+"").trim().toLowerCase(),(e=p.exec(t))?new C((e=parseInt(e[1],16))>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):(e=h.exec(t))?x(parseInt(e[1],16)):(e=f.exec(t))?new C(e[1],e[2],e[3],1):(e=d.exec(t))?new C(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=y.exec(t))?k(e[1],e[2],e[3],e[4]):(e=g.exec(t))?k(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=b.exec(t))?_(e[1],e[2]/100,e[3]/100,1):(e=m.exec(t))?_(e[1],e[2]/100,e[3]/100,e[4]):v.hasOwnProperty(t)?x(v[t]):"transparent"===t?new C(NaN,NaN,NaN,0):null}function x(t){return new C(t>>16&255,t>>8&255,255&t,1)}function k(t,e,n,r){return r<=0&&(t=e=n=NaN),new C(t,e,n,r)}function M(t){return t instanceof u||(t=w(t)),t?new C((t=t.rgb()).r,t.g,t.b,t.opacity):new C}function C(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function N(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function _(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new S(t,e,n,r)}function E(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof S)return new S(t.h,t.s,t.l,t.opacity);if(t instanceof u||(t=w(t)),!t)return new S;if(t instanceof S)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),i=Math.max(e,n,r),l=NaN,a=i-o,s=(i+o)/2;return a?(l=e===i?(n-r)/a+6*(n<r):n===i?(r-e)/a+2:(e-n)/a+4,a/=s<.5?i+o:2-i-o,l*=60):a=0<s&&s<1?0:l,new S(l,a,s,t.opacity)}(t):new S(t,e,n,null==r?1:r)}function S(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function O(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}n(u,w,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),n(C,function(t,e,n,r){return 1===arguments.length?M(t):new C(t,e,n,null==r?1:r)},r(u,{brighter:function(t){return t=null==t?i:Math.pow(i,t),new C(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?o:Math.pow(o,t),new C(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+N(this.r)+N(this.g)+N(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),n(S,E,r(u,{brighter:function(t){return t=null==t?i:Math.pow(i,t),new S(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?o:Math.pow(o,t),new S(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,o=2*n-r;return new C(O(240<=t?t-240:t+120,o,r),O(t,o,r),O(t<120?t+240:t-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var F=Math.PI/180,T=180/Math.PI,P=.96422,j=1,V=.82521,I=4/29,A=6/29,D=3*A*A,$=A*A*A;function z(t){if(t instanceof q)return new q(t.l,t.a,t.b,t.opacity);if(t instanceof W){if(isNaN(t.h))return new q(t.l,0,0,t.opacity);var e=t.h*F;return new q(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof C||(t=M(t));var n,r,o=R(t.r),i=R(t.g),l=R(t.b),a=L((.2225045*o+.7168786*i+.0606169*l)/j);return o===i&&i===l?n=r=a:(n=L((.4360747*o+.3850649*i+.1430804*l)/P),r=L((.0139322*o+.0971045*i+.7141733*l)/V)),new q(116*a-16,500*(n-a),200*(a-r),t.opacity)}function q(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function L(t){return $<t?Math.pow(t,1/3):t/D+I}function J(t){return A<t?t*t*t:D*(t-I)}function H(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function R(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function W(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}n(q,function(t,e,n,r){return 1===arguments.length?z(t):new q(t,e,n,null==r?1:r)},r(u,{brighter:function(t){return new q(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new q(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new C(H(3.1338561*(e=P*J(e))-1.6168667*(t=j*J(t))-.4906146*(n=V*J(n))),H(-.9787684*e+1.9161415*t+.033454*n),H(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),n(W,function(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof W)return new W(t.h,t.c,t.l,t.opacity);if(t instanceof q||(t=z(t)),0===t.a&&0===t.b)return new W(NaN,0,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*T;return new W(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new W(t,e,n,null==r?1:r)},r(u,{brighter:function(t){return new W(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new W(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return z(this).rgb()}}));var B=1.78277,U=-.29227,G=-.90649,X=1.97294,K=X*G,Y=X*B,Z=B*U- -.14861*G;function Q(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function tt(){}function et(){}function nt(){}n(Q,function(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof Q)return new Q(t.h,t.s,t.l,t.opacity);t instanceof C||(t=M(t));var e=t.r/255,n=t.g/255,r=t.b/255,o=(Z*r+K*e-Y*n)/(Z+K-Y),i=r-o,l=(X*(n-o)-U*i)/G,a=Math.sqrt(l*l+i*i)/(X*o*(1-o)),s=a?Math.atan2(l,i)*T-120:NaN;return new Q(s<0?s+360:s,a,o,t.opacity)}(t):new Q(t,e,n,null==r?1:r)},r(u,{brighter:function(t){return t=null==t?i:Math.pow(i,t),new Q(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?o:Math.pow(o,t),new Q(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*F,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),o=Math.sin(t);return new C(255*(e+n*(-.14861*r+B*o)),255*(e+n*(U*r+G*o)),255*(e+n*(X*r)),this.opacity)}})),tt.prototype._dataFamily="2D",tt.prototype._palette=s.Palette.ordinal("default"),tt.prototype.fillColor=function(t,e,n){return this._palette(t[0])},tt.prototype.strokeColor=function(t,e,n){return E(this.fillColor(t,e,n)).darker().toString()},tt.prototype.textColor=function(t,e,n){return s.Palette.textColor(this.fillColor(t,e,n))},tt.prototype.click=function(t,e,n){console.log("Click: "+JSON.stringify(t)+", "+e+", "+n)},tt.prototype.dblclick=function(t,e,n){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+n)},et.prototype._palette=s.Palette.rainbow("default"),et.prototype.fillColor=function(t,e,n){return this._palette(t.length)},et.prototype.strokeColor=function(t,e,n){return E(this.fillColor(t,e,n)).darker().toString()},et.prototype.textColor=function(t,e,n){return s.Palette.textColor(this.fillColor(t,e,n))},et.prototype.click=function(t,e,n){console.log("Click: "+JSON.stringify(t)+", "+e+", "+n)},et.prototype.dblclick=function(t,e,n){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+n)},nt.prototype._dataFamily="graph",nt.prototype.vertex_click=function(t,e,n,r){r&&r.vertex&&console.log("Vertex click: "+r.vertex.id())},nt.prototype.vertex_dblclick=function(t,e,n,r){r&&r.vertex&&console.log("Vertex double click: "+r.vertex.id())},nt.prototype.edge_click=function(t,e,n,r){r&&r.edge&&console.log("Edge click: "+r.edge.id())},nt.prototype.edge_dblclick=function(t,e,n,r){r&&r.edge&&console.log("Edge double click: "+r.edge.id())};var rt=function(t,e){return(rt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function ot(t,e){function n(){this.constructor=t}rt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var it=function(t){function e(){return t.call(this)||this}return ot(e,t),e.prototype.isValid=function(){if(this.validate()&&!new RegExp(this.validate()).test(this.value()))return!1;return!0},e.prototype.hasValue=function(){if("function"!=typeof this.type)return""!==this.value();switch(this.type()){case"radio":case"checkbox":if(this.value()&&"false"!==this.value())return!0;break;default:if(this.value())return!0}return!1},e.prototype.blur=function(t){},e.prototype.keyup=function(t){},e.prototype.focus=function(t){},e.prototype.click=function(t){},e.prototype.dblclick=function(t){},e.prototype.change=function(t,e){},e.prototype.resetValue=function(t){t.value(t._inputElement[0].node().value)},e.prototype.disable=function(n){this._inputElement.forEach(function(t,e){t.attr("disabled",n?"disabled":null)})},e.prototype.setFocus=function(){this._inputElement.length&&this._inputElement[0].node().focus()},e}(s.Widget);function lt(){}function at(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[1<r.length?r[0]+r.slice(2):r,+t.slice(n+1)]}it.prototype.publish("name","","string","HTML name for the input"),it.prototype.publish("label","","string","Descriptive label"),it.prototype.publish("value","","string","Input Current Value"),it.prototype.publish("validate",null,"string","Input Validation"),lt.prototype._dataFamily="ND",lt.prototype._palette=s.Palette.ordinal("default"),lt.prototype.fillColor=function(t,e,n){return this._palette(e)},lt.prototype.strokeColor=function(t,e,n){return E(this.fillColor(t,e,n)).darker().toString()},lt.prototype.textColor=function(t,e,n){return s.Palette.textColor(this.fillColor(t,e,n))},lt.prototype.click=function(t,e,n){console.log("Click: "+JSON.stringify(t)+", "+e+", "+n)},lt.prototype.dblclick=function(t,e,n){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+n)};var st,ut=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ct(t){return new pt(t)}function pt(t){if(!(e=ut.exec(t)))throw new Error("invalid format: "+t);var e;this.fill=e[1]||" ",this.align=e[2]||">",this.sign=e[3]||"-",this.symbol=e[4]||"",this.zero=!!e[5],this.width=e[6]&&+e[6],this.comma=!!e[7],this.precision=e[8]&&+e[8].slice(1),this.trim=!!e[9],this.type=e[10]||""}function ht(t,e){var n=at(t,e);if(!n)return t+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}ct.prototype=pt.prototype,pt.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var ft={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return ht(100*t,e)},r:ht,s:function(t,e){var n=at(t,e);if(!n)return t+"";var r=n[0],o=n[1],i=o-(st=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=r.length;return i===l?r:l<i?r+new Array(i-l+1).join("0"):0<i?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+at(t,Math.max(0,e+i-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function dt(t){return t}var yt,gt,bt=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function mt(t){var e,a,s,k=t.grouping&&t.thousands?(a=t.grouping,s=t.thousands,function(t,e){for(var n=t.length,r=[],o=0,i=a[0],l=0;0<n&&0<i&&(e<l+i+1&&(i=Math.max(1,e-l)),r.push(t.substring(n-=i,n+i)),!((l+=i+1)>e));)i=a[o=(o+1)%a.length];return r.reverse().join(s)}):dt,r=t.currency,M=t.decimal,C=t.numerals?(e=t.numerals,function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}):dt,o=t.percent||"%";function u(t){var u=(t=ct(t)).fill,c=t.align,p=t.sign,e=t.symbol,h=t.zero,f=t.width,d=t.comma,y=t.precision,g=t.trim,b=t.type;"n"===b?(d=!0,b="g"):ft[b]||(null==y&&(y=12),g=!0,b="g"),(h||"0"===u&&"="===c)&&(h=!0,u="0",c="=");var m="$"===e?r[0]:"#"===e&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",v="$"===e?r[1]:/[%p]/.test(b)?o:"",w=ft[b],x=/[defgprs%]/.test(b);function n(t){var e,n,r,o=m,i=v;if("c"===b)i=w(t)+i,t="";else{var l=(t=+t)<0;if(t=w(Math.abs(t),y),g&&(t=function(t){t:for(var e,n=t.length,r=1,o=-1;r<n;++r)switch(t[r]){case".":o=e=r;break;case"0":0===o&&(o=r),e=r;break;default:if(0<o){if(!+t[r])break t;o=0}}return 0<o?t.slice(0,o)+t.slice(e+1):t}(t)),l&&0==+t&&(l=!1),o=(l?"("===p?p:"-":"-"===p||"("===p?"":p)+o,i=("s"===b?bt[8+st/3]:"")+i+(l&&"("===p?")":""),x)for(e=-1,n=t.length;++e<n;)if((r=t.charCodeAt(e))<48||57<r){i=(46===r?M+t.slice(e+1):t.slice(e))+i,t=t.slice(0,e);break}}d&&!h&&(t=k(t,1/0));var a=o.length+t.length+i.length,s=a<f?new Array(f-a+1).join(u):"";switch(d&&h&&(t=k(s+t,s.length?f-i.length:1/0),s=""),c){case"<":t=o+t+i+s;break;case"=":t=o+s+t+i;break;case"^":t=s.slice(0,a=s.length>>1)+o+t+i+s.slice(a);break;default:t=s+o+t+i}return C(t)}return y=null==y?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),n.toString=function(){return t+""},n}return{format:u,formatPrefix:function(t,e){var n,r=u(((t=ct(t)).type="f",t)),o=3*Math.max(-8,Math.min(8,Math.floor((n=e,((n=at(Math.abs(n)))?n[1]:NaN)/3)))),i=Math.pow(10,-o),l=bt[8+o/3];return function(t){return r(i*t)+l}}}}yt=mt({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),gt=yt.format,yt.formatPrefix;var vt="$";function wt(){}function xt(t,e){var n=new wt;if(t instanceof wt)t.each(function(t,e){n.set(e,t)});else if(Array.isArray(t)){var r,o=-1,i=t.length;if(null==e)for(;++o<i;)n.set(o,t[o]);else for(;++o<i;)n.set(e(r=t[o],o,t),r)}else if(t)for(var l in t)n.set(l,t[l]);return n}function kt(){}wt.prototype=xt.prototype={constructor:wt,has:function(t){return vt+t in this},get:function(t){return this[vt+t]},set:function(t,e){return this[vt+t]=e,this},remove:function(t){var e=vt+t;return e in this&&delete this[e]},clear:function(){for(var t in this)t[0]===vt&&delete this[t]},keys:function(){var t=[];for(var e in this)e[0]===vt&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)e[0]===vt&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)e[0]===vt&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)e[0]===vt&&++t;return t},empty:function(){for(var t in this)if(t[0]===vt)return!1;return!0},each:function(t){for(var e in this)e[0]===vt&&t(this[e],e.slice(1),this)}};var Mt=xt.prototype;kt.prototype=function(t,e){var n=new kt;if(t instanceof kt)t.each(function(t){n.add(t)});else if(t){var r=-1,o=t.length;if(null==e)for(;++r<o;)n.add(t[r]);else for(;++r<o;)n.add(e(t[r],r,t))}return n}.prototype={constructor:kt,has:Mt.has,add:function(t){return this[vt+(t+="")]=t,this},remove:Mt.remove,clear:Mt.clear,values:Mt.keys,size:Mt.size,empty:Mt.empty,each:Mt.each};!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}('.d3-tip {\r\n line-height: 1;\r\n font-weight: bold;\r\n padding: 12px;\r\n background: rgba(0, 0, 0, 0.66);\r\n color: #fff;\r\n border-radius: 2px;\r\n pointer-events: none !important;\r\n z-index:10;\r\n}\r\n\r\n.d3-tip.hidden {\r\n visibility:hidden;\r\n}\r\n\r\n/* Creates a small triangle extender for the tooltip */\r\n.d3-tip:after {\r\n content: " ";\r\n box-sizing: border-box;\r\n display: inline-block;\r\n border: 4px solid rgba(0, 0, 0, 0.66);\r\n position: absolute;\r\n pointer-events: none !important;\r\n width: 8px;\r\n height: 8px;\r\n margin: 0;\r\n}\r\n\r\n/* Northward tooltips */\r\n.d3-tip.n:after {\r\n top: 100%;\r\n left: calc(50% - 4px);\r\n border-top-width: 8px;\r\n border-right-color: transparent;\r\n border-bottom-color: transparent;\r\n border-left-color: transparent;\r\n}\r\n\r\n/* Eastward tooltips */\r\n.d3-tip.e:after {\r\n top: calc(50% - 4px);\r\n left: -12px;\r\n border-top-color: transparent;\r\n border-right-width: 8px;\r\n border-bottom-color: transparent;\r\n border-left-color: transparent;\r\n}\r\n\r\n/* Southward tooltips */\r\n.d3-tip.s {\r\n margin-top: 8px;\r\n}\r\n.d3-tip.s:after {\r\n top: -12px;\r\n left: calc(50% - 4px);\r\n border-top-color: transparent;\r\n border-right-color: transparent;\r\n border-bottom-width: 8px;\r\n border-left-color: transparent;\r\n}\r\n\r\n/* Westward tooltips */\r\n.d3-tip.w:after {\r\n top: calc(50% - 4px);\r\n left: 100%;\r\n border-top-color: transparent;\r\n border-right-color: transparent;\r\n border-bottom-color: transparent;\r\n border-left-width: 8px;\r\n}\r\n\r\n.d3-tip.notick:after {\r\n border-color: transparent !important;\r\n}\r\n\r\n.common_Widget .over {\r\n stroke: rgba(0, 0, 0, 0.66);\r\n opacity: 0.66;\r\n}\r\n');var Ct=function(a){function t(){var t=a.call(this)||this;if(t.tooltip=function(){var e=function(){return"n"},v=function(){return[0,0]},w=function(){return" "},x=i(document.body),r=t(),o=null,u=null,k=null,M=function(t){var e;if(e=t.node(),o=e?"svg"===e.tagName.toLowerCase()?e:e.ownerSVGElement:null){u=o.createSVGPoint();var n=x();n&&r&&n.appendChild(r)}};M.show=function(t,e,n){k=n[e];var r=Array.prototype.slice.call(arguments),o=w.apply(this,r);if(null===o)return M;var i,l=v.apply(this,r),a=_(),s=N.length,u=x().getBoundingClientRect();for(a.html(o).style("opacity",1).style("pointer-events","all");s--;)a.classed(N[s],!1);for(var c,p,h=!1,f={},d=N[0],y=0;y<N.length&&!(h=m(N[y]));y++);if(h)a.classed("notick",!1);else{a.classed("notick",!0);var g=(p=f[d]).top>p.bottom?0<p.top?-p.top:0:p.bottom,b=(c=f[d]).left>c.right?0<c.left?-c.left:0:0<c.right?c.right:0;m(d,g,b)}return M;function m(n,t,e){t=t||0,e=e||0,a.style("white-space","nowrap"),i=C.get(n).apply(this),a.classed(n,!0).style("top",i.top+l[0]-t+"px").style("left",i.left+l[1]-e+"px");var r=a.node().getBoundingClientRect(),o=r.top>u.top&&r.left>u.left&&r.bottom<u.bottom&&r.right<u.right;return f[n]={top:u.top-r.top,right:r.right-u.right,bottom:r.bottom-u.bottom,left:u.left-r.left},a.style("white-space","normal"),f[n].total_overflow=Object.keys(f[n]).filter(function(t){return 0<f[n][t]}).reduce(function(t,e){return t+f[n][e]},0),f[d].total_overflow>f[n].total_overflow&&(d=n),o||a.classed(n,!1),o}},M.hide=function(){return _().style("opacity",0).style("pointer-events","none"),M},M.attr=function(t,e){if(arguments.length<2&&"string"==typeof t)return _().attr(t);var n=Array.prototype.slice.call(arguments);return s.selection.prototype.attr.apply(_(),n),M},M.style=function(t,e){if(arguments.length<2&&"string"==typeof t)return _().style(t);var n=Array.prototype.slice.call(arguments);return s.selection.prototype.style.apply(_(),n),M},M.direction=function(t){return arguments.length?(e=null==t?t:i(t),M):e},M.offset=function(t){return arguments.length?(v=null==t?t:i(t),M):v},M.html=function(t){return arguments.length?(w=null==t?t:i(t),M):w},M.rootElement=function(t){return arguments.length?(x=i(t),M):x},M.destroy=function(){return r&&(_().remove(),r=null),M};var C=xt({n:function(){var t=n(window);return{top:t.n.y-r.offsetHeight,left:t.n.x-r.offsetWidth/2}},s:function(){var t=n(window);return{top:t.s.y+8,left:t.s.x-r.offsetWidth/2}},e:function(){var t=n(window);return{top:t.e.y-r.offsetHeight/2,left:t.e.x+8}},w:function(){var t=n(window);return{top:t.w.y-r.offsetHeight/2,left:t.w.x-r.offsetWidth-8}},nw:function(){var t=n(window);return{top:t.nw.y-r.offsetHeight,left:t.nw.x-r.offsetWidth}},ne:function(){var t=n(window);return{top:t.ne.y-r.offsetHeight,left:t.ne.x}},sw:function(){var t=n(window);return{top:t.sw.y,left:t.sw.x-r.offsetWidth}},se:function(){var t=n(window);return{top:t.se.y,left:t.se.x}}}),N=C.keys();function t(){var t=s.select(document.createElement("div"));return t.attr("class","d3-tip").style("position","absolute").style("top",0).style("opacity",0).style("pointer-events","none").style("box-sizing","border-box"),t.node()}function _(){return null==r&&(r=t(),x().appendChild(r)),s.select(r)}function n(t){for(var e=k||t;null==e.getCTM&&null!=e.parentNode;)e=e.parentNode;var n={},r=e.getCTM(),o=e.getBBox(),i=o.width,l=o.height,a=o.x,s=o.y;return u.x=a,u.y=s,n.nw=u.matrixTransform(r),u.x+=i,n.ne=u.matrixTransform(r),u.y+=l,n.se=u.matrixTransform(r),u.x-=i,n.sw=u.matrixTransform(r),u.y-=l/2,n.w=u.matrixTransform(r),u.x+=i,n.e=u.matrixTransform(r),u.x-=i/2,u.y-=l/2,n.n=u.matrixTransform(r),u.y+=l,n.s=u.matrixTransform(r),n}function i(t){return"function"==typeof t?t:function(){return t}}return M}(),t._valueFormatter=gt(t.tooltipValueFormat()),t.layerEnter){var r=t.layerEnter;t.layerEnter=function(t,e,n){this._parentOverlay||(this._parentOverlay=t._parentOverlay),this.tooltipEnter(e),r.apply(this,arguments)};var e=t.layerUpdate;t.layerUpdate=function(t){e.apply(this,arguments),this.tooltipUpdate()};var n=t.layerExit;t.layerExit=function(t){this.tooltipExit(),n.apply(this,arguments)}}else{var o=t.enter;t.enter=function(t,e){this.tooltipEnter(e),o.apply(this,arguments)};var i=t.update;t.update=function(t,e){i.apply(this,arguments),this.tooltipUpdate()};var l=t.exit;t.exit=function(t,e){this.tooltipExit(),l.apply(this,arguments)}}return t}return ot(t,a),t.prototype.tooltipEnter=function(t){var e=this.parentOverlay();e.empty()||this.tooltip.rootElement(e.node().parentNode),t.call(this.tooltip)},t.prototype.tooltipUpdate=function(){var t=this;this.tooltip.offset(function(){switch(t.tooltip.direction()()){case"e":return[0,t.tooltipOffset()];default:return[-t.tooltipOffset(),0]}});var e=this.tooltip.attr("class");e&&(e=e.split(" notick").join("")+(this.tooltipTick()?"":" notick")+("none"===this.tooltipStyle()?" hidden":""),this.tooltip.attr("class",e))},t.prototype.tooltipExit=function(){this.tooltip&&this.tooltip.destroy()},t.prototype._tooltipHTML=function(t){return t},t.prototype.tooltipHTML=function(t){return this.tooltip.html(t)},t.prototype.tooltipFormat=function(t){switch(void 0===t&&(t={}),t.label=void 0===t.label?"":t.label,t.series=t.series||"",t.value instanceof Date?t.value=t.value||"":t.value=this._valueFormatter(t.value)||"",this.tooltipStyle()){case"none":break;default:return t.series?"<span style='color:"+this.tooltipSeriesColor()+"'>"+t.series+"</span> / <span style='color:"+this.tooltipLabelColor()+"'>"+t.label+"</span>: <span style='color:"+this.tooltipValueColor()+"'>"+t.value+"</span>":""!==t.label?"<span style='color:"+this.tooltipLabelColor()+"'>"+t.label+"</span>: <span style='color:"+this.tooltipValueColor()+"'>"+t.value+"</span>":"<span style='color:"+this.tooltipValueColor()+"'>"+t.value+"</span>"}},t.prototype.tooltipKeyValueFormat=function(t,e){var n="";for(var r in e)if(r!==t){var o=e&&e[r]?e[r]:"";n+='<tr><td style="'+(this.tooltipLabelColor_exists()?"color:"+this.tooltipLabelColor():"")+'">'+r+'</td><td style="font-weight:normal">'+o+"</td></tr>"}return'<table>\n <thead>\n <tr><th colspan="2" style="font-weight:bold;font-size:16px">'+e[t]+"</th></tr>\n </thead>\n <tbody>\n "+n+"\n </tbody>\n </table>"},t}(s.Widget);Ct.prototype.publish("tooltipStyle","default","set","Style mode",["default","none"],{}),Ct.prototype.publish("tooltipValueFormat",",.2f","string","Number format of tooltip value(s)",null,{}),Ct.prototype.publish("tooltipSeriesColor","#EAFFFF","html-color","Color of tooltip series text",null,{}),Ct.prototype.publish("tooltipLabelColor","#CCFFFF","html-color","Color of tooltip label text",null,{}),Ct.prototype.publish("tooltipValueColor","white","html-color","Color of tooltip value(s)",null,{}),Ct.prototype.publish("tooltipTick",!0,"boolean","Show tooltip tick",null,{}),Ct.prototype.publish("tooltipOffset",8,"number","Offset from the cursor",null,{});var Nt=Ct.prototype.tooltipValueFormat;Ct.prototype.tooltipValueFormat=function(t){var e=Nt.apply(this,arguments);return arguments.length&&(this._valueFormatter=gt(t)),e};var _t=function(){function t(){}return t.prototype.click=function(t,e,n){console.log("Click: "+JSON.stringify(t)+", "+e+", "+n)},t.prototype.dblclick=function(t,e,n){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+n)},t}();_t.prototype._palette=s.Palette.ordinal("default"),t.I1DChart=e,t.I2DChart=tt,t.I2DAggrChart=et,t.IGraph=nt,t.instanceOfIHighlight=function(t){return"function"==typeof t.highlightColumn},t.IInput=it,t.INDChart=lt,t.ITooltip=Ct,t.ITree=_t,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common"],e):e(t["@hpcc-js/api"]={},t["@hpcc-js/common"])}(this,function(t,s){"use strict";function e(){}function r(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function n(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function u(){}e.prototype._dataFamily="1D",e.prototype._palette=s.Palette.rainbow("default"),e.prototype.click=function(t,e,r){console.log("Click: "+JSON.stringify(t)+", "+e+", "+r)},e.prototype.dblclick=function(t,e,r){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+r)};var o=.7,i=1/o,l="\\s*([+-]?\\d+)\\s*",a="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",p="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",c=/^#([0-9a-f]{3})$/,h=/^#([0-9a-f]{6})$/,f=new RegExp("^rgb\\("+[l,l,l]+"\\)$"),d=new RegExp("^rgb\\("+[p,p,p]+"\\)$"),y=new RegExp("^rgba\\("+[l,l,l,a]+"\\)$"),g=new RegExp("^rgba\\("+[p,p,p,a]+"\\)$"),b=new RegExp("^hsl\\("+[a,p,p]+"\\)$"),m=new RegExp("^hsla\\("+[a,p,p,a]+"\\)$"),v={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function w(t){var e;return t=(t+"").trim().toLowerCase(),(e=c.exec(t))?new C((e=parseInt(e[1],16))>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):(e=h.exec(t))?x(parseInt(e[1],16)):(e=f.exec(t))?new C(e[1],e[2],e[3],1):(e=d.exec(t))?new C(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=y.exec(t))?k(e[1],e[2],e[3],e[4]):(e=g.exec(t))?k(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=b.exec(t))?_(e[1],e[2]/100,e[3]/100,1):(e=m.exec(t))?_(e[1],e[2]/100,e[3]/100,e[4]):v.hasOwnProperty(t)?x(v[t]):"transparent"===t?new C(NaN,NaN,NaN,0):null}function x(t){return new C(t>>16&255,t>>8&255,255&t,1)}function k(t,e,r,n){return n<=0&&(t=e=r=NaN),new C(t,e,r,n)}function M(t){return t instanceof u||(t=w(t)),t?new C((t=t.rgb()).r,t.g,t.b,t.opacity):new C}function C(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function N(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function _(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||1<=r?t=e=NaN:e<=0&&(t=NaN),new S(t,e,r,n)}function E(t,e,r,n){return 1===arguments.length?function(t){if(t instanceof S)return new S(t.h,t.s,t.l,t.opacity);if(t instanceof u||(t=w(t)),!t)return new S;if(t instanceof S)return t;var e=(t=t.rgb()).r/255,r=t.g/255,n=t.b/255,o=Math.min(e,r,n),i=Math.max(e,r,n),l=NaN,a=i-o,s=(i+o)/2;return a?(l=e===i?(r-n)/a+6*(r<n):r===i?(n-e)/a+2:(e-r)/a+4,a/=s<.5?i+o:2-i-o,l*=60):a=0<s&&s<1?0:l,new S(l,a,s,t.opacity)}(t):new S(t,e,r,null==n?1:n)}function S(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function T(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}r(u,w,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),r(C,function(t,e,r,n){return 1===arguments.length?M(t):new C(t,e,r,null==n?1:n)},n(u,{brighter:function(t){return t=null==t?i:Math.pow(i,t),new C(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?o:Math.pow(o,t),new C(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+N(this.r)+N(this.g)+N(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),r(S,E,n(u,{brighter:function(t){return t=null==t?i:Math.pow(i,t),new S(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?o:Math.pow(o,t),new S(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,o=2*r-n;return new C(T(240<=t?t-240:t+120,o,n),T(t,o,n),T(t<120?t+240:t-120,o,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var O=Math.PI/180,F=180/Math.PI,I=.96422,j=1,P=.82521,A=4/29,V=6/29,D=3*V*V,$=V*V*V;function q(t){if(t instanceof z)return new z(t.l,t.a,t.b,t.opacity);if(t instanceof R){if(isNaN(t.h))return new z(t.l,0,0,t.opacity);var e=t.h*O;return new z(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof C||(t=M(t));var r,n,o=H(t.r),i=H(t.g),l=H(t.b),a=L((.2225045*o+.7168786*i+.0606169*l)/j);return o===i&&i===l?r=n=a:(r=L((.4360747*o+.3850649*i+.1430804*l)/I),n=L((.0139322*o+.0971045*i+.7141733*l)/P)),new z(116*a-16,500*(r-a),200*(a-n),t.opacity)}function z(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function L(t){return $<t?Math.pow(t,1/3):t/D+A}function J(t){return V<t?t*t*t:D*(t-A)}function B(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function H(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function R(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}r(z,function(t,e,r,n){return 1===arguments.length?q(t):new z(t,e,r,null==n?1:n)},n(u,{brighter:function(t){return new z(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new z(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return new C(B(3.1338561*(e=I*J(e))-1.6168667*(t=j*J(t))-.4906146*(r=P*J(r))),B(-.9787684*e+1.9161415*t+.033454*r),B(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),r(R,function(t,e,r,n){return 1===arguments.length?function(t){if(t instanceof R)return new R(t.h,t.c,t.l,t.opacity);if(t instanceof z||(t=q(t)),0===t.a&&0===t.b)return new R(NaN,0,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*F;return new R(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new R(t,e,r,null==n?1:n)},n(u,{brighter:function(t){return new R(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new R(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return q(this).rgb()}}));var W=1.78277,U=-.29227,G=-.90649,X=1.97294,Y=X*G,K=X*W,Z=W*U- -.14861*G;function Q(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function tt(){}function et(){}function rt(){}r(Q,function(t,e,r,n){return 1===arguments.length?function(t){if(t instanceof Q)return new Q(t.h,t.s,t.l,t.opacity);t instanceof C||(t=M(t));var e=t.r/255,r=t.g/255,n=t.b/255,o=(Z*n+Y*e-K*r)/(Z+Y-K),i=n-o,l=(X*(r-o)-U*i)/G,a=Math.sqrt(l*l+i*i)/(X*o*(1-o)),s=a?Math.atan2(l,i)*F-120:NaN;return new Q(s<0?s+360:s,a,o,t.opacity)}(t):new Q(t,e,r,null==n?1:n)},n(u,{brighter:function(t){return t=null==t?i:Math.pow(i,t),new Q(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?o:Math.pow(o,t),new Q(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*O,e=+this.l,r=isNaN(this.s)?0:this.s*e*(1-e),n=Math.cos(t),o=Math.sin(t);return new C(255*(e+r*(-.14861*n+W*o)),255*(e+r*(U*n+G*o)),255*(e+r*(X*n)),this.opacity)}})),tt.prototype._dataFamily="2D",tt.prototype._palette=s.Palette.ordinal("default"),tt.prototype.fillColor=function(t,e,r){return this._palette(t[0])},tt.prototype.strokeColor=function(t,e,r){return E(this.fillColor(t,e,r)).darker().toString()},tt.prototype.textColor=function(t,e,r){return s.Palette.textColor(this.fillColor(t,e,r))},tt.prototype.click=function(t,e,r){console.log("Click: "+JSON.stringify(t)+", "+e+", "+r)},tt.prototype.dblclick=function(t,e,r){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+r)},et.prototype._palette=s.Palette.rainbow("default"),et.prototype.fillColor=function(t,e,r){return this._palette(t.length)},et.prototype.strokeColor=function(t,e,r){return E(this.fillColor(t,e,r)).darker().toString()},et.prototype.textColor=function(t,e,r){return s.Palette.textColor(this.fillColor(t,e,r))},et.prototype.click=function(t,e,r){console.log("Click: "+JSON.stringify(t)+", "+e+", "+r)},et.prototype.dblclick=function(t,e,r){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+r)},rt.prototype._dataFamily="graph",rt.prototype.vertex_click=function(t,e,r,n){n&&n.vertex&&console.log("Vertex click: "+n.vertex.id())},rt.prototype.vertex_dblclick=function(t,e,r,n){n&&n.vertex&&console.log("Vertex double click: "+n.vertex.id())},rt.prototype.edge_click=function(t,e,r,n){n&&n.edge&&console.log("Edge click: "+n.edge.id())},rt.prototype.edge_dblclick=function(t,e,r,n){n&&n.edge&&console.log("Edge double click: "+n.edge.id())};var nt=function(t,e){return(nt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function ot(t,e){function r(){this.constructor=t}nt(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var it=function(t){function e(){return t.call(this)||this}return ot(e,t),e.prototype.isValid=function(){if(this.validate()&&!new RegExp(this.validate()).test(this.value()))return!1;return!0},e.prototype.hasValue=function(){if("function"!=typeof this.type)return""!==this.value();switch(this.type()){case"radio":case"checkbox":if(this.value()&&"false"!==this.value())return!0;break;default:if(this.value())return!0}return!1},e.prototype.blur=function(t){},e.prototype.keyup=function(t){},e.prototype.focus=function(t){},e.prototype.click=function(t){},e.prototype.dblclick=function(t){},e.prototype.change=function(t,e){},e.prototype.resetValue=function(t){t.value(t._inputElement[0].node().value)},e.prototype.disable=function(r){this._inputElement.forEach(function(t,e){t.attr("disabled",r?"disabled":null)})},e.prototype.setFocus=function(){this._inputElement.length&&this._inputElement[0].node().focus()},e}(s.Widget);function lt(){}function at(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[1<n.length?n[0]+n.slice(2):n,+t.slice(r+1)]}it.prototype.publish("name","","string","HTML name for the input"),it.prototype.publish("label","","string","Descriptive label"),it.prototype.publish("value","","string","Input Current Value"),it.prototype.publish("validate",null,"string","Input Validation"),lt.prototype._dataFamily="ND",lt.prototype._palette=s.Palette.ordinal("default"),lt.prototype.fillColor=function(t,e,r){return this._palette(e)},lt.prototype.strokeColor=function(t,e,r){return E(this.fillColor(t,e,r)).darker().toString()},lt.prototype.textColor=function(t,e,r){return s.Palette.textColor(this.fillColor(t,e,r))},lt.prototype.click=function(t,e,r){console.log("Click: "+JSON.stringify(t)+", "+e+", "+r)},lt.prototype.dblclick=function(t,e,r){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+r)};var st,ut=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function pt(t){return new ct(t)}function ct(t){if(!(e=ut.exec(t)))throw new Error("invalid format: "+t);var e;this.fill=e[1]||" ",this.align=e[2]||">",this.sign=e[3]||"-",this.symbol=e[4]||"",this.zero=!!e[5],this.width=e[6]&&+e[6],this.comma=!!e[7],this.precision=e[8]&&+e[8].slice(1),this.trim=!!e[9],this.type=e[10]||""}function ht(t,e){var r=at(t,e);if(!r)return t+"";var n=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+n:n.length>o+1?n.slice(0,o+1)+"."+n.slice(o+1):n+new Array(o-n.length+2).join("0")}pt.prototype=ct.prototype,ct.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var ft={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return ht(100*t,e)},r:ht,s:function(t,e){var r=at(t,e);if(!r)return t+"";var n=r[0],o=r[1],i=o-(st=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=n.length;return i===l?n:l<i?n+new Array(i-l+1).join("0"):0<i?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+at(t,Math.max(0,e+i-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function dt(t){return t}var yt,gt,bt=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function mt(t){var e,a,s,k=t.grouping&&t.thousands?(a=t.grouping,s=t.thousands,function(t,e){for(var r=t.length,n=[],o=0,i=a[0],l=0;0<r&&0<i&&(e<l+i+1&&(i=Math.max(1,e-l)),n.push(t.substring(r-=i,r+i)),!((l+=i+1)>e));)i=a[o=(o+1)%a.length];return n.reverse().join(s)}):dt,n=t.currency,M=t.decimal,C=t.numerals?(e=t.numerals,function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}):dt,o=t.percent||"%";function u(t){var u=(t=pt(t)).fill,p=t.align,c=t.sign,e=t.symbol,h=t.zero,f=t.width,d=t.comma,y=t.precision,g=t.trim,b=t.type;"n"===b?(d=!0,b="g"):ft[b]||(null==y&&(y=12),g=!0,b="g"),(h||"0"===u&&"="===p)&&(h=!0,u="0",p="=");var m="$"===e?n[0]:"#"===e&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",v="$"===e?n[1]:/[%p]/.test(b)?o:"",w=ft[b],x=/[defgprs%]/.test(b);function r(t){var e,r,n,o=m,i=v;if("c"===b)i=w(t)+i,t="";else{var l=(t=+t)<0;if(t=w(Math.abs(t),y),g&&(t=function(t){t:for(var e,r=t.length,n=1,o=-1;n<r;++n)switch(t[n]){case".":o=e=n;break;case"0":0===o&&(o=n),e=n;break;default:if(0<o){if(!+t[n])break t;o=0}}return 0<o?t.slice(0,o)+t.slice(e+1):t}(t)),l&&0==+t&&(l=!1),o=(l?"("===c?c:"-":"-"===c||"("===c?"":c)+o,i=("s"===b?bt[8+st/3]:"")+i+(l&&"("===c?")":""),x)for(e=-1,r=t.length;++e<r;)if((n=t.charCodeAt(e))<48||57<n){i=(46===n?M+t.slice(e+1):t.slice(e))+i,t=t.slice(0,e);break}}d&&!h&&(t=k(t,1/0));var a=o.length+t.length+i.length,s=a<f?new Array(f-a+1).join(u):"";switch(d&&h&&(t=k(s+t,s.length?f-i.length:1/0),s=""),p){case"<":t=o+t+i+s;break;case"=":t=o+s+t+i;break;case"^":t=s.slice(0,a=s.length>>1)+o+t+i+s.slice(a);break;default:t=s+o+t+i}return C(t)}return y=null==y?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),r.toString=function(){return t+""},r}return{format:u,formatPrefix:function(t,e){var r,n=u(((t=pt(t)).type="f",t)),o=3*Math.max(-8,Math.min(8,Math.floor((r=e,((r=at(Math.abs(r)))?r[1]:NaN)/3)))),i=Math.pow(10,-o),l=bt[8+o/3];return function(t){return n(i*t)+l}}}}yt=mt({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),gt=yt.format,yt.formatPrefix;var vt="$";function wt(){}function xt(t,e){var r=new wt;if(t instanceof wt)t.each(function(t,e){r.set(e,t)});else if(Array.isArray(t)){var n,o=-1,i=t.length;if(null==e)for(;++o<i;)r.set(o,t[o]);else for(;++o<i;)r.set(e(n=t[o],o,t),n)}else if(t)for(var l in t)r.set(l,t[l]);return r}function kt(){}wt.prototype=xt.prototype={constructor:wt,has:function(t){return vt+t in this},get:function(t){return this[vt+t]},set:function(t,e){return this[vt+t]=e,this},remove:function(t){var e=vt+t;return e in this&&delete this[e]},clear:function(){for(var t in this)t[0]===vt&&delete this[t]},keys:function(){var t=[];for(var e in this)e[0]===vt&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)e[0]===vt&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)e[0]===vt&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)e[0]===vt&&++t;return t},empty:function(){for(var t in this)if(t[0]===vt)return!1;return!0},each:function(t){for(var e in this)e[0]===vt&&t(this[e],e.slice(1),this)}};var Mt=xt.prototype;kt.prototype=function(t,e){var r=new kt;if(t instanceof kt)t.each(function(t){r.add(t)});else if(t){var n=-1,o=t.length;if(null==e)for(;++n<o;)r.add(t[n]);else for(;++n<o;)r.add(e(t[n],n,t))}return r}.prototype={constructor:kt,has:Mt.has,add:function(t){return this[vt+(t+="")]=t,this},remove:Mt.remove,clear:Mt.clear,values:Mt.keys,size:Mt.size,empty:Mt.empty,each:Mt.each};!function(t,e){void 0===e&&(e={});var r=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}('.d3-tip {\r\n line-height: 1;\r\n font-weight: bold;\r\n padding: 12px;\r\n background: rgba(0, 0, 0, 0.66);\r\n color: #fff;\r\n border-radius: 2px;\r\n pointer-events: none !important;\r\n z-index:10;\r\n}\r\n\r\n.d3-tip.hidden {\r\n visibility:hidden;\r\n}\r\n\r\n/* Creates a small triangle extender for the tooltip */\r\n.d3-tip:after {\r\n content: " ";\r\n box-sizing: border-box;\r\n display: inline-block;\r\n border: 4px solid rgba(0, 0, 0, 0.66);\r\n position: absolute;\r\n pointer-events: none !important;\r\n width: 8px;\r\n height: 8px;\r\n margin: 0;\r\n}\r\n\r\n/* Northward tooltips */\r\n.d3-tip.n:after {\r\n top: 100%;\r\n left: calc(50% - 4px);\r\n border-top-width: 8px;\r\n border-right-color: transparent;\r\n border-bottom-color: transparent;\r\n border-left-color: transparent;\r\n}\r\n\r\n/* Eastward tooltips */\r\n.d3-tip.e:after {\r\n top: calc(50% - 4px);\r\n left: -12px;\r\n border-top-color: transparent;\r\n border-right-width: 8px;\r\n border-bottom-color: transparent;\r\n border-left-color: transparent;\r\n}\r\n\r\n/* Southward tooltips */\r\n.d3-tip.s {\r\n margin-top: 8px;\r\n}\r\n.d3-tip.s:after {\r\n top: -12px;\r\n left: calc(50% - 4px);\r\n border-top-color: transparent;\r\n border-right-color: transparent;\r\n border-bottom-width: 8px;\r\n border-left-color: transparent;\r\n}\r\n\r\n/* Westward tooltips */\r\n.d3-tip.w:after {\r\n top: calc(50% - 4px);\r\n left: 100%;\r\n border-top-color: transparent;\r\n border-right-color: transparent;\r\n border-bottom-color: transparent;\r\n border-left-width: 8px;\r\n}\r\n\r\n.d3-tip.notick:after {\r\n border-color: transparent !important;\r\n}\r\n\r\n.common_Widget .over {\r\n stroke: rgba(0, 0, 0, 0.66);\r\n opacity: 0.66;\r\n}\r\n\r\n.d3-tip.ITooltip-tooltipStyle-series-table{\r\n padding: 0;\r\n}\r\n\r\n.d3-tip .ITooltip-series-table th,\r\n.d3-tip .ITooltip-series-table td{\r\n padding: 6px;\r\n text-align: left;\r\n border: 1px solid #D1D1D1;\r\n}\r\n\r\n.d3-tip .ITooltip-series-table .series-table-row-color{\r\n display: inline-block;\r\n height: 10px;\r\n width: 10px;\r\n margin-right: 10px;\r\n}\r\n\r\n.d3-tip .ITooltip-series-table .series-table-row-label{\r\n display: inline-block;\r\n}\r\n\r\n.d3-tip .ITooltip-series-table th{\r\n background-color: #B3B3B3;\r\n}\r\n\r\n.d3-tip .ITooltip-series-table td{\r\n background-color: #FFF;\r\n color: #555;\r\n font-weight: normal;\r\n}\r\n\r\n.d3-tip .ITooltip-series-table td:first-child{\r\n border-right: 0;\r\n}\r\n\r\ntable.ITooltip-series-table td:last-child{\r\n border-left: 1px dotted #A3A3A3;\r\n}\r\n');var Ct=function(a){function t(){var t=a.call(this)||this;if(t.tooltip=function(){var e=function(){return"n"},v=function(){return[0,0]},w=function(){return" "},x=i(document.body),n=t(),o=null,u=null,k=null,M=function(t){var e;if(e=t.node(),o=e?"svg"===e.tagName.toLowerCase()?e:e.ownerSVGElement:null){u=o.createSVGPoint();var r=x();r&&n&&r.appendChild(n)}};M.show=function(t,e,r){k=r[e];var n=Array.prototype.slice.call(arguments),o=w.apply(this,n);if(null===o)return M;var i,l=v.apply(this,n),a=_(),s=N.length,u=x().getBoundingClientRect();for(a.html(o).style("opacity",1).style("pointer-events","all");s--;)a.classed(N[s],!1);for(var p,c,h=!1,f={},d=N[0],y=0;y<N.length&&!(h=m(N[y]));y++);if(h)a.classed("notick",!1);else{a.classed("notick",!0);var g=(c=f[d]).top>c.bottom?0<c.top?-c.top:0:c.bottom,b=(p=f[d]).left>p.right?0<p.left?-p.left:0:0<p.right?p.right:0;m(d,g,b)}return M;function m(r,t,e){t=t||0,e=e||0,a.style("white-space","nowrap"),i=C.get(r).apply(this),a.classed(r,!0).style("top",i.top+l[0]-t+"px").style("left",i.left+l[1]-e+"px");var n=a.node().getBoundingClientRect(),o=n.top>u.top&&n.left>u.left&&n.bottom<u.bottom&&n.right<u.right;return f[r]={top:u.top-n.top,right:n.right-u.right,bottom:n.bottom-u.bottom,left:u.left-n.left},a.style("white-space","normal"),f[r].total_overflow=Object.keys(f[r]).filter(function(t){return 0<f[r][t]}).reduce(function(t,e){return t+f[r][e]},0),f[d].total_overflow>f[r].total_overflow&&(d=r),o||a.classed(r,!1),o}},M.hide=function(){return _().style("opacity",0).style("pointer-events","none"),M},M.attr=function(t,e){if(arguments.length<2&&"string"==typeof t)return _().attr(t);var r=Array.prototype.slice.call(arguments);return s.selection.prototype.attr.apply(_(),r),M},M.style=function(t,e){if(arguments.length<2&&"string"==typeof t)return _().style(t);var r=Array.prototype.slice.call(arguments);return s.selection.prototype.style.apply(_(),r),M},M.direction=function(t){return arguments.length?(e=null==t?t:i(t),M):e},M.offset=function(t){return arguments.length?(v=null==t?t:i(t),M):v},M.html=function(t){return arguments.length?(w=null==t?t:i(t),M):w},M.rootElement=function(t){return arguments.length?(x=i(t),M):x},M.destroy=function(){return n&&(_().remove(),n=null),M};var C=xt({n:function(){var t=r(window);return{top:t.n.y-n.offsetHeight,left:t.n.x-n.offsetWidth/2}},s:function(){var t=r(window);return{top:t.s.y+8,left:t.s.x-n.offsetWidth/2}},e:function(){var t=r(window);return{top:t.e.y-n.offsetHeight/2,left:t.e.x+8}},w:function(){var t=r(window);return{top:t.w.y-n.offsetHeight/2,left:t.w.x-n.offsetWidth-8}},nw:function(){var t=r(window);return{top:t.nw.y-n.offsetHeight,left:t.nw.x-n.offsetWidth}},ne:function(){var t=r(window);return{top:t.ne.y-n.offsetHeight,left:t.ne.x}},sw:function(){var t=r(window);return{top:t.sw.y,left:t.sw.x-n.offsetWidth}},se:function(){var t=r(window);return{top:t.se.y,left:t.se.x}}}),N=C.keys();function t(){var t=s.select(document.createElement("div"));return t.attr("class","d3-tip").style("position","absolute").style("top",0).style("opacity",0).style("pointer-events","none").style("box-sizing","border-box"),t.node()}function _(){return null==n&&(n=t(),x().appendChild(n)),s.select(n)}function r(t){for(var e=k||t;null==e.getCTM&&null!=e.parentNode;)e=e.parentNode;var r={},n=e.getCTM(),o=e.getBBox(),i=o.width,l=o.height,a=o.x,s=o.y;return u.x=a,u.y=s,r.nw=u.matrixTransform(n),u.x+=i,r.ne=u.matrixTransform(n),u.y+=l,r.se=u.matrixTransform(n),u.x-=i,r.sw=u.matrixTransform(n),u.y-=l/2,r.w=u.matrixTransform(n),u.x+=i,r.e=u.matrixTransform(n),u.x-=i/2,u.y-=l/2,r.n=u.matrixTransform(n),u.y+=l,r.s=u.matrixTransform(n),r}function i(t){return"function"==typeof t?t:function(){return t}}return M}(),t._valueFormatter=gt(t.tooltipValueFormat()),t.layerEnter){var n=t.layerEnter;t.layerEnter=function(t,e,r){this._parentOverlay||(this._parentOverlay=t._parentOverlay),this.tooltipEnter(e),n.apply(this,arguments)};var e=t.layerUpdate;t.layerUpdate=function(t){e.apply(this,arguments),this.tooltipUpdate()};var r=t.layerExit;t.layerExit=function(t){this.tooltipExit(),r.apply(this,arguments)}}else{var o=t.enter;t.enter=function(t,e){this.tooltipEnter(e),o.apply(this,arguments)};var i=t.update;t.update=function(t,e){i.apply(this,arguments),this.tooltipUpdate()};var l=t.exit;t.exit=function(t,e){this.tooltipExit(),l.apply(this,arguments)}}return t}return ot(t,a),t.prototype.tooltipEnter=function(t){var e=this.parentOverlay();e.empty()||this.tooltip.rootElement(e.node().parentNode),t.call(this.tooltip)},t.prototype.tooltipUpdate=function(){var e=this;this.tooltip.offset(function(){if(event&&e.tooltipFollowMouse()){var t=document.querySelector(".d3-tip");return t.style.display="block",t.style.left=e.tooltipOffset()+event.clientX+"px",t.style.top=event.clientY+"px",[]}switch(e.tooltip.direction()()){case"e":return[0,e.tooltipOffset()];default:return[-e.tooltipOffset(),0]}});var t=this.tooltip.attr("class");t&&(t=(t=t.split(" notick").join("")+(this.tooltipTick()?"":" notick")+("none"===this.tooltipStyle()?" hidden":"")).split(" ").filter(function(t){return 0!==t.indexOf("ITooltip-tooltipStyle-")}).join(" "),t+=" ITooltip-tooltipStyle-"+this.tooltipStyle(),this.tooltip.attr("class",t))},t.prototype.tooltipExit=function(){this.tooltip&&this.tooltip.destroy()},t.prototype._tooltipHTML=function(t){return t},t.prototype.tooltipHTML=function(t){return this.tooltip.html(t)},t.prototype.tooltipFormat=function(t){switch(void 0===t&&(t={}),t.label=void 0===t.label?"":t.label,t.series=t.series||"",t.value instanceof Date?t.value=t.value||"":t.value=this._valueFormatter(t.value)||"",this.tooltipStyle()){case"none":break;case"series-table":var e='<table class="ITooltip-series-table"><thead><tr><th colspan="2">'+t.label+"</th></tr></thead><tbody>";return t.arr.forEach(function(t){e+="<tr>",e+="<td>",e+='<div class="series-table-row-color" style="background-color:'+t.color+'"></div>',e+='<div class="series-table-row-label">'+t.label+"</div>",e+="</td>",e+='<td><div class="series-table-row-value">'+t.value+"</div></td>",e+="</tr>"}),e+="</tbody>",e+="</table>";default:return t.series?"<span style='color:"+this.tooltipSeriesColor()+"'>"+t.series+"</span> / <span style='color:"+this.tooltipLabelColor()+"'>"+t.label+"</span>: <span style='color:"+this.tooltipValueColor()+"'>"+t.value+"</span>":""!==t.label?"<span style='color:"+this.tooltipLabelColor()+"'>"+t.label+"</span>: <span style='color:"+this.tooltipValueColor()+"'>"+t.value+"</span>":"<span style='color:"+this.tooltipValueColor()+"'>"+t.value+"</span>"}},t.prototype.tooltipKeyValueFormat=function(t,e){var r="";for(var n in e)if(n!==t){var o=e&&e[n]?e[n]:"";r+='<tr><td style="'+(this.tooltipLabelColor_exists()?"color:"+this.tooltipLabelColor():"")+'">'+n+'</td><td style="font-weight:normal">'+o+"</td></tr>"}return'<table>\n <thead>\n <tr><th colspan="2" style="font-weight:bold;font-size:16px">'+e[t]+"</th></tr>\n </thead>\n <tbody>\n "+r+"\n </tbody>\n </table>"},t}(s.Widget);Ct.prototype.publish("tooltipStyle","default","set","Style mode",["default","none","series-table"],{}),Ct.prototype.publish("tooltipFollowMouse",!1,"boolean","If true, the tooltip will follow mouse movement",null,{}),Ct.prototype.publish("tooltipValueFormat",",.2f","string","Number format of tooltip value(s)",null,{}),Ct.prototype.publish("tooltipSeriesColor","#EAFFFF","html-color","Color of tooltip series text",null,{}),Ct.prototype.publish("tooltipLabelColor","#CCFFFF","html-color","Color of tooltip label text",null,{}),Ct.prototype.publish("tooltipValueColor","white","html-color","Color of tooltip value(s)",null,{}),Ct.prototype.publish("tooltipTick",!0,"boolean","Show tooltip tick",null,{}),Ct.prototype.publish("tooltipOffset",8,"number","Offset from the cursor",null,{});var Nt=Ct.prototype.tooltipValueFormat;Ct.prototype.tooltipValueFormat=function(t){var e=Nt.apply(this,arguments);return arguments.length&&(this._valueFormatter=gt(t)),e};var _t=function(){function t(){}return t.prototype.click=function(t,e,r){console.log("Click: "+JSON.stringify(t)+", "+e+", "+r)},t.prototype.dblclick=function(t,e,r){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+r)},t}();_t.prototype._palette=s.Palette.ordinal("default"),t.I1DChart=e,t.I2DChart=tt,t.I2DAggrChart=et,t.IGraph=rt,t.instanceOfIHighlight=function(t){return"function"==typeof t.highlightColumn},t.IInput=it,t.INDChart=lt,t.ITooltip=Ct,t.ITree=_t,Object.defineProperty(t,"__esModule",{value:!0})}); |
{ | ||
"name": "@hpcc-js/api", | ||
"version": "2.3.2", | ||
"version": "2.3.3", | ||
"description": "hpcc-js - Viz api", | ||
@@ -28,3 +28,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@hpcc-js/common": "^2.12.0" | ||
"@hpcc-js/common": "^2.12.1" | ||
}, | ||
@@ -61,3 +61,3 @@ "devDependencies": { | ||
"homepage": "https://github.com/hpcc-systems/Visualization", | ||
"gitHead": "df2713f58d457ad66a8eadd0ca03d531886f1956" | ||
"gitHead": "8e816df4658295080e2b946ea5b75eb8d74e517a" | ||
} |
@@ -21,8 +21,17 @@ import { Widget } from "@hpcc-js/common"; | ||
value?: Date | string | number; | ||
arr?: Array<{ | ||
color: string; | ||
label: string; | ||
value: string; | ||
}>; | ||
}): string; | ||
tooltipKeyValueFormat(titleKey: string, obj: object): string; | ||
tooltipStyle: { | ||
(): string; | ||
(_: string): ITooltip; | ||
(): "default" | "none" | "series-table"; | ||
(_: "default" | "none" | "series-table"): ITooltip; | ||
}; | ||
tooltipFollowMouse: { | ||
(): boolean; | ||
(_: boolean): ITooltip; | ||
}; | ||
tooltipValueFormat: (_?: any) => string | ITooltip; | ||
@@ -29,0 +38,0 @@ tooltipSeriesColor: { |
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
500450
3391
Updated@hpcc-js/common@^2.12.1