Commit 00a00f3d8168abf1a506069eb7a40ab167b2008b
1 parent
0d73cd83
graph uploads
Showing
1 changed file
with
16 additions
and
5 deletions
datalets/graph-datalet/graph-datalet.html
| ... | ... | @@ -180,9 +180,19 @@ Example: |
| 180 | 180 | .attr("y","0%") |
| 181 | 181 | .attr("width","100%") |
| 182 | 182 | .attr("height","100%") |
| 183 | - .attr("style","-webkit-border-radius: 20px;") | |
| 184 | 183 | .append("feImage") |
| 185 | - .attr("xlink:href", graph.nodes[i].image); | |
| 184 | + .attr("xlink:href", graph.nodes[i].image) | |
| 185 | + /*test*/ | |
| 186 | + .attr("result", "img") | |
| 187 | + .append("feComposite") | |
| 188 | + .attr("operator","in") | |
| 189 | + .attr("in","img") | |
| 190 | + .attr("in2","SourceGraphic") | |
| 191 | + .attr("result","clip") | |
| 192 | + .append("feBlend") | |
| 193 | + .attr("mode","multiply") | |
| 194 | + .attr("in","SourceGraphic") | |
| 195 | + .attr("in2","clip"); | |
| 186 | 196 | } |
| 187 | 197 | //end pezzotto |
| 188 | 198 | |
| ... | ... | @@ -203,7 +213,8 @@ Example: |
| 203 | 213 | |
| 204 | 214 | gnodes = this.svg.selectAll(".node").data(graph.nodes).enter().append("g").attr("class", function (t) { |
| 205 | 215 | return t.fixed ? "node fixed" : "node" |
| 206 | - }).attr("name", function (t) { | |
| 216 | + }) | |
| 217 | + .attr("name", function (t) { | |
| 207 | 218 | return t.name ? t.name.split(" ").join("_").toLowerCase() : "" |
| 208 | 219 | }).on("mouseover", this.mouseover) |
| 209 | 220 | .on("mouseout", this.mouseout) |
| ... | ... | @@ -214,7 +225,8 @@ Example: |
| 214 | 225 | }) |
| 215 | 226 | .attr("class", function (t) { |
| 216 | 227 | return t.fixed ? "" : "drag" |
| 217 | - }).attr("r", function (t) { | |
| 228 | + }) | |
| 229 | + .attr("r", function (t) { | |
| 218 | 230 | return t.r ? t.r : 15 |
| 219 | 231 | }) |
| 220 | 232 | .attr("style", function (t) { |
| ... | ... | @@ -231,7 +243,6 @@ Example: |
| 231 | 243 | default: |
| 232 | 244 | t.color = "#333"; |
| 233 | 245 | } |
| 234 | - //return t.color ? "fill:" + t.color : !1 + "; stroke:white" | |
| 235 | 246 | return "fill:" + t.color + "; stroke:white" |
| 236 | 247 | }); |
| 237 | 248 | ... | ... |