<script src='https://d3js.org/d3.v4.min.js'></script> was added in the page head.
xxxxxxxxxx
%%html
<svg id='svg001' width=150px height=150px/><script>
var c1='#ff3636',c2='#3636ff'; var n=10000;
var svg=d3.select('#svg1');
d3.select('#svg001').transition().duration(n)
.styleTween('background-color',
function(){return d3.interpolate(c1,c2)});
d3.select('#svg001').append('circle')
.attr('cx','50%').attr('cy','50%').attr('r',35)
.transition().duration(n)
.styleTween('fill',
function(){return d3.interpolate(c2,c1)});
No comments:
Post a Comment