X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=validation.git;a=blobdiff_plain;f=ui%2Fsrc%2Fmain%2Fwebapp%2Fstatic%2Ffusion%2Fsample%2Fhtml%2Fjs%2Fworddata.min.js;fp=ui%2Fsrc%2Fmain%2Fwebapp%2Fstatic%2Ffusion%2Fsample%2Fhtml%2Fjs%2Fworddata.min.js;h=6b82746057b6e5692491bd9d2e7a87d7022144b7;hp=0000000000000000000000000000000000000000;hb=2879b2ee5e1e2815e5f43cb802352bf2878397af;hpb=ce4ad29dc48317cc7cb60fe433072ac46dea2ebb diff --git a/ui/src/main/webapp/static/fusion/sample/html/js/worddata.min.js b/ui/src/main/webapp/static/fusion/sample/html/js/worddata.min.js new file mode 100644 index 0000000..6b82746 --- /dev/null +++ b/ui/src/main/webapp/static/fusion/sample/html/js/worddata.min.js @@ -0,0 +1 @@ +function dataViz(t){function e(t){var e=d3.select("svg").append("g").attr("id","wordCloudG").attr("transform","translate(210,175)");e.selectAll("text").data(t).enter().append("text").style("font-size",function(t){return 1*t.size+"px"}).style("fill",function(t){return keywords.indexOf(t.text)>-1?"red":"black"}).style("opacity",.75).attr("text-anchor","middle").attr("transform",function(t){return"translate("+[t.x,t.y]+")rotate("+t.rotate+")"}).text(function(t){return t.text})}d3.layout.cloud().size([420,350]).words(t).rotate(function(t){return t.text.length>5?0:90}).fontSize(function(t){return wordScale(t.frequency)}).on("end",e).start()}d3.csv(dataURL,function(t){dataViz(t)}),wordScale=d3.scale.linear().domain([0,100]).range([0,70]).clamp(!0); \ No newline at end of file