D3.JS Tinting PNG icons -


i have directed graph d3.js diagram , each element (node) should have png icon/thumbnail own unique colour taken json data.

i have tried implement css tinting

.style("-webkit-mask-box-image", "url({url}"); 

and masking (clipping) coloured rectangle png image

var defs = svg.append("defs");     defs.append("clippath")     .append("svg:image")     .attr("x", 32)     .attr("y", 32)     .attr("width", 32)     .attr("height", 32)     .attr("xlink:href", "assets/star.png")  .attr("mask", "url(#mask)") or .attr("clip-path", "url(#mask)") 

without success. there existed solution task?


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -