Template:PeakCountPerSample: Difference between revisions
From FANTOM5_SSTAR
No edit summary |
No edit summary |
||
Line 246: | Line 246: | ||
if(selVal == 1 || selVal == '') | if(selVal == 1 || selVal == '') | ||
{ | { | ||
options.series[0].data= [] | var sorted = sortByKey(categories_xAxisTemp[0], "Symbol"); | ||
alert(sorted); | |||
options.series[0].data= []; | |||
} | } | ||
else if(selVal == 2) | else if(selVal == 2) | ||
{ | { | ||
options.series[0].data= [] | options.series[0].data= []; | ||
} | } | ||
else if(selVal == 3) | else if(selVal == 3) | ||
{ | { | ||
options.series[0].data= [] | options.series[0].data= []; | ||
} | } | ||
else | else | ||
{ | { | ||
options.series[0].data= [] | options.series[0].data= []; | ||
} | } | ||
//chart.redraw(); | //chart.redraw(); | ||
Line 293: | Line 295: | ||
d > 2 ? '#FED976': | d > 2 ? '#FED976': | ||
'#FFEDA0'; | '#FFEDA0'; | ||
} | |||
function sortByKey(array, key) { | |||
return array.sort(function(a, b) { | |||
var x = a[key]; var y = b[key]; | |||
return ((x < y) ? -1 : ((x > y) ? 1 : 0)); | |||
}); | |||
} | } | ||
Revision as of 11:22, 30 September 2013
Sort by