ClearLog(); NamesDefaultToHere(1); dt = NewTable("Responses", AddRows(4), NewColumn("Status", Character(7), "Nominal", Set Values({"Late", "N/A", "On Time", "Pending"}) ), NewColumn("Count", Numeric, "Continuous", Format("Fixed Dec", 12, 0), Set Values([2, 0, 11, 1]) ) ); total = 14; win = NewWindow("Scorecard", 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, {FillColor({247, 150, 70})}), /* Late: orange */ Properties(1, {FillColor({200, 200, 200})}), /* N/A: grey */ Properties(2, {FillColor({155, 187, 89})}), /* On Time: green */ Properties(3, {FillColor({192, 80, 77})}) /* Pending: red */ )} ), 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("")}) ) ) ); jrn = CurrentJournal(); jrn = win << Journal; CloseAll(Reports, NoSave); Close(dt, NoSave);