diff --git a/src/order/appearance b/src/order/appearance deleted file mode 100644 index a25a247..0000000 --- a/src/order/appearance +++ /dev/null @@ -1,10 +0,0 @@ -function stackOrderAppearance(series) { - var appearanceIndex = series.map(function(d,i){ - for(var k = 0,n = d.length;k < n;++k){ - if(d[k][1] > 0) break; - } - return [k, i]; - }); - appearanceIndex.sort(function(a,b){return a[0] - b[0];}) - return appearanceIndex.map(function(d){return d[1]}); -} diff --git a/src/order/appearance.js b/src/order/appearance.js new file mode 100644 index 0000000..fb1f3d9 --- /dev/null +++ b/src/order/appearance.js @@ -0,0 +1,10 @@ +export default function(series) { + var appearanceIndex = series.map(function(d,i){ + for(var k = 0, n = d.length;k < n;++k){ + if(d[k][1] > 0) break; + } + return [k, i]; + }); + appearanceIndex.sort(function(a,b){return a[0] - b[0];}) + return appearanceIndex.map(function(d){return d[1]}); +}