All Downloads are FREE. Search and download functionalities are using the official Maven repository.

js.biobankconnect-graph.min.js Maven / Gradle / Ivy

(function(a){a.fn.bcgraph=function(i,e){var c=jStat.mean(i);var d=jStat.stdev(i);var h=i.map(function(j){return jStat.normal.pdf(j,c,d)});var g={points:[]};var b="graph-id-"+new Date().getMilliseconds();this.attr("id",b);var f=a.extend({},a.fn.bcgraph.defaults,e);i.forEach(function(k,j){g.points.push({x:i[j],y:h[j]})});vg.parse.spec(a.fn.bcgraph.defaults,function(k){var j=k({el:"#"+b,data:g}).update()});return this};a.fn.bcgraph.defaults={width:400,height:200,padding:{top:10,left:30,bottom:30,right:10},data:[{name:"points"}],scales:[{name:"x",nice:true,range:"width",domain:{data:"points",field:"data.x"}},{name:"y",nice:true,range:"height",domain:{data:"points",field:"data.y"}}],axes:[{type:"x",scale:"x"},{type:"y",scale:"y"}],marks:[{type:"symbol",from:{data:"points"},properties:{enter:{x:{scale:"x",field:"data.x"},y:{scale:"y",field:"data.y"},stroke:{value:"steelblue"},fillOpacity:{value:0.5}},update:{fill:{value:"transparent"},size:{value:100}},hover:{fill:{value:"pink"},size:{value:300}}}}]}}($));




© 2015 - 2024 Weber Informatics LLC | Privacy Policy