테이블 상자의 조건부 서식 열안녕하세요 - 테이블 상자에 있는 두 개의 데이터 열에 단일 조건부 서식 규칙을 적용하고 싶습니다. 데이터 테이블 내에서 원하는 작업을 쉽게 수행할 수 있지만 테이블 상자 내에서 동일한 효과를 생성하는 문제를 설명하는 Big Class 데이터 세트를 사용하는 예제를 아래에 설정했습니다. 조금 더 까다로워 보입니다.
테이블 상자의 열에 대한 조건부 형식을 만드는 메커니즘은 데이터 테이블에 필요한 것과 완전히 다르며 표시된 대로 내 기본 설정 내에서 규칙을 설정해야 합니다. 이 부분은 충분히 간단하지만 규칙이 직접 관련된 열이 아닌 다른 열에 해당 규칙을 적용하는 방법을 볼 수 없습니다. 할 수 있습니까?
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
// Color-code blue all pupils whose height is at least 60, with everybody else purple;
// First color every cell in both the name and height columns purple;
Column( dt, "name" ) << color cells( RGB Color( 255, 0, 255 ), Index( 1, N Row( dt ) ) );
Column( dt, "height" ) << color cells( RGB Color( 255, 0, 255 ), Index( 1, N Row( dt ) ) );
// Now find everybody whose height is at least 60, and color them blue;
CellsToPaint = dt << get rows where( :Height >= 60 );
Show( CellsToPaint );
// Color them all blue;
Column( dt, "name" ) << color cells( RGB Color( 100, 100, 255 ), CellsToPaint );
Column( dt, "height" ) << color cells( RGB Color( 100, 100, 255 ), CellsToPaint );
// Now I'll try to produce the same effect with those two columns in a table box;
// Create a copy of the Big Class data table in a table box;
My_TB = Table Box( <<SET shade="" alternate="" rows=""></SET>
Re: 테이블 상자의 조건부 서식 열Jim에게 감사드립니다. 정말 독창적입니다!
기록을 위해 이 문제를 해결하는 방법에 대한 귀하의 권장 사항을 포함하는 원본 스크립트의 수정된 버전 사본을 아래에 추가하고 있습니다. 다시 한 번 감사드립니다. 이것은 저에게 놀랍도록 유용할 것입니다.
Clear Log();
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
// Color-code blue all pupils whose height is at least 60, with everybody else purple;
// First color every cell in both the name and height columns purple;
Column( dt, "name" ) << color cells( RGB Color( 255, 0, 255 ), Index( 1, N Row( dt ) ) );
Column( dt, "height" ) << color cells( RGB Color( 255, 0, 255 ), Index( 1, N Row( dt ) ) );
// Now find everybody whose height is at least 60, and color them blue;
CellsToPaint = dt << get rows where( :Height >= 60 );
Show( CellsToPaint );
// Color them all blue;
Column( dt, "name" ) << color cells( RGB Color( 100, 100, 255 ), CellsToPaint );
Column( dt, "height" ) << color cells( RGB Color( 100, 100, 255 ), CellsToPaint );
// Now I'll produce the same effect with those two columns in a table box using Jim's suggestion;
// Export it to the journal as a data table, which converts it into a TableBox in the process;
dt << journal;
// Pull it back again as a TableBox, putting into a window with any other objects that I might want to incorporate;
nw = New Window( "My Window",
Lineup Box( N Col( 1 ),
Text Box( "Clever, huh?" ),
Border Box( Current Journal()[Table Box( 1 )], <<SIDES></SIDES>
Re: 테이블 상자의 조건부 서식 열조건부 서식 규칙을 생성할 솔루션이 없습니다. 그러나 컬러 데이터 테이블을 저널로 이동한 다음 해당 저널의 TableBox(1)를 내가 만들고 있는 응용 프로그램에 추가하여 원하는 작업을 수행했습니다.
