나는 JSL로 코드를 작성하려고 잠시 노력해 왔습니다. uni_bat의 값에 따라 다음과 같이 범례 위치를 관리합니다.
Graph builder( ...,<BR /><BR />//If statement...
//if(
//N items(uni_bat) == 1, Dispatch( {}, "400", LegendBox, {Legend Position( {9, [0,-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 10, [-1, -1, -1, -1]} )} ),
//N items(uni_bat) == 2, Dispatch( {}, "400", LegendBox, {Legend Position( {9, [0,1,-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 10, [-1, -1, -1, -1]} )} ),
//N items(uni_bat) == 3, Dispatch( {}, "400", LegendBox, {Legend Position( {9, [0,1,2,-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 10, [-1, -1, -1, -1]} )} ),
//N items(uni_bat) == 4, Dispatch( {}, "400", LegendBox, {Legend Position( {9, [0,1,2,3,-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 10, [-1, -1, -1, -1]} )} ),
//N items(uni_bat) == 5, Dispatch( {}, "400", LegendBox, {Legend Position( {9, [0,1,2,3,4,-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 10, [-1, -1, -1, -1]} )} ),
//N items(uni_bat) == 6, Dispatch( {}, "400", LegendBox, {Legend Position( {9, [0,1,2,3,4,5,-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 10, [-1, -1, -1, -1]} )} ),
//N items(uni_bat) == 7, Dispatch( {}, "400", LegendBox, {Legend Position( {9, [0,1,2,3,4,5,6,-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 10, [-1, -1, -1, -1]} )} ),
//N items(uni_bat) == 8, Dispatch( {}, "400", LegendBox, {Legend Position( {9, [0,1,2,3,4,5,6,7,-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 10, [-1, -1, -1, -1]} )} ),
//N items(uni_bat) == 9, Dispatch( {}, "400", LegendBox, {Legend Position( {9, [0,1,2,3,4,5,6,7,8,-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 10, [-1, -1, -1, -1]} )} ),
//N items(uni_bat) == 10, Dispatch( {}, "400", LegendBox, {Legend Position( {9, [0,1,2,3,4,5,6,7,8,9,-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 10, [-1, -1, -1, -1]} )} ),
//N items(uni_bat) == 11, Dispatch( {}, "400", LegendBox, {Legend Position( {9, [0,1,2,3,4,5,6,7,8,9,10,-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 10, [-1, -1, -1, -1]} )} ),
//N items(uni_bat) == 12, Dispatch( {}, "400", LegendBox, {Legend Position( {9, [0,1,2,3,4,5,6,7,8,9,10,11,-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 10, [-1, -1, -1, -1]} )} )
//);\
// case for uni_bat == 1
Dispatch( {}, "400", LegendBox, {Legend Position( {9,[0,-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 10, [-1, -1, -1, -1]} )} ),
Q1.
"case for uni_bat==1"과 같이 한 줄만 실행하면 문제 없이 그래프가 생성됩니다.
그러나 IF 문은 그래프 빌더에서 잘 인식되지 않습니다.
IF 문으로 범례 위치 다음에 오는 숫자 시퀀스를 올바르게 실행하는 방법???
(전. {9,[0,-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 10, [-1, -1, - 1, -1]} )
Q2.
만약에 Q1 For 루프를 사용하여 IF 문으로 작성된 코드를 더 단순화하는 방법이 있습니까?
for 문을 사용하여 uni_bat==50까지 Legend Position() 코드를 정기적으로 작성하는 방법.
어떤 제안이라도 대단히 감사하겠습니다. 