User:Hisa/custom list test: Difference between revisions
From FANTOM5_SSTAR
No edit summary |
No edit summary |
||
(14 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
<script type="text/javascript" language="javascript" src="/resource_browser/rb_js/datatables/extras/TableTools/media/js/TableTools.min.js"></script> | <script type="text/javascript" language="javascript" src="/resource_browser/rb_js/datatables/extras/TableTools/media/js/TableTools.min.js"></script> | ||
<script type="text/javascript" language="javascript" src="/resource_browser/rb_js/flot/jquery.flot.min.js"></script> | <script type="text/javascript" language="javascript" src="/resource_browser/rb_js/flot/jquery.flot.min.js"></script> | ||
<style type="text/css" title="currentStyle"> | <style type="text/css" title="currentStyle"> | ||
@import "/resource_browser/rb_js/datatables/media/css/jquery.dataTables.css"; | @import "/resource_browser/rb_js/datatables/media/css/jquery.dataTables.css"; | ||
Line 14: | Line 14: | ||
$(document).ready(function() { | $(document).ready(function() { | ||
var oTable = $('.ffcp_explist').dataTable({ | var oTable = $('.ffcp_explist').dataTable({ | ||
// "bPaginate": false, | |||
"sScrollY": "300px", | "sScrollY": "300px", | ||
"bScrollCollapse": true, | "bScrollCollapse": true, | ||
"iDisplayLength": -1, | "iDisplayLength": -1, | ||
"aLengthMenu": [[10, 25, 100, -1], [10, 25, 100, "All"]], | "aLengthMenu": [[10, 25, 100, -1], [10, 25, 100, "All"]], | ||
"aoColumnDefs": [ { "asSorting": [ "desc", "asc" ], "aTargets": [ "_all" ] } ], | "aoColumnDefs": [ { "asSorting": [ "desc", "asc" ], "aTargets": [ "_all" ] } , { "bSortable": false, "aTargets": [ 0 ] }], | ||
"aaSorting": [[ 1, "desc" ]] | "aaSorting": [[ 1, "desc" ]] | ||
}); | }); | ||
Line 33: | Line 34: | ||
var plots = []; | var plots = []; | ||
for (var i1=1; i1<$('#explist tr').length; i1++) { | for (var i1=1; i1<$('#explist tr').length; i1++) { | ||
plots.push([i1,$("#explist tr")[i1].cells[i2].innerHTML]); | //plots.push([i1,$("#explist tr")[i1].cells[i2].innerHTML]); | ||
plots[plots.length] = [i1,$("#explist tr")[i1].cells[i2].innerHTML]; | |||
} | } | ||
data.push({"label": $('.dataTables_scrollHeadInner tr')[0].cells[i2].innerText, "data": plots}); | //data.push({"label": $('.dataTables_scrollHeadInner tr')[0].cells[i2].innerText, "data": plots}); | ||
data[data.length] = {"label": $('.dataTables_scrollHeadInner tr')[0].cells[i2].innerText, "data": plots}; | |||
} | } | ||
Line 60: | Line 63: | ||
$('#explist_length').change(function() { drawchart(); } ); | $('#explist_length').change(function() { drawchart(); } ); | ||
// tooltip function start | // tooltip function start | ||
Line 87: | Line 89: | ||
var x = item.datapoint[0].toFixed(0), | var x = item.datapoint[0].toFixed(0), | ||
y = item.datapoint[1].toFixed(2); | y = item.datapoint[1].toFixed(2); | ||
//var smplname = $('#explist_wrapper .dataTables_scrollBody tbody tr')[item.dataIndex].cells[0].innerText; | |||
var smplname = oTable._('tr:eq(' + item.dataIndex + ')')[0][0]; | |||
} | var desc = "TPM: "+y; | ||
if(smplname){ | |||
desc = "Sample: " + smplname + "<br>" + desc; | |||
} | |||
showTooltip(item.pageX, item.pageY, desc); | |||
} | |||
} | } | ||
else { | else { | ||
Line 100: | Line 108: | ||
// clicking point function | // clicking point function | ||
$("#placeholder").bind("plotclick", function (event, pos, item) { | |||
if (item){ | |||
/ | var vdata = Math.round($('#explist').height())/item.series.data.length*item.dataIndex; | ||
//$('# | |||
$('#explist_wrapper .dataTables_scrollBody').animate({ scrollTop: vdata-150 }, 'slow'); | |||
//$('#test').text(vdata); | |||
$("#explist_wrapper .dataTables_scrollBody tbody td").removeClass('highlight'); | |||
$('#explist_wrapper .dataTables_scrollBody tbody tr:eq(' + item.dataIndex+ ') td').addClass('highlight'); | |||
} | |||
}); | |||
// clicking point function end | // clicking point function end | ||
//test | //test | ||
$('# | var t1 = oTable.fnSettings().aoColumns[1]; | ||
//$(' | $('#test2').text(t1.sTitle); | ||
//$('#test2').text("yes"); | |||
} ); | } ); | ||
</script> | </script> | ||
Line 132: | Line 144: | ||
<html> | <html> | ||
<div id="placeholder" style="width:100%;height:300px;"></div> | <div id="placeholder" style="width:100%;height:300px;"></div> | ||
<div id=" | <div id="test2"></div> | ||
</html> | </html> | ||
Latest revision as of 12:19, 27 July 2012
{{#exptable_hg19: 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.0787107813136792,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.344745680736619,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.289803085735052,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.130979075497713,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.17859945656816,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.116193942869518,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.114814448164607,0,0,0.451199612907412,0.308061348417659,0.784349769176855,0,0.633309773357254,0,0,0,0,0,0,1.27438136522519,2.49322802678617,0.895499018888713,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.211107635297664,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2.10998064528027,0.326465616318295,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.20990716048664,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.70762395791482,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8.14950798265875,0,0,0,0,0,0,0,0,0,1.02418136999391,0.576911008668165,1.28066733322951,0,0,0,0,0,0,0,0,0,0,0,0.472834243795189,0.786818822024972,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2.56630256826494,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.151230923763239,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.53744911152768,0,0,0,0,0,0,0,0,0,0.999936979274649,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.781514011233092,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.9555033757741,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.121917924982269,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.5290268405154,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }}
sample | TPM value |
---|