使用D3.JS进行文字渐变 text gradient effect in d3.js

使用以下模板即可:
using the following template:

                vis.select(".需要改变的文字的类") // the class the text to be changed belongs to 
                .transition()
                .style("opacity", 0)
                .duration(500)
                .transition()
                .duration(500)
                .style("opacity", 1)
                .text("最终需要变成的文字"); // the final text to be 

最终效果如下:
Showcase:


ezgif-2-d46559584957.gif

如果不动请点原图

你可能感兴趣的:(使用D3.JS进行文字渐变 text gradient effect in d3.js)