Update index.html
Browse files- index.html +23 -9
index.html
CHANGED
|
@@ -860,7 +860,14 @@ function srt(col){
|
|
| 860 |
applyHiddenCols();
|
| 861 |
}
|
| 862 |
|
| 863 |
-
// ==========
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 864 |
let currentFilter='all';
|
| 865 |
function flt(f,btn){
|
| 866 |
currentFilter=f;
|
|
@@ -952,11 +959,14 @@ window.addEventListener('load',()=>{initVertRank();});
|
|
| 952 |
// ========== VERTICAL RANKING CHART (always shown in tab1) ==========
|
| 953 |
function initVertRank(){
|
| 954 |
const sorted=[...D].map(r=>({n:r[0],s:compScore(r),c:pColors[r[1]]||'#6366f1',prov:r[1]}))
|
| 955 |
-
.
|
|
|
|
|
|
|
|
|
|
| 956 |
|
| 957 |
const canvas=document.getElementById('cVertRank');
|
| 958 |
if(!canvas)return;
|
| 959 |
-
const W=Math.max(sorted.length*
|
| 960 |
canvas.width=W; canvas.height=200;
|
| 961 |
const ctx=canvas.getContext('2d');
|
| 962 |
const PAD_L=40,PAD_R=20,PAD_T=16,PAD_B=60;
|
|
@@ -980,7 +990,9 @@ function initVertRank(){
|
|
| 980 |
|
| 981 |
sorted.forEach((d,i)=>{
|
| 982 |
const x=PAD_L+gap*(i+1)+barW*i;
|
| 983 |
-
const
|
|
|
|
|
|
|
| 984 |
const y=PAD_T+chartH-barH;
|
| 985 |
const rank=i+1;
|
| 986 |
// benchmark coverage count
|
|
@@ -990,16 +1002,16 @@ function initVertRank(){
|
|
| 990 |
|
| 991 |
// Bar gradient
|
| 992 |
const grad=ctx.createLinearGradient(0,y,0,PAD_T+chartH);
|
| 993 |
-
grad.addColorStop(0,d.c+'ff');
|
| 994 |
-
grad.addColorStop(1,d.c+'88');
|
| 995 |
ctx.fillStyle=grad;
|
| 996 |
ctx.beginPath();
|
| 997 |
ctx.roundRect(x,y,barW,barH,4);
|
| 998 |
ctx.fill();
|
| 999 |
|
| 1000 |
// Score label on top
|
| 1001 |
-
ctx.font='700 9px JetBrains Mono';ctx.fillStyle=d.c;ctx.textAlign='center';
|
| 1002 |
-
ctx.fillText(d.s,x+barW/2,y-12);
|
| 1003 |
// Coverage badge (n/10)
|
| 1004 |
ctx.font='500 7px JetBrains Mono';ctx.fillStyle='#94a3b8';ctx.textAlign='center';
|
| 1005 |
ctx.fillText(covCnt+'/10',x+barW/2,y-3);
|
|
@@ -1033,7 +1045,9 @@ function initVertRank(){
|
|
| 1033 |
const pColors={
|
| 1034 |
"OpenAI":"#10a37f","Anthropic":"#d97706","Google":"#4285f4",
|
| 1035 |
"xAI":"#1d9bf0","Alibaba":"#f97316","DeepSeek":"#6366f1",
|
| 1036 |
-
"Moonshot":"#8b5cf6","Zhipu AI":"#14b8a6","Meta":"#0081fb","Mistral":"#ff7043"
|
|
|
|
|
|
|
| 1037 |
};
|
| 1038 |
const gridC='rgba(15,23,42,.06)';
|
| 1039 |
const tickC='#94a3b8';
|
|
|
|
| 860 |
applyHiddenCols();
|
| 861 |
}
|
| 862 |
|
| 863 |
+
// ========== 기본 정렬: Composite Score 내림차순 ==========
|
| 864 |
+
(function defaultSort(){
|
| 865 |
+
sortDir=-1; lastCol=2;
|
| 866 |
+
const arr=[...D].sort((a,b)=>(compScore(b)||0)-(compScore(a)||0));
|
| 867 |
+
buildTable(arr);
|
| 868 |
+
const th=document.querySelectorAll('th');
|
| 869 |
+
if(th[2])th[2].classList.add('on');
|
| 870 |
+
})();
|
| 871 |
let currentFilter='all';
|
| 872 |
function flt(f,btn){
|
| 873 |
currentFilter=f;
|
|
|
|
| 959 |
// ========== VERTICAL RANKING CHART (always shown in tab1) ==========
|
| 960 |
function initVertRank(){
|
| 961 |
const sorted=[...D].map(r=>({n:r[0],s:compScore(r),c:pColors[r[1]]||'#6366f1',prov:r[1]}))
|
| 962 |
+
.sort((a,b)=>{
|
| 963 |
+
const sa=a.s??-1, sb=b.s??-1;
|
| 964 |
+
return sb-sa;
|
| 965 |
+
});
|
| 966 |
|
| 967 |
const canvas=document.getElementById('cVertRank');
|
| 968 |
if(!canvas)return;
|
| 969 |
+
const W=Math.max(sorted.length*52+60,1100);
|
| 970 |
canvas.width=W; canvas.height=200;
|
| 971 |
const ctx=canvas.getContext('2d');
|
| 972 |
const PAD_L=40,PAD_R=20,PAD_T=16,PAD_B=60;
|
|
|
|
| 990 |
|
| 991 |
sorted.forEach((d,i)=>{
|
| 992 |
const x=PAD_L+gap*(i+1)+barW*i;
|
| 993 |
+
const isNull=d.s===null||d.s===undefined;
|
| 994 |
+
const score=isNull?0:d.s;
|
| 995 |
+
const barH=isNull?5:Math.max((score-minS)/(maxS-minS)*chartH,5);
|
| 996 |
const y=PAD_T+chartH-barH;
|
| 997 |
const rank=i+1;
|
| 998 |
// benchmark coverage count
|
|
|
|
| 1002 |
|
| 1003 |
// Bar gradient
|
| 1004 |
const grad=ctx.createLinearGradient(0,y,0,PAD_T+chartH);
|
| 1005 |
+
grad.addColorStop(0,isNull?'#cbd5e1':d.c+'ff');
|
| 1006 |
+
grad.addColorStop(1,isNull?'#e2e8f0':d.c+'88');
|
| 1007 |
ctx.fillStyle=grad;
|
| 1008 |
ctx.beginPath();
|
| 1009 |
ctx.roundRect(x,y,barW,barH,4);
|
| 1010 |
ctx.fill();
|
| 1011 |
|
| 1012 |
// Score label on top
|
| 1013 |
+
ctx.font='700 9px JetBrains Mono';ctx.fillStyle=isNull?'#94a3b8':d.c;ctx.textAlign='center';
|
| 1014 |
+
ctx.fillText(isNull?'N/A':d.s,x+barW/2,y-12);
|
| 1015 |
// Coverage badge (n/10)
|
| 1016 |
ctx.font='500 7px JetBrains Mono';ctx.fillStyle='#94a3b8';ctx.textAlign='center';
|
| 1017 |
ctx.fillText(covCnt+'/10',x+barW/2,y-3);
|
|
|
|
| 1045 |
const pColors={
|
| 1046 |
"OpenAI":"#10a37f","Anthropic":"#d97706","Google":"#4285f4",
|
| 1047 |
"xAI":"#1d9bf0","Alibaba":"#f97316","DeepSeek":"#6366f1",
|
| 1048 |
+
"Moonshot":"#8b5cf6","Zhipu AI":"#14b8a6","Meta":"#0081fb","Mistral":"#ff7043",
|
| 1049 |
+
"Microsoft":"#00a4ef",
|
| 1050 |
+
"LG AI연구원":"#c9002b","SK텔레콤":"#e8002d","업스테이지":"#005baa","모티프테크놀로지스":"#2d6be4"
|
| 1051 |
};
|
| 1052 |
const gridC='rgba(15,23,42,.06)';
|
| 1053 |
const tickC='#94a3b8';
|