Martin Yergeau Posted June 29, 2021 Share Posted June 29, 2021 AFAIK and remember this is not an option with graph; heading is all justified the same way. Link to comment Share on other sites More sharing options...
David Beagan Posted June 29, 2021 Share Posted June 29, 2021 Perhaps you could accomplish it with two annotations, one on the left, one on the right: GRAPH FILE ibisamp/ggsales SUM DOLLARS UNITS BY REGION ON GRAPH PCHOLD FORMAT JSCHART ON GRAPH SET LOOKGRAPH VBAR ON GRAPH SET AUTOFIT ON ON GRAPH SET STYLE * *GRAPH_JS border: { color: "transparent"}, title: {visible: true, "text": " "}, annotations : [ { position: { x: '60px', y: '12px' }, label: { visible: true, text: 'Chart Title', font: '14pt arial', color: 'black', position: 'bottom' } }, { position: { x: '86%', y: '12px' }, label: { visible: true, text: '&DATEMtrDYY &DATEHHIA', font: '12pt arial', color: 'grey', position: 'bottom' } }, ] *END ENDSTYLE END image.png833487 11.3 KB Link to comment Share on other sites More sharing options...
Todd Van Valkenburg Posted June 29, 2021 Author Share Posted June 29, 2021 For a graph, I would like to have some text in the header left justified and some text right justified. InfoAssist does not give me the capability to do this. All text, all lines, are justified the same way. By default with InfoAsisst TYPE=HEADING, JUSTIFY=LEFT, $ TYPE=HEADING, LINE=1, ITEM=1, OBJECT=TEXT, FONT=ARIAL, SIZE=18, COLOR=RGB(66 70 73), STYLE=NORMAL, $ So I tried editing the fex but not finding the right combination. I tried having two lines in the header and justifying each line differenty. When I run it, both lines become center justified. TYPE=HEADING, LINE=1, JUSTIFY=LEFT, ITEM=1, OBJECT=TEXT, FONT=ARIAL, SIZE=18, COLOR=RGB(66 70 73), STYLE=NORMAL, $ TYPE=HEADING, LINE=2, JUSTIFY=RIGHT, ITEM=1, OBJECT=TEXT, FONT=ARIAL, SIZE=18, COLOR=RGB(66 70 73), STYLE=NORMAL, $ I tried just adding a line 2 and justifying to the right. But IA ignores the right justification and both lines are justified to the left. TYPE=HEADING, JUSTIFY=LEFT, $ TYPE=HEADING, LINE=1, ITEM=1, OBJECT=TEXT, FONT=ARIAL, SIZE=18, COLOR=RGB(66 70 73), STYLE=NORMAL, $ TYPE=HEADING, LINE=2, JUSTIFY=RIGHT, ITEM=1, OBJECT=TEXT, FONT=ARIAL, SIZE=18, COLOR=RGB(66 70 73), STYLE=NORMAL, $ Thanks for any help. Todd Link to comment Share on other sites More sharing options...
Todd Van Valkenburg Posted June 30, 2021 Author Share Posted June 30, 2021 Thank you David. I believe that will work. Sort of a related/follow up question if you dont mind. The text that I need to display in the annotation is actually a url link with an image: question_link/A300V='<a href="https://www.mtu.edu/institutional-research/university-dashboards/definitions#placement-rate" target="_blank"><img src="/ibi_apps/views.bipBIP_REQUEST_TYPE=BIP_GET_VIEW_RESOURCE&|ibfsPath=IBFS:/WFC/Repository/Public/Hidden_Content/question_mark_22.png"></a>'; Placing <question_link in the header works. However, using the annotation, the label text does not like <question_link nor <question_link. If I use a -SET at the beginning of the fex to define &question_link, then the problem becomes that Info Assist balks and you can not use IA from that point forward to visualize the chart. Which then leads to a workaround to start a new graph fex, copy in the original code, remove the -SET, then make changes using IA, then re-adding -SET after you are done. Or at least that is what I have been doing which is a pain. Is there an alternative approach to allow IA to work and use -SET &var commands Todd Link to comment Share on other sites More sharing options...
David Beagan Posted June 30, 2021 Share Posted June 30, 2021 You could have a fex to -SET the variable and -INCLUDE of the fex that is IA editable. Link to comment Share on other sites More sharing options...
Todd Van Valkenburg Posted June 30, 2021 Author Share Posted June 30, 2021 David - Good thought. I created the fex to include. Then on the first line of the graph I used the -INCLUDE statement. Works when you run it from within the editor. However, when I go back into Info Assist after saving the changes, edit it, and save it, IA removes the -INCLUDE statement. Are you aware of where I should insert this -INCLUDE where Info Assist does not remove it Link to comment Share on other sites More sharing options...
David Beagan Posted June 30, 2021 Share Posted June 30, 2021 Actually my intended suggestion was slightly different than what you did. Im suggesting that one fex has both the -SET and the -INCLUDE. The -INCLUDE references the IA fex. Link to comment Share on other sites More sharing options...
Todd Van Valkenburg Posted June 30, 2021 Author Share Posted June 30, 2021 David - Thanks again! I see where you are going and I tried that too. Info Assist is just throwing up one road block after another. So the annotations json code gets changed when you save it in IA. So this code is changed and all the single quotes get changed to double quotes. annotations : [ { position: { x: 95%, y: 12px }, label: { visible: true, text: &question_link_retention, font: 14pt arial, position: bottom } }] Normally, I would not expect this to be an issue. But the &question_link_retention contains double quotes as in: -SET &question_link_retention='<a href="https://www.mtu.edu/institutional-research/university-dashboards/definitions#retention-graduation-rates" target="_blank"><img src="/ibi_apps/views.bipBIP_REQUEST_TYPE=BIP_GET_VIEW_RESOURCE&|ibfsPath=IBFS:/WFC/Repository/Public/Hidden_Content/question_mark_22.png"></a>&|nbsp;&|nbsp;&|nbsp;&|nbsp;'; So the text: &question_link_retention is changed to &question_link_retention which, in turn, does not work. So I think after all that I am just going to live with a fex that cannot be edited in IA and make a comment in the info assist why it is uneditable for future reference. But I do appreciate your help since I now know of a work around for a left and right justified heading. Todd Link to comment Share on other sites More sharing options...
David Beagan Posted June 30, 2021 Share Posted June 30, 2021 Not sure if this helps with IA, but I can do a link in the annotation without double quote characters, using two single quote marks in the -SET. Not sure if IA would like it: -SET &link = '<a href=''https://google.com''>Google</a>'; GRAPH FILE ibisamp/ggsales SUM DOLLARS UNITS BY REGION ON GRAPH PCHOLD FORMAT JSCHART ON GRAPH SET LOOKGRAPH VBAR ON GRAPH SET AUTOFIT ON ON GRAPH SET STYLE * *GRAPH_JS border: { color: "transparent"}, title: { visible: true, text: " "}, annotations : [ { position: { x: "60px", y: "12px" }, label: { visible: true, text: "Chart Title", font: "15pt arial", color: "black" } }, { position: { x: "86%", y: "10px" }, label: { visible: true, text: "&link", font: "12pt arial", color: "grey" } }, ] *END ENDSTYLE END Link to comment Share on other sites More sharing options...
Todd Van Valkenburg Posted June 30, 2021 Author Share Posted June 30, 2021 Yes, two single quote marks work in the & variable! So I now have two objects for each graph. One object is the IA-friendly fex. The other fex does the -SET and -INCLUDE. Whew. Link to comment Share on other sites More sharing options...
David Beagan Posted June 30, 2021 Share Posted June 30, 2021 Thats great, glad you found a way. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now