1
問題是如何在沒有stroke-dasharray的情況下展開垂直行。不知道如何做對。這是我的例子:SVG展開行verticaly
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_3" x="0px" y="0px" width="286px" height="286px" viewBox="0 0 286 286" enable-background="new 0 0 286 286" xml:space="preserve">
<line fill="none" stroke="#3AB0F3" id="stroke-dasharray" stroke-width="244" stroke-miterlimit="10" x1="143" y1="0" x2="143" y2="286"/><animate
attributeName="stroke-dasharray"
from="0, 0" to="143, 143"
dur="3s"
repeatCount="1"/></line>
</svg>
這個問題的主要問題是如何設置SVG的屬性來擴展它沒有stroke-dasharray垂直。
以及來自d3圖表的一些jQuery代碼。
var mySVG1 = $('#Layer_3').drawsvg({
duration: 3000
});
mySVG1.drawsvg('animate');
請記,我說 'lineSelect' 的ID來就行了。如果你不能添加這個,那麼只要你可以選擇這條線,例如d3.select('line'),如果多於一行的線不能工作,你將不得不選擇什麼行的索引你想 – thatOneGuy
謝謝你的解決方案,它工作得很好。 – marin