그래프 작성기에서 파이 차트를 작성하기 위해 JSL을 작성했습니다.

이 원형 차트 (전설 아래)에 "응답 : 14"라는 텍스트를 주석으로 추가하고 싶습니다. 예를 들면 다음과 같습니다.

JSL로 이것을 할 수있는 방법이 있습니까? 현재 스크립트가 파일로 첨부되어 있습니다.
필자는 원형 차트의 그림 형태가 최종 디스플레이에 어떻게 통합 될 수 있는지 보여주는 스크립트를 수정했습니다.
/* Scorecard with Annotated Pie */
ClearLog();
NamesDefaultToHere(1);
dt1 = NewTable( "Table1", AddRows(5),
NewColumn( "Channel", Character, Nominal,
SetValues({"Call","Email","Facebook","Twitter","Visit"}) ),
NewColumn( "Pct of Customers", Continuous, Format("Percent"),
SetValues({.1, .05, .4, .35, .08}) )
);
dt2 = NewTable( "Table2", AddRows(5),
NewColumn( "Team Member", Character, Nominal,
SetValues({"Sales Asst A","Sales Asst B","Sales Asst C","Sales Asst D","Sales Asst E"}) ),
NewColumn( "Rating", Character, Nominal,
SetValues({"Excellent","Very Good","Excellent","Excellent","Excellent"}) )
);
dt = New Table( "Responses",
AddRows( 4 ),
New Column( "Status", Character( 7 ), "Nominal", Set Values( {"Late", "N/A", "On Time", "Pending"} ) ),
New Column( "Count", Numeric, "Continuous", Format( "Fixed Dec", 12, 0 ), Set Values( [2, 0, 11, 1] ) )
);
gb = dt << GraphBuilder(invisible,
Size( 150, 180 ),
ShowControlPanel( 0 ),
Variables( X( :Status ), Y( :Name( "Count" ) ) ),
Elements( Pie( X, Y, Legend( 2 ), Label( "Label by Value" ) ) ),
SendToReport(
Dispatch({}, "400", ScaleBox, {LegendModel( 2,
Properties( 0, {FillColor({247, 150, 70})} ),
Properties( 1, {FillColor({200, 200, 200})} ),
Properties( 2, {FillColor({155, 187, 89})} ),
Properties( 3, {FillColor({192, 80, 77})} )
)}
),
Dispatch({}, "", GraphBuilderContainerBox, AddTextAnnotation(
Text("Responses 14"), TextBox({157, 102, 232, 135}), BackgroundColor("White")
)),
Dispatch( {}, "Graph Builder", OutlineBox, {SetTitle("Survey Responses")} ),
Dispatch( {}, "graph title", TextEditBox, {SetText("")} ),
Dispatch( {}, "X title", TextEditBox, {SetText("John Doe (pending)")} ),
Dispatch( {}, "Y title", TextEditBox, {SetText("")} ),
Dispatch( {}, "400", LegendBox, {SetTitle("")} )
)
);
thepicture = report(gb) << GetPicture;
win = NewWindow( "Customer Service Scorecard",
TextBox( "Customer Service Scorecard", <<SETFONTSIZE></SETFONTSIZE>고마워, 짐.
그래, TextBox가 실제로 GraphBuilder의 일부가 아니라 오히려 그 위에 배치 된 그림을 볼 수 있습니다. 스크립트를 성공적으로 실행하여 한 장의 그림이 포함 된 저널을 만들 수있었습니다.
사진이 2x2 스코어 카드의 일부라면 어떻게 될까요?
예 :
- 텍스트가있는 OutlineBox
- 막대 차트
- 그림 (주석이있는 원형 차트)
- 표가있는 OutlineBox
첨부 된 스크립트에서 나머지 사진과 스코어 카드를 결합하는 방법은 무엇입니까?
이 작업을 수행하기 위해 수행해야하는 모든 작업은 차트에 주석을 추가 한 다음 주석이있는 스크립트를 가져 오는 것입니다. 일단 당신이 그것을 가지면, 사소한 변화가 생기고 스크립트가 생깁니다. 주요 변경 사항은 주석이 저널로 전송되지 않지만 출력을 그림 구조로 복사 한 다음 해당 그림을 저널에 게시하면 원하는 결과를 얻을 수 있습니다.
Clear Log();
Names Default To Here( 1 );
dt = New Table( "Responses",
AddRows( 4 ),
New Column( "Status", Character( 7 ), "Nominal", Set Values( {"Late", "N/A", "On Time", "Pending"} ) ),
New Column( "Count", Numeric, "Continuous", Format( "Fixed Dec", 12, 0 ), Set Values( [2, 0, 11, 1] ) )
);
total = 14;
thetext = "Responses\!n" || char(total);
win = New Window( "Scorecard",
gb = dt << GraphBuilder(
Size( 150, 180 ),
ShowControlPanel( 0 ),
Variables( X( :Status ), Y( :Name( "Count" ) ) ),
Elements( Pie( X, Y, Legend( 2 ), Label( "Label by Value" ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
2,
Properties( 0, {Fill Color( {247, 150, 70} )} ), /* Late: orange */
Properties( 1, {Fill Color( {200, 200, 200} )} ), /* N/A: grey */
Properties( 2, {Fill Color( {155, 187, 89} )} ), /* On Time: green */
Properties( 3, {Fill Color( {192, 80, 77} )} ) /* Pending: red */
)}
),
Dispatch(
{},
"",
GraphBuilderContainerBox,
Add Text Annotation(
Text( theText ),
Text Box( {159, 94, 232, 133} ),
Background Color( "White" )
)
),
Dispatch( {}, "Graph Builder", OutlineBox, {SetTitle( "Survey Responses (Q3 2017)" )} ),
Dispatch( {}, "graph title", TextEditBox, {SetText( "" )} ),
Dispatch( {}, "X title", TextEditBox, {SetText( "John Doe (pending)" )} ),
Dispatch( {}, "Y title", TextEditBox, {SetText( "" )} ),
Dispatch( {}, "400", LegendBox, {SetTitle( "" )} )
)
)
);
thepicture=report(gb)<<GET picture=""></GET>