cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
%3CLINGO-SUB%20id%3D%22lingo-sub-783937%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3ERiviste%20interattive%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-783937%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CP%3ECiao%2C%3C%2FP%3E%0A%3CP%3ESto%20lavorando%20con%20JMP%20e%20ho%20bisogno%20di%20assistenza%20per%20creare%20un%20diario%20interattivo.%20Il%20mio%20obiettivo%20%C3%A8%20includere%20una%20funzionalit%C3%A0%20che%20consenta%20agli%20utenti%20di%20selezionare%20ed%20evidenziare%20batch%20specifici%20all'interno%20di%20un%20grafico.%20Ecco%20i%20dettagli%20dello%20script%20e%20cosa%20sto%20cercando%20di%20ottenere%3A%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(1)%3B%0A%0ACurrent%20Data%20Table(dt)%3B%0Adt%20%26lt%3B%26lt%3B%20New%20Column(%22Time%20Point%20Months%22%2C%20Formula(Round(%3ATime%20Point%20Days%20%2F%2030.438)%2C%202))%3B%0A%0A%2F%2F%20Loop%20for%20each%20parameter%0AFor(i%20%3D%201%2C%20i%20%26lt%3B%3D%20N%20Items(numPar)%2C%20i%2B%2B%2C%0A%09col1%20%3D%20Col%20Box(%22%22)%3B%0A%09col2%20%3D%20Col%20Box(%22%22)%3B%0A%09col3%20%3D%20Col%20Box(%22%22)%3B%0A%0A%2F%2F%20Create%20all%20batches%20plot%0A%09gb%20%3D%20Graph%20Builder(%0A%09%09invisible%2C%0A%09%09Size(500%2C%20500)%2C%0A%09%09Variables(X(%3ATime%20Point%20Months)%2C%20Y(%3AResult)%2C%20Overlay(%3ABatch))%2C%0A%09%09Elements(Points(X%2C%20Y))%0A%09)%3B%0A%09gb%20%26lt%3B%26lt%3B%20Local%20Data%20Filter(%0A%09%09Add%20Filter(%0A%09%09%09columns(%3AComponent%2C%20%3ABatch%2C%20%3ASource%20Table)%2C%0A%09%09%09Where(%3AComponent%20%3D%3D%20numPar%5Bi%5D)%2C%0A%09%09%09Where(%3ABatch%20%3D%3D%20%7Bcyc%2C%20bat%7D)%2C%0A%09%09%09Where(%3ASource%20Table%20%3D%3D%20dt_name)%0A%09%09)%0A%09)%3B%0A%09dt%20%26lt%3B%26lt%3B%20Clear%20Select()%3B%0A%0A%09gbb%20%3D%20Report(gb)%5BGraphBuilderBox(1)%5D%3B%0A%09gbb%20%26lt%3B%26lt%3B%20Add%20Element(1%2C%201%2C%20%7BType(%22Line%20Of%20Fit%22)%2C%20X%2C%20Y%2C%20Confidence%20of%20Fit(0)%2C%20Equation(0)%7D)%3B%0A%0A%2F%2F%20Set%20Y%20axis%0A%09minval%20%3D%20Min(%0A%09%09%3AResult%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%20%7C%20%3ABatch%20%3D%3D%20bat%0A%09%09%09%20%26amp%3B%20%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%0A%09%09)%5D%0A%09)%20*%200.95%3B%0A%09maxval%20%3D%20Max(%0A%09%09%3AResult%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%20%7C%20%3ABatch%20%3D%3D%20bat%0A%09%09%09%20%26amp%3B%20%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%0A%09%09)%5D%0A%09)%20*%201.05%3B%0A%09maxvalts%20%3D%20Max(%0A%09%09%3ATime%20Point%20Months%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%20%7C%20%3ABatch%20%3D%3D%20bat%0A%09%09%09%20%26amp%3B%20%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%0A%09%09)%5D%0A%09)%20*%201.05%3B%0A%0A%09gbb%5BAxisBox(1)%5D%20%26lt%3B%26lt%3B%20Min(-0.1)%3B%0A%09gbb%5BAxisBox(1)%5D%20%26lt%3B%26lt%3B%20Max(maxvalts)%3B%0A%09gbb%5BAxisBox(2)%5D%20%26lt%3B%26lt%3B%20Min(minval)%3B%0A%09gbb%5BAxisBox(2)%5D%20%26lt%3B%26lt%3B%20Max(maxval)%3B%0A%09gbb%5BAxisBox(2)%5D%20%26lt%3B%26lt%3B%20inc((maxval%20-%20minval)%20%2F%2010)%3B%0A%0A%2F%2F%20Set%20Y%20axis%20label%0A%09unitList%20%3D%20Associative%20Array(%0A%09%09%3AResult%20Unit%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%20%7C%20%3ABatch%20%3D%3D%20bat%0A%09%09%09%20%26amp%3B%20%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%0A%09%09)%5D%0A%09)%20%26lt%3B%26lt%3B%20Remove(%22%22)%20%26lt%3B%26lt%3B%20Get%20Keys%3B%0A%09If(N%20Items(unitList)%20%3D%3D%201%2C%0A%09%09gbb%5BText%20Edit%20Box(4)%5D%20%26lt%3B%26lt%3B%20Set%20text(numPar%5Bi%5D%20%7C%7C%20%22%20%5B%22%20%7C%7C%20unitList%5B1%5D%20%7C%7C%20%22%5D%22)%0A%09)%3B%0A%09If(N%20Items(unitList)%20!%3D%201%2C%0A%09%09gbb%5BText%20Edit%20Box(4)%5D%20%26lt%3B%26lt%3B%20Set%20text(numPar%5Bi%5D)%0A%09)%3B%0A%0A%2F%2F%20Set%20graph%20title%0A%09gbb%5BText%20Edit%20Box(1)%5D%20%26lt%3B%26lt%3B%20Set%20text(numPar%5Bi%5D%20%7C%7C%20%22%20vs.%20Time%20Point%20%22)%3B%0A%09gbba%20%3D%20Report(gb)%3B%0A%09col1%20%26lt%3B%26lt%3B%20Append(gbba)%3B%0A%09gb%20%26lt%3B%26lt%3B%20close%20window%3B%0A%0A%09For(k%20%3D%201%2C%20k%20%26lt%3B%3D%20N%20Items(cyc)%2C%20k%2B%2B%2C%0A%09%09check%20%3D%20dt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%5Bk%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%20%7C%20%3ABatch%20%3D%3D%0A%09%09%09bat%5Bk%5D%20%26amp%3B%20%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%0A%09%09)%3B%0A%09%09If(N%20Items(check)%20%26gt%3B%200%2C%0A%09%09%09gb%20%3D%20Graph%20Builder(%0A%09%09%09%09invisible%2C%0A%09%09%09%09Size(500%2C%20500)%2C%0A%09%09%09%09Variables(X(%3ATime%20Point%20Months)%2C%20Y(%3AResult)%2C%20Overlay(%3ABatch))%2C%0A%09%09%09%09Elements(Points(X%2C%20Y))%0A%09%09%09)%3B%0A%09%09%09gb%20%26lt%3B%26lt%3B%20Local%20Data%20Filter(%0A%09%09%09%09Add%20Filter(%0A%09%09%09%09%09columns(%3AComponent%2C%20%3ABatch%2C%20%3ASource%20Table)%2C%0A%09%09%09%09%09Where(%3AComponent%20%3D%3D%20numPar%5Bi%5D)%2C%0A%09%09%09%09%09Where(%3ABatch%20%3D%3D%20%7Bcyc%5Bk%5D%2C%20bat%5Bk%5D%7D)%2C%0A%09%09%09%09%09Where(%3ASource%20Table%20%3D%3D%20dt_name)%0A%09%09%09%09)%0A%09%09%09)%3B%0A%09%09%09dt%20%26lt%3B%26lt%3B%20Clear%20Select()%3B%0A%0A%09%09%09gbb%20%3D%20Report(gb)%5BGraphBuilderBox(1)%5D%3B%0A%09%09%09gbb%20%26lt%3B%26lt%3B%20Add%20Element(%0A%09%09%09%091%2C%0A%09%09%09%091%2C%0A%09%09%09%09%7BType(%22Line%20Of%20Fit%22)%2C%20X%2C%20Y%2C%20Confidence%20of%20Fit(0)%2C%20Equation(0)%7D%0A%09%09%09)%3B%0A%0A%09%09%09minval%20%3D%20Min(%0A%09%09%09%09%3AResult%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%5Bk%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%20%7C%0A%09%09%09%09%09%3ABatch%20%3D%3D%20bat%5Bk%5D%20%26amp%3B%20%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%0A%09%09%09%09)%5D%0A%09%09%09)%20*%200.95%3B%0A%09%09%09maxval%20%3D%20Max(%0A%09%09%09%09%3AResult%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%5Bk%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%20%7C%0A%09%09%09%09%09%3ABatch%20%3D%3D%20bat%5Bk%5D%20%26amp%3B%20%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%0A%09%09%09%09)%5D%0A%09%09%09)%20*%201.05%3B%0A%09%09%09maxvalts%20%3D%20Max(%0A%09%09%09%09%3ATime%20Point%20Months%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%5Bk%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%20%7C%0A%09%09%09%09%09%3ABatch%20%3D%3D%20bat%5Bk%5D%20%26amp%3B%20%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%0A%09%09%09%09)%5D%0A%09%09%09)%20*%201.05%3B%0A%0A%09%09%09gbb%5BAxisBox(1)%5D%20%26lt%3B%26lt%3B%20Min(-0.1)%3B%0A%09%09%09gbb%5BAxisBox(1)%5D%20%26lt%3B%26lt%3B%20Max(maxvalts)%3B%0A%09%09%09gbb%5BAxisBox(2)%5D%20%26lt%3B%26lt%3B%20Min(minval)%3B%0A%09%09%09gbb%5BAxisBox(2)%5D%20%26lt%3B%26lt%3B%20Max(maxval)%3B%0A%09%09%09gbb%5BAxisBox(2)%5D%20%26lt%3B%26lt%3B%20inc((maxval%20-%20minval)%20%2F%2010)%3B%0A%0A%09%09%09unitList%20%3D%20Associative%20Array(%0A%09%09%09%09%3AResult%20Unit%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%5Bk%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%20%7C%0A%09%09%09%09%09%3ABatch%20%3D%3D%20bat%5Bk%5D%20%26amp%3B%20%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt_name%0A%09%09%09%09)%5D%0A%09%09%09)%20%26lt%3B%26lt%3B%20Remove(%22%22)%20%26lt%3B%26lt%3B%20Get%20Keys%3B%0A%09%09%09If(N%20Items(unitList)%20%3D%3D%201%2C%0A%09%09%09%09gbb%5BText%20Edit%20Box(4)%5D%20%26lt%3B%26lt%3B%20Set%20text(numPar%5Bi%5D%20%7C%7C%20%22%20%5B%22%20%7C%7C%20unitList%5B1%5D%20%7C%7C%20%22%5D%22)%0A%09%09%09)%3B%0A%09%09%09If(N%20Items(unitList)%20!%3D%201%2C%0A%09%09%09%09gbb%5BText%20Edit%20Box(4)%5D%20%26lt%3B%26lt%3B%20Set%20text(numPar%5Bi%5D)%0A%09%09%09)%3B%0A%0A%09%09%09gbb%5BText%20Edit%20Box(1)%5D%20%26lt%3B%26lt%3B%20Set%20text(numPar%5Bi%5D%20%7C%7C%20%22%20vs.%20Time%20Point%20%22)%3B%0A%09%09%09gbba%20%3D%20Report(gb)%3B%0A%09%09%09col2%20%26lt%3B%26lt%3B%20Append(gbba)%3B%0A%09%09%09gb%20%26lt%3B%26lt%3B%20close%20window%3B%0A%0A%09%09%09gb2%20%3D%20Graph%20Builder(%0A%09%09%09%09invisible%2C%0A%09%09%09%09Size(500%2C%20500)%2C%0A%09%09%09%09Variables(X(%3ATime%20Point%20Months)%2C%20Y(%3ADifference)%2C%20Color(%3ABatch))%2C%0A%09%09%09%09Elements(Points(X%2C%20Y))%0A%09%09%09)%3B%0A%09%09%09gb2%20%26lt%3B%26lt%3B%20Local%20Data%20Filter(%0A%09%09%09%09Add%20Filter(%0A%09%09%09%09%09columns(%3AComponent%2C%20%3ABatch%2C%20%3ASource%20Table)%2C%0A%09%09%09%09%09Where(%3AComponent%20%3D%3D%20numPar%5Bi%5D)%2C%0A%09%09%09%09%09Where(%3ABatch%20%3D%3D%20cyc%5Bk%5D)%2C%0A%09%09%09%09%09Where(%3ASource%20Table%20%3D%3D%20dt5_name)%0A%09%09%09%09)%0A%09%09%09)%3B%0A%09%09%09dt4%20%26lt%3B%26lt%3B%20Clear%20Select()%3B%0A%0A%09%09%09gbb2%20%3D%20Report(gb2)%5BGraphBuilderBox(1)%5D%3B%0A%09%09%09gbb2%20%26lt%3B%26lt%3B%20Add%20Element(1%2C%201%2C%20%7BType(%22Line%22)%2C%20X%2C%20Y%7D)%3B%0A%0A%09%09%09l_idx%20%3D%20dt4%20%26lt%3B%26lt%3B%20Get%20rows%20where(dt4%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%5Bk%5D)%3B%0A%09%09%09ul%20%3D%20Min(dt4%3AHC%5Bl_idx%5D)%3B%0A%0A%09%09%09If(Is%20Missing(ul)%2C%0A%09%09%09%09If(%0A%09%09%09%09%09Min(%0A%09%09%09%09%09%09%3ADifference%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%09%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%5Bk%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%0A%09%09%09%09%09%09%09dt5_name%0A%09%09%09%09%09%09)%5D%0A%09%09%09%09%09)%20%3D%3D%200%2C%0A%09%09%09%09%09minval%20%3D%20-5%3B%0A%09%09%09%09%09maxval%20%3D%205%3B%0A%09%09%09%09%2C%0A%09%09%09%09%09minval%20%3D%20Min(%0A%09%09%09%09%09%09%3ADifference%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%09%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%5Bk%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%0A%09%09%09%09%09%09%09dt5_name%0A%09%09%09%09%09%09)%5D%0A%09%09%09%09%09)%20*%200.95%3B%0A%09%09%09%09%09maxval%20%3D%20Max(%0A%09%09%09%09%09%09%3ADifference%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%09%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%5Bk%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%0A%09%09%09%09%09%09%09dt5_name%0A%09%09%09%09%09%09)%5D%0A%09%09%09%09%09)%20*%201.05%3B%0A%09%09%09%09)%0A%09%09%09%2C%0A%09%09%09%09minval%20%3D%20Min(%0A%09%09%09%09%09%3ADifference%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%5Bk%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt5_name%0A%09%09%09%09%09)%5D%2C%0A%09%09%09%09%09-ul%0A%09%09%09%09)%20*%201.05%3B%0A%09%09%09%09maxval%20%3D%20Max(%0A%09%09%09%09%09%3ADifference%5Bdt%20%26lt%3B%26lt%3B%20get%20rows%20where(%0A%09%09%09%09%09%09%3AComponent%20%3D%3D%20numPar%5Bi%5D%20%26amp%3B%20%3ABatch%20%3D%3D%20cyc%5Bk%5D%20%26amp%3B%20%3ASource%20Table%20%3D%3D%20dt5_name%0A%09%09%09%09%09)%5D%2C%0A%09%09%09%09%09ul%0A%09%09%09%09)%20*%201.05%3B%0A%09%09%09)%3B%0A%0A%09%09%09If(!Is%20Missing(ul)%2C%0A%09%09%09%09gbb2%5BAxisBox(2)%5D%20%26lt%3B%26lt%3B%20Add%20Ref%20Line(ul%2C%20%22solid%22%2C%20%22black%22%2C%20Char(Round(ul%2C%202)))%3B%0A%09%09%09%09gbb2%5BAxisBox(2)%5D%20%26lt%3B%26lt%3B%20Add%20Ref%20Line(-ul%2C%20%22solid%22%2C%20%22black%22%2C%20Char(Round(-ul%2C%202)))%3B%0A%09%09%09)%3B%0A%0A%09%09%09gbb2%5BAxisBox(2)%5D%20%26lt%3B%26lt%3B%20Add%20Ref%20Line(0%2C%20%22Dashed%22)%3B%0A%09%09%09gbb2%5BAxisBox(2)%5D%20%26lt%3B%26lt%3B%20Min(minval)%3B%0A%09%09%09gbb2%5BAxisBox(2)%5D%20%26lt%3B%26lt%3B%20Max(maxval)%3B%0A%09%09%09gbb2%5BAxisBox(2)%5D%20%26lt%3B%26lt%3B%20inc((maxval%20-%20minval)%20%2F%2010)%3B%0A%0A%09%09%09gbba2%20%3D%20Report(gb2)%3B%0A%09%09%09col3%20%26lt%3B%26lt%3B%20Append(gbba2)%3B%0A%09%09%09gb2%20%26lt%3B%26lt%3B%20close%20window%3B%0A%09%09)%3B%0A%09)%3B%0A%0A%09results%20%26lt%3B%26lt%3B%20append(ob%20%3D%20Outline%20Box(numPar%5Bi%5D%2C%20V%20List%20Box(col1%2C%20H%20List%20Box(col2%2C%20col3))))%3B%0A%09ob%20%26lt%3B%26lt%3B%20close%3B%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EModifica%20(jthi%202024-08-26)%3A%20aggiunta%20formattazione%20JSL%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%3CSTRONG%3EMenu%20a%20discesa%20interattivo%3C%2FSTRONG%3E%3A%20I%20want%20to%20create%20a%20dropdown%20menu%20that%20lists%20the%20unique%20batch%20values%20(%3CCODE%3E%3ABatch%3C%2FCODE%3E%3CSPAN%3E%20%3C%2FSPAN%3Ecolumn)%20in%20my%20data%20table.%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3EFunzionalit%C3%A0%20di%20evidenziazione%3C%2FSTRONG%3E%20%3A%20quando%20un%20utente%20seleziona%20un%20batch%20dal%20menu%20a%20discesa%2C%20i%20punti%20corrispondenti%20nel%20grafico%20dovrebbero%20essere%20evidenziati.%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3EIncorporamento%20in%20un%20diario%3C%2FSTRONG%3E%20%3A%20il%20menu%20a%20discesa%20e%20il%20grafico%20devono%20essere%20incorporati%20in%20un%20diario%20che%20pu%C3%B2%20essere%20salvato%20e%20condiviso.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLI%3E%0A%3C%2FOL%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-783937%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CLINGO-LABEL%3EAutomazione%20e%20scripting%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAnalisi%20e%20modellazione%20dei%20dati%20di%20base%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EEsplorazione%20e%20visualizzazione%20dei%20dati%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-784212%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Riviste%20interattive%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-784212%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EAlcune%20parti%20di%20questa%20sceneggiatura%20hanno%20funzionato%20in%20qualche%20punto%3F%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-785206%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Riviste%20interattive%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-785206%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ES%C3%AC%2C%20lo%20script%20funziona%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Acara_con_una_leve_sonrisa%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar

Interactive journals

Hello,

I am working with JMP and need assistance with creating an interactive journal. My goal is to include a feature that allows users to select and highlight specific batches within a graph. Here are the details of the script and what I am trying to achieve:

 

 

Names Default To Here(1);

Current Data Table(dt);
dt << New Column("Time Point Months", Formula(Round(:Time Point Days / 30.438), 2));

// Loop for each parameter
For(i = 1, i <= N Items(numPar), i++,
	col1 = Col Box("");
	col2 = Col Box("");
	col3 = Col Box("");

// Create all batches plot
	gb = Graph Builder(
		invisible,
		Size(500, 500),
		Variables(X(:Time Point Months), Y(:Result), Overlay(:Batch)),
		Elements(Points(X, Y))
	);
	gb << Local Data Filter(
		Add Filter(
			columns(:Component, :Batch, :Source Table),
			Where(:Component == numPar[i]),
			Where(:Batch == {cyc, bat}),
			Where(:Source Table == dt_name)
		)
	);
	dt << Clear Select();

	gbb = Report(gb)[GraphBuilderBox(1)];
	gbb << Add Element(1, 1, {Type("Line Of Fit"), X, Y, Confidence of Fit(0), Equation(0)});

// Set Y axis
	minval = Min(
		:Result[dt << get rows where(
			:Component == numPar[i] & :Batch == cyc & :Source Table == dt_name | :Batch == bat
			 & :Component == numPar[i] & :Source Table == dt_name
		)]
	) * 0.95;
	maxval = Max(
		:Result[dt << get rows where(
			:Component == numPar[i] & :Batch == cyc & :Source Table == dt_name | :Batch == bat
			 & :Component == numPar[i] & :Source Table == dt_name
		)]
	) * 1.05;
	maxvalts = Max(
		:Time Point Months[dt << get rows where(
			:Component == numPar[i] & :Batch == cyc & :Source Table == dt_name | :Batch == bat
			 & :Component == numPar[i] & :Source Table == dt_name
		)]
	) * 1.05;

	gbb[AxisBox(1)] << Min(-0.1);
	gbb[AxisBox(1)] << Max(maxvalts);
	gbb[AxisBox(2)] << Min(minval);
	gbb[AxisBox(2)] << Max(maxval);
	gbb[AxisBox(2)] << inc((maxval - minval) / 10);

// Set Y axis label
	unitList = Associative Array(
		:Result Unit[dt << get rows where(
			:Component == numPar[i] & :Batch == cyc & :Source Table == dt_name | :Batch == bat
			 & :Component == numPar[i] & :Source Table == dt_name
		)]
	) << Remove("") << Get Keys;
	If(N Items(unitList) == 1,
		gbb[Text Edit Box(4)] << Set text(numPar[i] || " [" || unitList[1] || "]")
	);
	If(N Items(unitList) != 1,
		gbb[Text Edit Box(4)] << Set text(numPar[i])
	);

// Set graph title
	gbb[Text Edit Box(1)] << Set text(numPar[i] || " vs. Time Point ");
	gbba = Report(gb);
	col1 << Append(gbba);
	gb << close window;

	For(k = 1, k <= N Items(cyc), k++,
		check = dt << get rows where(
			:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt_name | :Batch ==
			bat[k] & :Component == numPar[i] & :Source Table == dt_name
		);
		If(N Items(check) > 0,
			gb = Graph Builder(
				invisible,
				Size(500, 500),
				Variables(X(:Time Point Months), Y(:Result), Overlay(:Batch)),
				Elements(Points(X, Y))
			);
			gb << Local Data Filter(
				Add Filter(
					columns(:Component, :Batch, :Source Table),
					Where(:Component == numPar[i]),
					Where(:Batch == {cyc[k], bat[k]}),
					Where(:Source Table == dt_name)
				)
			);
			dt << Clear Select();

			gbb = Report(gb)[GraphBuilderBox(1)];
			gbb << Add Element(
				1,
				1,
				{Type("Line Of Fit"), X, Y, Confidence of Fit(0), Equation(0)}
			);

			minval = Min(
				:Result[dt << get rows where(
					:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt_name |
					:Batch == bat[k] & :Component == numPar[i] & :Source Table == dt_name
				)]
			) * 0.95;
			maxval = Max(
				:Result[dt << get rows where(
					:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt_name |
					:Batch == bat[k] & :Component == numPar[i] & :Source Table == dt_name
				)]
			) * 1.05;
			maxvalts = Max(
				:Time Point Months[dt << get rows where(
					:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt_name |
					:Batch == bat[k] & :Component == numPar[i] & :Source Table == dt_name
				)]
			) * 1.05;

			gbb[AxisBox(1)] << Min(-0.1);
			gbb[AxisBox(1)] << Max(maxvalts);
			gbb[AxisBox(2)] << Min(minval);
			gbb[AxisBox(2)] << Max(maxval);
			gbb[AxisBox(2)] << inc((maxval - minval) / 10);

			unitList = Associative Array(
				:Result Unit[dt << get rows where(
					:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt_name |
					:Batch == bat[k] & :Component == numPar[i] & :Source Table == dt_name
				)]
			) << Remove("") << Get Keys;
			If(N Items(unitList) == 1,
				gbb[Text Edit Box(4)] << Set text(numPar[i] || " [" || unitList[1] || "]")
			);
			If(N Items(unitList) != 1,
				gbb[Text Edit Box(4)] << Set text(numPar[i])
			);

			gbb[Text Edit Box(1)] << Set text(numPar[i] || " vs. Time Point ");
			gbba = Report(gb);
			col2 << Append(gbba);
			gb << close window;

			gb2 = Graph Builder(
				invisible,
				Size(500, 500),
				Variables(X(:Time Point Months), Y(:Difference), Color(:Batch)),
				Elements(Points(X, Y))
			);
			gb2 << Local Data Filter(
				Add Filter(
					columns(:Component, :Batch, :Source Table),
					Where(:Component == numPar[i]),
					Where(:Batch == cyc[k]),
					Where(:Source Table == dt5_name)
				)
			);
			dt4 << Clear Select();

			gbb2 = Report(gb2)[GraphBuilderBox(1)];
			gbb2 << Add Element(1, 1, {Type("Line"), X, Y});

			l_idx = dt4 << Get rows where(dt4:Component == numPar[i] & :Batch == cyc[k]);
			ul = Min(dt4:HC[l_idx]);

			If(Is Missing(ul),
				If(
					Min(
						:Difference[dt << get rows where(
							:Component == numPar[i] & :Batch == cyc[k] & :Source Table ==
							dt5_name
						)]
					) == 0,
					minval = -5;
					maxval = 5;
				,
					minval = Min(
						:Difference[dt << get rows where(
							:Component == numPar[i] & :Batch == cyc[k] & :Source Table ==
							dt5_name
						)]
					) * 0.95;
					maxval = Max(
						:Difference[dt << get rows where(
							:Component == numPar[i] & :Batch == cyc[k] & :Source Table ==
							dt5_name
						)]
					) * 1.05;
				)
			,
				minval = Min(
					:Difference[dt << get rows where(
						:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt5_name
					)],
					-ul
				) * 1.05;
				maxval = Max(
					:Difference[dt << get rows where(
						:Component == numPar[i] & :Batch == cyc[k] & :Source Table == dt5_name
					)],
					ul
				) * 1.05;
			);

			If(!Is Missing(ul),
				gbb2[AxisBox(2)] << Add Ref Line(ul, "solid", "black", Char(Round(ul, 2)));
				gbb2[AxisBox(2)] << Add Ref Line(-ul, "solid", "black", Char(Round(-ul, 2)));
			);

			gbb2[AxisBox(2)] << Add Ref Line(0, "Dashed");
			gbb2[AxisBox(2)] << Min(minval);
			gbb2[AxisBox(2)] << Max(maxval);
			gbb2[AxisBox(2)] << inc((maxval - minval) / 10);

			gbba2 = Report(gb2);
			col3 << Append(gbba2);
			gb2 << close window;
		);
	);

	results << append(ob = Outline Box(numPar[i], V List Box(col1, H List Box(col2, col3))));
	ob << close;
);

Edit (jthi 2024-08-26): Added JSL formatting



  1. Interactive Dropdown Menu: I want to create a dropdown menu that lists the unique batch values (:Batch column) in my data table.
  2. Highlighting Functionality: When a user selects a batch from the dropdown menu, the corresponding points in the graph should be highlighted.
  3. Embedding in a Journal: The dropdown menu and the graph should be embedded in a journal that can be saved and shared.


2 REPLIES 2
Byron_JMP
Staff

Re: Interactive journals

Did parts of this script work at some point?

 

JMP Systems Engineer, Health and Life Sciences (Pharma)

Re: Interactive journals

Yes the script works