D3 - issues on first transition after initialization
===

I have created this jsbin http://jsbin.com/ibewux/3/edit to show a strange behavior on transitions.

When the chart is initialized, it correctly displays the data (see the table below it).

If I try to change the chart type through the dropdown menu, some series are swapped; after this happens, the series are not swapped anymore.

Same thing happens if you click on updateChartData button; first time it will swap the series compared to the data displayed in the table.

So it seems that only the first transition after initialization is subject to this unwanted swap.

It's a short piece of code and wonder if you can spot the reason why this happens.

Thanks