cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
%3CLINGO-SUB%20id%3D%22lingo-sub-209809%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ECostruttore%20di%20grafici%3A%20nascondi%20X%20categorie%20senza%20dati%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-209809%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ECiao%20a%20tutti%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHo%20una%20tabella%20con%20una%20colonna%20di%20raggruppamento%20e%20diverse%20variabili%20di%20risposta.%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENew%20Table(%20%22Test%22%2C%0A%20Add%20Rows(%207%20)%2C%0A%20New%20Column(%20%22GROUP%22%2C%0A%20%20Character%2C%0A%20%20%22Nominal%22%2C%0A%20%20Set%20Values(%20%7B%22a%22%2C%20%22b%22%2C%20%22c%22%2C%20%22d%22%2C%20%22e%22%2C%20%22f%22%2C%20%22g%22%7D%20)%0A%20)%2C%0A%20New%20Column(%20%22Y%22%2C%0A%20%20Numeric%2C%0A%20%20%22Continuous%22%2C%0A%20%20Format(%20%22Best%22%2C%2012%20)%2C%0A%20%20Set%20Values(%20%5B7%2C%20.%2C%206%2C%20.%2C%204%2C%20.%2C%202%5D%20)%0A%20)%2C%0A%20New%20Column(%20%22Y%202%22%2C%0A%20%20Numeric%2C%0A%20%20%22Continuous%22%2C%0A%20%20Format(%20%22Best%22%2C%2012%20)%2C%0A%20%20Set%20Values(%20%5B7%2C%206%2C%202%2C%203%2C%20.%2C%20.%2C%20.%5D%20)%2C%0A%20%20Set%20Display%20Width(%2049%20)%0A%20)%0A)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EVorrei%20creare%20un%20grafico%20a%20barre%20con%20un%20commutatore%20di%20colonne.%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EGraph%20Builder(%0A%20Size(%20527%2C%20448%20)%2C%0A%20Show%20Control%20Panel(%200%20)%2C%0A%20Variables(%0A%20%20X(%20%3AGROUP%2C%20Order%20By(%20%3AY%2C%20Ascending%2C%20Order%20Statistic(%20%22Mean%22%20)%20)%20)%2C%0A%20%20Y(%20%3AY%20)%0A%20)%2C%0A%20Elements(%20Bar(%20X%2C%20Y%2C%20Legend(%204%20)%20)%20)%2C%0A%20Column%20Switcher(%20%3AY%2C%20%7B%3AY%2C%20%3AY%202%7D%20)%0A)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EIl%20mio%20problema%20%C3%A8%20che%20non%20voglio%20visualizzare%20i%20livelli%20senza%20dati.%20In%20altre%20parole%2C%20non%20voglio%20vedere%20i%20livelli%20%22b%22%2C%20%22d%22%20e%20%22f%22%20per%20Y%20e%20i%20livelli%20%22e%22%2C%20%22f%22%2C%20%22g%22%20per%20Y2.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Image1.png%22%20style%3D%22width%3A%20766px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Image1.png%22%20style%3D%22width%3A%20766px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Image1.png%22%20style%3D%22width%3A%20766px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F17362i8BA7CA5F300E175C%2Fimage-dimensions%2F766x486%3Fv%3Dv2%22%20width%3D%22766%22%20height%3D%22486%22%20role%3D%22button%22%20title%3D%22Image1.png%22%20alt%3D%22Image1.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHo%20provato%20a%20utilizzare%20una%20clausola%20%22dove%22%20ma%20sfortunatamente%20non%20viene%20presa%20in%20considerazione%20dal%20commutatore%20di%20colonne.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHai%20qualche%20idea%20di%20come%20potremmo%20farlo%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGrazie%20in%20anticipo!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-212611%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20Costruttore%20di%20grafici%3A%20nascondi%20X%20categorie%20senza%20dati%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-212611%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ECIAO%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F6884%22%20target%3D%22_blank%22%3E%20%40geoffrey_mann%3C%2FA%3E%20%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGrazie%20per%20il%20tuo%20coinvolgimento%20e%20per%20le%20informazioni%20aggiuntive.%3C%2FP%3E%3CP%3EInizier%C3%B2%20a%20pubblicizzare%20la%20funzionalit%C3%A0%20ai%20miei%20colleghi%20per%20ottenere%20voti!%20%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%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPer%20quanto%20riguarda%20lo%20script%2C%20preferisco%20non%20influenzare%20la%20tabella%20corrente%2C%20quindi%20penso%20che%20il%20filtro%20dati%20locale%20sia%20una%20buona%20opzione!%20Esplorer%C3%B2%20questa%20possibilit%C3%A0%20pi%C3%B9%20in%20profondit%C3%A0.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-212410%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20Costruttore%20di%20grafici%3A%20nascondi%20X%20categorie%20senza%20dati%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-212410%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ECIAO%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F750%22%20target%3D%22_blank%22%3E%20%40anne_sa%3C%2FA%3E%3C%2FP%3E%0A%3CP%3ESono%20cos%C3%AC%20felice%20che%20questo%20abbia%20aiutato.%20%C3%88%20qualcosa%20che%20volevo%20fare%20da%20un%20po'%20e%20tu%20mi%20hai%20dato%20la%20motivazione.%20%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%0A%3CP%3EInoltre%2C%20sono%20d'accordo%20con%20te%20e%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F2610%22%20target%3D%22_blank%22%3E%20%40vince_faller%3C%2FA%3E%20che%20un%20ascoltatore%20o%20un%20modo%20per%20personalizzare%20il%20comportamento%20attorno%20al%20commutatore%20di%20colonna%20sarebbe%20generalmente%20utile%20a%20coloro%20che%20programmano%20i%20propri%20componenti%20aggiuntivi%20o%20modificano%20il%20comportamento.%20Lo%20facciamo%20continuamente%20in%20JMP%20Clinical%20e%20JMP%20Genomics%2C%20motivo%20per%20cui%20ne%20ho%20dato%20credito%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F5937%22%20target%3D%22_blank%22%3E%20%40kelci_miclaus%3C%2FA%3E%20E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F4867%22%20target%3D%22_blank%22%3E%20%40drewfoglia%3C%2FA%3E%20per%20il%20codice%20che%20ho%20preso%20in%20prestito.%3C%2FP%3E%0A%3CP%3ESe%20solo%20conoscessimo%20un%20product%20manager%20JMP%20che%20potrebbe%20aiutarci%20a%20realizzare%20tutto%20ci%C3%B2.%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Acara_con_una_leve_sonrisa%3A%22%3E%3C%2FLI-EMOJI%3E%20Per%20favore%20votate%20entrambi%20per%20la%20funzione%20e%20aiuter%C3%A0%20con%20la%20giustificazione.%3C%2FP%3E%0A%3CP%3EPer%20quanto%20riguarda%20le%20modifiche%20finali%2C%20dovresti%20avere%20il%20controllo%20nel%20codice%20wrapper%20che%20hai%20scritto.%20Le%20chiamate%20API%20hanno%20semplicemente%20lo%20scopo%20di%20sostituire%20le%20variabili%20X%20e%20Y.%20Continuer%C3%B2%20ad%20aggiungere%20a%20queste%20funzioni%20per%20aiutare%20i%20programmatori%20a%20semplificare%20il%20confezionamento%20di%20GraphBuilder%20in%20modo%20che%20possano%20creare%20componenti%20aggiuntivi%20pi%C3%B9%20velocemente.%20Quello%20che%20sto%20cercando%20di%20dire%20qui%20%C3%A8%20solo%20aggiungere%20funzioni%20per%20aggiornare%20GraphBuilder%20nel%20file%20API%20in%20modo%20che%20qualsiasi%20file%20%22driver%22%20che%20usi%20abbia%20il%20comportamento%20di%20selezione.%20Nota%20che%20avrei%20potuto%20inserire%20dt%20%26lt%3B%26lt%3B%20clearrowstates()%3B%20chiamata%20sotto%20le%20chiamate%20replaceGB...%20per%20organizzare%20la%20modifica%20degli%20stati%20delle%20righe%20nella%20tabella%20in%20un%20unico%20posto.%20Tieni%20inoltre%20presente%20che%20questo%20codice%20modifica%20gli%20stati%20delle%20righe%20della%20tabella%20dati%20principale%20invece%20di%20utilizzare%20un%20filtro%20locale%20per%20modificare%20il%20report%20GraphBuilder.%20Potresti%20voler%20cambiare%20il%20tuo%20approccio%20se%20desideri%20pi%C3%B9%20report%20della%20tabella%20dati.%20Ma%20queste%20sono%20solo%20note%20e%20intese%20come%20informazioni%20aggiuntive%20per%20le%20future%20app%20che%20potresti%20creare%20con%20JMP.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENota%20gli%20stati%20clearrow%20nel%20file%20del%20driver%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20%20%20dt%20%26lt%3B%26lt%3B%20clearrowstates()%3B%0A%20%20%20newvarname%20%3D%20lb%26lt%3B%3CGETSELECTED%3E%3C%2FGETSELECTED%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EIn%20base%20alla%20mia%20comprensione%20%22semplicistica%22%20di%20ci%C3%B2%20che%20stai%20cercando%20di%20fare%2C%20ti%20consiglio%20semplicemente%20di%20sostituire%20dt%20%26lt%3B%26lt%3B%20clearrowstates()%3B%20con%20dt%20%26lt%3B%26lt%3B%3CSPAN%3E%20non%20escludere%3C%2FSPAN%3E%20()%3B%20Fammi%20sapere%20se%20questo%20%C3%A8%20il%20comportamento%20che%20preferisci%20o%20se%20%C3%A8%20pi%C3%B9%20complesso%20di%20cos%C3%AC.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-212287%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20Costruttore%20di%20grafici%3A%20nascondi%20X%20categorie%20senza%20dati%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-212287%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ESono%20totalmente%20d'accordo%20con%20te%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F2610%22%20target%3D%22_blank%22%3E%20%40vince_faller%3C%2FA%3E%20%2C%20sarebbe%20una%20funzionalit%C3%A0%20molto%20carina%20%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%3CP%3EPenso%20che%20lo%20aggiunger%C3%B2%20alla%20lista%20dei%20desideri%20di%20JMP!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-212286%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20Costruttore%20di%20grafici%3A%20nascondi%20X%20categorie%20senza%20dati%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-212286%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EGrazie%20mille%20per%20questi%20script%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F6884%22%20target%3D%22_blank%22%3E%20%40geoffrey_mann%3C%2FA%3E%3C%2FP%3E%3CP%3E%C3%88%20decisamente%20pi%C3%B9%20pulito%20di%20quello%20che%20ho%20fatto%20io!%3C%2FP%3E%3CP%3EC'%C3%A8%20solo%20una%20cosa%20che%20vorrei%20adattare%3A%20ogni%20volta%20che%20selezioniamo%20una%20nuova%20variabile%20nella%20casella%20di%20riepilogo%2C%20lo%20stato%20della%20riga%20viene%20ripristinato.%20Quindi%20se%20alcuni%20punti%20sono%20stati%20etichettati%2Fesclusi%2Fcolorati...%20perderemo%20questa%20informazione%20e%20pu%C3%B2%20essere%20fastidioso.%3C%2FP%3E%3CP%3EPer%20il%20resto%20corrisponde%20alle%20mie%20aspettative%2C%20quindi%20grazie%20ancora!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-212046%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20Costruttore%20di%20grafici%3A%20nascondi%20X%20categorie%20senza%20dati%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-212046%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ESarebbe%20bello%20se%20l'interruttore%20di%20colonna%20avesse%20un%20messaggio%20%26lt%3B%3CSET%20function%3D%22%22%3E%3C%2FSET%3E%3CLINGO-SUB%20id%3D%22lingo-sub-211884%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20Costruttore%20di%20grafici%3A%20nascondi%20X%20categorie%20senza%20dati%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-211884%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3C%2FLINGO-BODY%3E%3C%2FP%3E%3CP%3ECiao%20di%20nuovo%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F750%22%20target%3D%22_blank%22%3E%20%40anne_sa%3C%2FA%3E%20%2C%3C%2FP%3E%0A%3CP%3EScusate%20il%20ritardo%2C%20in%20realt%C3%A0%20ho%20preso%20l'influenza%20per%20qualche%20giorno%20e%20sono%20rimasto%20un%20po'%20indietro.%3C%2FP%3E%0A%3CP%3EHo%20allegato%20due%20file.%20Il%20primo%20file%20jsl%20(Esempio%20di%20script%20per%20la%20modifica%20della%20riga%20states.jsl)%20%C3%A8%20il%20file%20del%20driver%20e%20il%20percorso%20nella%20seconda%20riga%20%C3%A8%20il%20percorso%20completo%20della%20posizione%20in%20cui%20inserisci%20il%20secondo%20file%20(GraphBuilderJSLAPI.jsl).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%2F%2FInclude%20script%20to%20modify%20GraphBuilder%20with%20some%20special%20functions%20defined%0Ainclude(ConvertFilePath(%22%2FUsers%2Fgemann%2FProjects%2FPrototypes%2FJSLClasses%2FGraphBuilderJSLAPI.jsl%22%2C%20absolute%2C%20windows))%3B%0A%0A%2F%2FCreate%20a%20sample%20table%0Adt%20%3D%20New%20Table(%20%22Test%22%2C%0A%20Add%20Rows(%207%20)%2C%0A%20New%20Column(%20%22GROUP%22%2C%0A%20%20Character%2C%0A%20%20%22Nominal%22%2C%0A%20%20Set%20Values(%20%7B%22a%22%2C%20%22b%22%2C%20%22c%22%2C%20%22d%22%2C%20%22e%22%2C%20%22f%22%2C%20%22g%22%7D%20)%0A%20)%2C%0A%20New%20Column(%20%22Y%22%2C%0A%20%20Numeric%2C%0A%20%20%22Continuous%22%2C%0A%20%20Format(%20%22Best%22%2C%2012%20)%2C%0A%20%20Set%20Values(%20%5B7%2C%20.%2C%206%2C%20.%2C%204%2C%20.%2C%202%5D%20)%0A%20)%2C%0A%20New%20Column(%20%22Y%202%22%2C%0A%20%20Numeric%2C%0A%20%20%22Continuous%22%2C%0A%20%20Format(%20%22Best%22%2C%2012%20)%2C%0A%20%20Set%20Values(%20%5B7%2C%206%2C%202%2C%203%2C%20.%2C%20.%2C%20.%5D%20)%2C%0A%20%20Set%20Display%20Width(%2049%20)%0A%20)%0A)%3B%0A%0A%2F%2FAdd%20a%20new%20window%20and%20build%20a%20listbox%20beside%20a%20graphbuilder%0ANew%20Window(%20%22CustomColumnSwitcher%20Window%22%2C%0A%20%2F%2FStart%20by%20getting%20all%20of%20the%20columns%20in%20the%20current%20datatable%0A%20CNames%20%3D%20dt%20%26lt%3B%26lt%3B%20Get%20Column%20Names(%20Numeric%20)%3B%0A%20Show(%20CNames%20)%3B%0A%0A%20%2F%2FUser%20a%20horizontal%20layout%0A%20HListBox(%0A%20%20%2F%2FUse%20a%20ListBox%20as%20the%20new%20Column%20Switcher%0A%20%20lb%20%3D%20List%20Box(%20%0A%20%20%20CNames%2C%20%0A%20%20%20maxSelected(1)%2C%0A%20%20%20%2F%2FThe%20next%20lines%20specify%20the%20script%20that%20gets%20run%20when%20an%20item%20in%20listbox%20is%20selected%0A%20%20%20dt%20%26lt%3B%26lt%3B%20clearrowstates()%3B%0A%20%20%20newvarname%20%3D%20lb%26lt%3B%3CGETSELECTED%3E%3C%2FGETSELECTED%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EBuona%20fortuna%20e%20fammi%20sapere%20se%20hai%20problemi.%20Naturalmente%20questi%20file%20non%20sono%20completamente%20testati!!!%20%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%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-211524%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20Costruttore%20di%20grafici%3A%20nascondi%20X%20categorie%20senza%20dati%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-211524%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ECIAO%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F6884%22%20target%3D%22_blank%22%3E%20%40geoffrey_mann%3C%2FA%3E%20%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHo%20scritto%20qualcosa%20per%20aggiornare%20sostanzialmente%20il%20commutatore%20di%20colonna%20e%20modificare%20l'impostazione%20dell'asse%20(come%20suggerito%20da%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F2026%22%20target%3D%22_blank%22%3E%20%40giuliano%3C%2FA%3E%20)%20ogni%20volta%20che%20selezioniamo%20una%20nuova%20variabile.%20Tuttavia%20potrebbe%20non%20essere%20molto%20efficiente%2C%20quindi%20ovviamente%20sono%20molto%20interessato%20alla%20tua%20soluzione!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-211191%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20Costruttore%20di%20grafici%3A%20nascondi%20X%20categorie%20senza%20dati%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-211191%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ECiao%20Anna%2C%3C%2FP%3E%0A%3CP%3EVolevo%20ricontattarti%20per%20vedere%20se%20hai%20trovato%20una%20soluzione%20di%20codifica%20al%20tuo%20problema.%20Mi%20ci%20%C3%A8%20voluto%20un%20po'%20per%20trovare%20il%20tempo%2C%20ma%20ho%20una%20soluzione%20di%20codifica%20se%20ne%20hai%20ancora%20bisogno.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-210672%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20Costruttore%20di%20grafici%3A%20nascondi%20X%20categorie%20senza%20dati%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-210672%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ECIAO%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F2026%22%20target%3D%22_blank%22%3E%20%40giuliano%3C%2FA%3E%20!%3C%2FP%3E%3CP%3EApprezzo%20davvero%20i%20tuoi%20sforzi%20per%20risolvere%20il%20mio%20problema!%20Sfortunatamente%2C%20il%20numero%20di%20livelli%20non%20mancanti%20pu%C3%B2%20variare%20da%20una%20variabile%20di%20risposta%20a%20quella%20successiva.%20Tuttavia%2C%20il%20tuo%20ultimo%20post%20pu%C3%B2%20sicuramente%20essere%20utilizzato%20per%20la%20%E2%80%9Csoluzione%20di%20codifica%E2%80%9D.%20Modificare%20le%20impostazioni%20dell'asse%20in%20base%20al%20numero%20del%20livello%20%C3%A8%20davvero%20un%20bel%20modo%20per%20visualizzare%20ci%C3%B2%20che%20ci%20si%20aspetta.%20Lavorer%C3%B2%20in%20quella%20direzione.%20Grazie%20per%20l'aiuto!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-210465%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20Costruttore%20di%20grafici%3A%20nascondi%20X%20categorie%20senza%20dati%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-210465%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ECIAO%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F750%22%20target%3D%22_blank%22%3E%20%40anne_sa%3C%2FA%3E%20%2C%3C%2FP%3E%0A%3CP%3ECapisco%20cosa%20intendi.%20Potrebbe%20davvero%20trattarsi%20di%20codificare%20qualcosa%20di%20personalizzato%2C%20ma%20lasciami%20fare%20un%20altro%20tentativo%20interattivo.%20Ci%20sono%20sempre%20solo%20quattro%20livelli%20(anche%20se%20diversi)%20di%20Gruppo%20per%20ogni%20Y%3F%20Se%20%C3%A8%20cos%C3%AC%2C%20ecco%20un%20potenziale%20trucco%3A%20il%20Costruttore%20di%20grafici%20manterr%C3%A0%20l'asse%20X%20al%20cambio%20di%20colonna%20e%20poich%C3%A9%20i%20livelli%20sono%20ordinati%20in%20modo%20crescente%20(quindi%20i%20livelli%20vuoti%20sono%20sempre%20alla%20fine)%2C%20potremmo%20regolare%20l'asse%20in%20modo%20che%20vengano%20visualizzati%20solo%20quattro%20livelli%20.%20Puoi%20farlo%20nelle%20impostazioni%20dell'asse%20(fai%20clic%20con%20il%20pulsante%20destro%20del%20mouse%20sull'asse%20%26gt%3B%20impostazioni%20dell'asse)%20o%20semplicemente%20trascinando%20la%20fine%20dell'asse%20finch%C3%A9%20i%20livelli%20mancanti%20non%20vengono%20nascosti).%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EGraph%20Builder(%0A%20Show%20Control%20Panel(%200%20)%2C%0A%20Variables(%20X(%20%3AGROUP%2C%20Order%20By(%20%3AY%2C%20Ascending%2C%20Order%20Statistic(%20%22Mean%22%20)%20)%20)%2C%20Y(%20%3AY%20)%20)%2C%0A%20Elements(%20Bar(%20X%2C%20Y%2C%20Legend(%204%20)%20)%20)%2C%0A%20Column%20Switcher(%20%3AY%2C%20%7B%3AY%2C%20%3AY%202%7D%20)%2C%0A%20SendToReport(%20Dispatch(%20%7B%7D%2C%20%22GROUP%22%2C%20ScaleBox%2C%20%7BMin(%20-0.5%20)%2C%20Max(%203.5%20)%2C%20Inc(%201%20)%2C%20Minor%20Ticks(%200%20)%7D%20)%20)%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22resize.gif%22%20style%3D%22width%3A%20794px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22resize.gif%22%20style%3D%22width%3A%20794px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22resize.gif%22%20style%3D%22width%3A%20794px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F17424i9EB3D637716D6E5E%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22resize.gif%22%20alt%3D%22resize.gif%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EForse%20una%20potenziale%20soluzione%20nel%20tuo%20caso%3F%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F2026%22%20target%3D%22_blank%22%3E%40giuliano%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-210462%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20Costruttore%20di%20grafici%3A%20nascondi%20X%20categorie%20senza%20dati%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-210462%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EGrazie%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F2026%22%20target%3D%22_blank%22%3E%20%40giuliano%3C%2FA%3E%20per%20questo%20suggerimento!%20Infatti%20permette%20di%20visualizzare%20solo%20i%20livelli%20con%20dati.%3C%2FP%3E%3CP%3EL'unico%20problema%20(ma%20forse%20chiedo%20troppo)%20%C3%A8%20che%20perdiamo%20il%20collegamento%20tra%20le%20righe.%20Ad%20esempio%2C%20se%20seleziono%20il%20livello%20%22a%22%20per%20Y%20e%20voglio%20vedere%20il%20valore%20corrispondente%20per%20Y2%2C%20non%20viene%20evidenziato%20nulla%20quando%20seleziono%20Y2%20con%20il%20filtro%20dati%20locale.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EForse%20codificare%20il%20comportamento%20previsto%20%C3%A8%20la%20soluzione...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-210410%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20Costruttore%20di%20grafici%3A%20nascondi%20X%20categorie%20senza%20dati%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-210410%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ECIAO%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F750%22%20target%3D%22_blank%22%3E%20%40anne_sa%3C%2FA%3E%20%2C%3C%2FP%3E%0A%3CP%3ECome%20hai%20scoperto%2C%20il%20Costruttore%20di%20grafici%20osserva%20quelle%20categorie%20della%20variabile%20di%20raggruppamento%20e%20insister%C3%A0%20davvero%20nel%20tracciarle%20(il%20che%20di%20solito%20%C3%A8%20una%20buona%20cosa)%20poich%C3%A9%20presuppone%20che%20tu%20trovi%20valore%20in%20esse%20poich%C3%A9%20le%20hai%20mantenute%20nella%20tabella.%20Nel%20tuo%20caso%20con%20il%20commutatore%20di%20colonne%2C%20non%20%C3%A8%20cos%C3%AC%20semplice%20come%20eliminare%20semplicemente%20quelle%20righe%20poich%C3%A9%20esistono%20dati%20per%20le%20altre%20colonne.%20Una%20soluzione%20%C3%A8%20ristrutturare%20i%20dati%20in%20modo%20che%20le%20righe%20mancanti%20possano%20essere%20eliminate.%20Lo%20farei%20impilando%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETabelle%20%26gt%3B%20Impila%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Screen%20Shot%202019-05-23%20at%203.16.00%20PM.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screen%20Shot%202019-05-23%20at%203.16.00%20PM.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screen%20Shot%202019-05-23%20at%203.16.00%20PM.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F17414i8685967BBE3116FF%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Screen%20Shot%202019-05-23%20at%203.16.00%20PM.png%22%20alt%3D%22Screen%20Shot%202019-05-23%20at%203.16.00%20PM.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EData%20Table(%20%22Test%22%20)%20%26lt%3B%26lt%3B%20Stack(%0A%20columns(%20%3AY%2C%20%3AY%202%20)%2C%0A%20Source%20Label%20Column(%20%22Label%22%20)%2C%0A%20Stacked%20Data%20Column(%20%22Data%22%20)%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3ECi%C3%B2%20restituir%C3%A0%20una%20tabella%20come%20quella%20seguente%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screen%20Shot%202019-05-23%20at%203.16.39%20PM.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screen%20Shot%202019-05-23%20at%203.16.39%20PM.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screen%20Shot%202019-05-23%20at%203.16.39%20PM.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F17415i05ABD401BA2850D1%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Screen%20Shot%202019-05-23%20at%203.16.39%20PM.png%22%20alt%3D%22Screen%20Shot%202019-05-23%20at%203.16.39%20PM.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ERimuovi%20i%20valori%20mancanti%20facendo%20clic%20con%20il%20pulsante%20destro%20del%20mouse%20su%20una%20delle%20celle%20mancanti%20%26gt%3B%20seleziona%20la%20corrispondenza.%20Quindi%2C%20elimina%20quelle%20righe.%20Ci%C3%B2%20restituisce%20la%20tabella%20allegata.%20Ora%20crea%20il%20tuo%20grafico%20ma%20utilizza%20un%20filtro%20dati%20locale%20anzich%C3%A9%20un%20commutatore%20di%20colonne%20per%20selezionare%20quella%20che%20in%20precedenza%20era%20una%20risposta%20dalla%20colonna%20Etichetta%3A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EGraph%20Builder(%0A%20Show%20Control%20Panel(%200%20)%2C%0A%20Variables(%20X(%20%3AGROUP%20)%2C%20Y(%20%3AData%20)%20)%2C%0A%20Elements(%20Bar(%20X%2C%20Y%2C%20Legend(%204%20)%20)%20)%2C%0A%20Local%20Data%20Filter(%0A%20%20Add%20Filter(%0A%20%20%20columns(%20%3ALabel%20)%2C%0A%20%20%20Where(%20%3ALabel%20%3D%3D%20%22Y%22%20)%2C%0A%20%20%20Display(%20%3ALabel%2C%20Size(%20160%2C%2017%20)%20)%0A%20%20)%0A%20)%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22ldf.gif%22%20style%3D%22width%3A%20874px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ldf.gif%22%20style%3D%22width%3A%20874px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ldf.gif%22%20style%3D%22width%3A%20874px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F17416iF14E7BB8FCBC5869%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22ldf.gif%22%20alt%3D%22ldf.gif%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EPoich%C3%A9%20non%20ci%20sono%20righe%20mancanti%2C%20il%20Costruttore%20di%20grafici%20visualizza%20solo%20i%20livelli%20del%20gruppo%20popolati%20con%20dati.Ovviamente%20puoi%20generalizzare%20questo%20a%20qualsiasi%20numero%20di%20livelli%20di%20Y%3A%20semplicemente%20impilarli%20tutti%20nel%20passaggio%20iniziale.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESpero%20che%20aiuti!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F2026%22%20target%3D%22_blank%22%3E%40giuliano%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-210408%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20Costruttore%20di%20grafici%3A%20nascondi%20X%20categorie%20senza%20dati%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-210408%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ECiao%20Anna%2C%3CBR%20%2F%3E%20Adesso%20vedo%20il%20tuo%20problema%20e%20lo%20sto%20ancora%20esaminando.%20Credo%20che%20questo%20richieder%C3%A0%20un%20po'%20di%20codifica.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-209837%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20Costruttore%20di%20grafici%3A%20nascondi%20X%20categorie%20senza%20dati%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-209837%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EGrazie%20per%20la%20tua%20risposta%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F6884%22%20target%3D%22_blank%22%3E%20%40geoffrey_mann%3C%2FA%3E%3C%2FP%3E%3CP%3ESfortunatamente%20non%20%C3%A8%20esattamente%20quello%20che%20vorrei%20ottenere%20perch%C3%A9%20quando%20seleziono%20una%20nuova%20colonna%20con%20il%20commutatore%20di%20colonne%2C%20il%20filtro%20dei%20dati%20locali%20%C3%A8%20ancora%20basato%20su%20Y.%3C%2FP%3E%3CP%3EOvviamente%20%C3%A8%20possibile%20modificare%20manualmente%20il%20filtro%20dei%20dati%20locali%20ma%20poich%C3%A9%20posso%20avere%20un%20numero%20piuttosto%20elevato%20di%20variabili%2C%20sarebbe%20fantastico%20avere%20un%20modo%20automatico%20per%20farlo%20%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%3CLINGO-SUB%20id%3D%22lingo-sub-209835%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20Costruttore%20di%20grafici%3A%20nascondi%20X%20categorie%20senza%20dati%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-209835%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ECiao%20Anna%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELa%20tua%20idea%20di%20aver%20bisogno%20di%20una%20clausola%20%22dove%22%20o%20piuttosto%20di%20un%20filtro%20di%20qualche%20tipo%20%C3%A8%20corretta.%20Prova%20ad%20aggiungere%20la%20seguente%20riga%20allo%20script%20del%20graphbuilder%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ELocal%20Data%20Filter(%20Add%20Filter(%20columns(%20%3AY%20)%2C%20Where(%20%3AY%20%26gt%3B%3D%202%20%26amp%3B%20%3AY%20%26lt%3B%3D%207%20)%20)%20)%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESpero%20che%20un%20filtro%20dati%20locale%20vada%20bene%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EGraph%20Builder(%0A%20Size(%20527%2C%20448%20)%2C%0A%20Show%20Control%20Panel(%200%20)%2C%0A%20Variables(%0A%20%20X(%20%3AGROUP%2C%20Order%20By(%20%3AY%2C%20Ascending%2C%20Order%20Statistic(%20%22Mean%22%20)%20)%20)%2C%0A%20%20Y(%20%3AY%20)%0A%20)%2C%0A%20Elements(%20Bar(%20X%2C%20Y%2C%20Legend(%204%20)%20)%20)%2C%0A%20Column%20Switcher(%20%3AY%2C%20%7B%3AY%2C%20%3AY%202%7D%20)%2C%0A%20Local%20Data%20Filter(%20Add%20Filter(%20columns(%20%3AY%20)%2C%20Where(%20%3AY%20%26gt%3B%3D%202%20%26amp%3B%20%3AY%20%26lt%3B%3D%207%20)%20)%20)%0A%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
anne_sa
Level VI

Graph Builder: hide X categories with no data

Hello everyone,

 

I have a table with a grouping column and several response variables.

New Table( "Test",
	Add Rows( 7 ),
	New Column( "GROUP",
		Character,
		"Nominal",
		Set Values( {"a", "b", "c", "d", "e", "f", "g"} )
	),
	New Column( "Y",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [7, ., 6, ., 4, ., 2] )
	),
	New Column( "Y 2",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [7, 6, 2, 3, ., ., .] ),
		Set Display Width( 49 )
	)
)

I would like to create a bar chart with a column switcher.

Graph Builder(
	Size( 527, 448 ),
	Show Control Panel( 0 ),
	Variables(
		X( :GROUP, Order By( :Y, Ascending, Order Statistic( "Mean" ) ) ),
		Y( :Y )
	),
	Elements( Bar( X, Y, Legend( 4 ) ) ),
	Column Switcher( :Y, {:Y, :Y 2} )
)

My problem is that I do not want to display levels with no data. In other words, I do not want to see levels "b", "d" and "f" for Y and levels "e", "f", "g" for Y2.

 

Image1.png

 

I tried to use a "where" clause but unfortunately it is not taken into acount by the Column Switcher.

 

Do you have any idea of how we could do that?

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Graph Builder: hide X categories with no data

Hi again @anne_sa ,

Sorry for the delay, I actually caught the flu for a few days and got behind a little.

I have attached two files.  The first jsl file (Example Script for Changing row states.jsl) is the driver file and the path in the second line is the full path of the location that you place the second file (GraphBuilderJSLAPI.jsl).

 

//Include script to modify GraphBuilder with some special functions defined
include(ConvertFilePath("/Users/gemann/Projects/Prototypes/JSLClasses/GraphBuilderJSLAPI.jsl", absolute, windows));

//Create a sample table
dt = New Table( "Test",
	Add Rows( 7 ),
	New Column( "GROUP",
		Character,
		"Nominal",
		Set Values( {"a", "b", "c", "d", "e", "f", "g"} )
	),
	New Column( "Y",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [7, ., 6, ., 4, ., 2] )
	),
	New Column( "Y 2",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [7, 6, 2, 3, ., ., .] ),
		Set Display Width( 49 )
	)
);

//Add a new window and build a listbox beside a graphbuilder
New Window( "CustomColumnSwitcher Window",
	//Start by getting all of the columns in the current datatable
	CNames = dt << Get Column Names( Numeric );
	Show( CNames );

	//User a horizontal layout
	HListBox(
		//Use a ListBox as the new Column Switcher
		lb = List Box( 
			CNames, 
			maxSelected(1),
			//The next lines specify the script that gets run when an item in listbox is selected
			dt << clearrowstates();
			newvarname = lb<<getselected();
			ReplaceGBXVariable(gb,"GROUP",newvarname);
			ReplaceGBYVariable(gb,newvarname);
			rs = dt << select where( IsMissing( Column(newvarname)[] ) );  
			dt << exclude();
		),
		//Build the original GraphBuilder
		gb = Graph Builder(
			Size( 527, 448 ),
			Show Control Panel( 0 ),
			Variables(
				X( :GROUP, Order By( :Y, Ascending, Order Statistic( "Mean" ) ) ),
				Y( :Y )
			),
			Elements( Bar( X, Y, Legend( 4 ) ) )
		);
		
		// This line is added for the special case of filtering values that are missing from the graph
		rs = currentdatatable() << select where(IsMissing(:Y));  
		dt << exclude();
	);
);

Good luck and let me know if you have any issues.  Of course these files are not fully tested!!!  :)

 

View solution in original post

15 REPLIES 15

Re: Graph Builder: hide X categories with no data

Hi Anne,

 

Your idea that you need a "where" clause or rather a filter of some sort is correct.  Try adding the following line to your graphbuilder script:

 

Local Data Filter( Add Filter( columns( :Y ), Where( :Y >= 2 & :Y <= 7 ) ) )

 

I am hoping that a Local Data Filter is okay?

 

 

Graph Builder(
	Size( 527, 448 ),
	Show Control Panel( 0 ),
	Variables(
		X( :GROUP, Order By( :Y, Ascending, Order Statistic( "Mean" ) ) ),
		Y( :Y )
	),
	Elements( Bar( X, Y, Legend( 4 ) ) ),
	Column Switcher( :Y, {:Y, :Y 2} ),
	Local Data Filter( Add Filter( columns( :Y ), Where( :Y >= 2 & :Y <= 7 ) ) )

);

 

anne_sa
Level VI

Re: Graph Builder: hide X categories with no data

Thanks for your answer @geoffrey_mann

Unfortunately is it not exactly what I would like to get because when I select a new column with the column switcher, the local data filter is still based on Y.

Of course it is possible to manually change the local data filter but since I can have a quite high number of variables, it would be great to have an automatic way to do that :)

Re: Graph Builder: hide X categories with no data

Hi Anne,
I see your problem now and am still taking a look at it. I believe this one will take a little coding.
julian
Community Manager Community Manager

Re: Graph Builder: hide X categories with no data

Hi @anne_sa ,

As you discovered, Graph Builder observes those categories of your grouping variable and really will insist on plotting them (which is usually a good thing) since it assumes you find value in them since you kept them in your table. In your case with the column switcher, it's not as simple as just deleting those rows since for your other column data do exist. One solution is restructuring your data so that those missing rows can be eliminated. I would do this by stacking:

 

Tables > StackScreen Shot 2019-05-23 at 3.16.00 PM.png

Data Table( "Test" ) << Stack(
	columns( :Y, :Y 2 ),
	Source Label Column( "Label" ),
	Stacked Data Column( "Data" )
);

This will return a table like below:

Screen Shot 2019-05-23 at 3.16.39 PM.png

Remove the missing values by right-clicking any of the cells that are missing > select matching. Then, delete those rows. This returns the attached table. Now, make your graph but use a local data filter rather than a column switcher to select what previously was a response from your Label Column:

Graph Builder(
	Show Control Panel( 0 ),
	Variables( X( :GROUP ), Y( :Data ) ),
	Elements( Bar( X, Y, Legend( 4 ) ) ),
	Local Data Filter(
		Add Filter(
			columns( :Label ),
			Where( :Label == "Y" ),
			Display( :Label, Size( 160, 17 ) )
		)
	)
);

ldf.gif

Since there are no missing rows, Graph Builder displays only those levels of Group that are populated with data.  You can, of course, generalize this to any number of levels of Y -- simply stack all of them in the initial step.

 

I hope this helps!

 

@julian 

 

anne_sa
Level VI

Re: Graph Builder: hide X categories with no data

Thanks @julian  for this suggestion! Indeed it allows to display only levels with data.

The only problem (but maybe I ask too much)  is that we lose the link between rows. For instance if I select the level "a" for Y and if I want to see the corresponding value for Y2, nothing is highlighted when I select Y2 with the local data filter.

 

Maybe coding the expected behavior is the solution...

julian
Community Manager Community Manager

Re: Graph Builder: hide X categories with no data

Hi @anne_sa,

I see just what you mean. It really might come down to coding up something custom, but let me take one more interactive stab at this. Are there always only four levels (albeit different levels) of Group for each Y? If so, here's a potential hack: Graph Builder will maintain the X axis upon column switching, and since you have your levels ordered ascending (thus blank levels are always at the end), we could adjust the axis so that only four levels are showing. You can do this in the axis settings (right click the axis > axis settings), or just by dragging out the end of the axis until the missing levels are hidden). 

Graph Builder(
	Show Control Panel( 0 ),
	Variables( X( :GROUP, Order By( :Y, Ascending, Order Statistic( "Mean" ) ) ), Y( :Y ) ),
	Elements( Bar( X, Y, Legend( 4 ) ) ),
	Column Switcher( :Y, {:Y, :Y 2} ),
	SendToReport( Dispatch( {}, "GROUP", ScaleBox, {Min( -0.5 ), Max( 3.5 ), Inc( 1 ), Minor Ticks( 0 )} ) )
);

resize.gif

 

Maybe a potential solution in your case?

@julian  

anne_sa
Level VI

Re: Graph Builder: hide X categories with no data

Hi @julian!

I really appreciate your efforts to solve my problem! Unfortunately, the number of non-missing levels can be different from one response variable to the next one. However, your last post can definitely be used for the “coding solution”. Changing the axis settings based on the level number is indeed a nice way to display what is expected. I will work in that direction. Thanks for your help!

Re: Graph Builder: hide X categories with no data

Hi Anne,

I wanted to check back with you to see if you have found a coding solution to your problem.  It took me a while to find the time but I have a coding solution if you still need one.

anne_sa
Level VI

Re: Graph Builder: hide X categories with no data

Hi @geoffrey_mann ,

 

I have written something to basically update the column switcher and change the axis setting (as suggested by @julian ) each time we select a new variable. However it may not be very efficient so of course I am very interested by your solution!