I have this piece of code which as I understand it should draw the first rect tangle and then the second. The second has animation which simply expands the width. So with this code I see the blue bar appear then I see the yellow bar appear and it grows as expected but when it finishes it disappears.The both have the same start points and width so it making a progress bar. The blue bar is 400 pixels in length, the yellow is only 250 so I should see 150 pixels of blue at least that is what I think should be happening
<svg xmlns='http://www.w3.org/2000/svg'>
<rect x='10' y='10' height='20' width='400' style='stroke:#ff0000; fill: #0000ff'>
</rect>
<rect x='10' y='10' height='20' width='0' style='stroke:#ff0000; fill: #ffff00'>
<animate attributeName='width' attributeType='XML'
to='250'
begin='0s'
dur='2s' />
</rect>
</svg>
I am still new to SVG but this should work from what I have read the yellow bar is done last so it be on top.