|++かも日記 | v002 test | Wassr jquery | jQuery › Downloads › Plugins › csv2table | › jQchart | | [English]

classifyByCol



This method is used in onload callback.
Syntax: $.csv2table.f.classifyByCol(id,colIndex,myCompAry,nolegend)
//id is DIV of tabel box.
//colIndex is target Col. (zero based index)
//myCompAry is [['>10','#eee'],['>30','#ddd'],['>50','#bbb']]
//nolegend is explanatory notes. true|false. default is false.
./data/classify.csv
NO,Name,Kinds,Age,Yen
1,AI,Monkey,10,"100,000"
2,Tama,Cat,5,"80,000"
3,Char,Dog,12,"5,000,000"
4,AA,Pig,3,"50,000"
5,Ii,Weasel,2,"50,000"
6,Gar,Goldfish,1,"5,000"
7,Mike,Tortoise,5,"20,000"
8,Pochi,Tiger,2,"10,000"
9,Tom,Lion,2,"2,000"
10,Mary,Dog,5,"80,000"
11,ToTo,Salmon,2,"60,000"
12,Ponta,Racoon,2,"60,000"



<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="content-script-type" content="text/javascript">
<meta http-equiv="content-style-type" content="text/css">

<script src="./js/jquery-.min.js" type="text/javascript"></script>
<script src="./js/jquery.-.js" type="text/javascript" charset="utf-8"></script>

<input
       class="btn1"
       type    =  "button"
       onclick="$('#classifyTest').csv2table('./data/classify.csv',{
                    onload : function(id,op,data,ary){ 
                       $.csv2table.f.classifyByCol(
                         id,3,[
                           ['>1','#D0FFE0'],
                           ['>3','#98D9FF'],
                           ['>5','#8CA9FF']
                         ]
                       )
                    }
                });"
       value="classifyByCol">

<div id="classifyTest"></div>



<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="content-script-type" content="text/javascript">
<meta http-equiv="content-style-type" content="text/css">

<script src="./js/jquery-.min.js" type="text/javascript"></script>
<script src="./js/jquery.-.js" type="text/javascript" charset="utf-8"></script>

<style>
#csv2table-legend-classifyTest2{
  font-size : 10px;
  width : 400px;
  padding : 8px;
}
</style> 
<input
       class="btn1"
       type    =  "button"
       onclick="$('#classifyTest2').csv2table('./data/classify.csv',{
                    onload : function(id,op,data,ary){ 
                       $.csv2table.f.classifyByCol(
                         id,3,[
                           ['>1','#D0FFE0'],
                           ['>3','#98D9FF'],
                           ['>5','#8CA9FF']
                         ]
                       );
                       $.csv2table.f.classifyByCol(
                         id,4,[
                           ['>=0','#FFFFA0'],
                           ['>=50000','#FFDF50'],
                           ['>=80000','#FFAD50'],
                           ['==5000000','#FF6C6C']
                         ]
                       )
                    }
                });"
       value="classifyByCol2">

<div id="classifyTest2"></div>

|++かも日記 | v002 test | jQuery › Downloads › Plugins › csv2table |