<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Running a script to automate changes on a graph builder report in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Running-a-script-to-automate-changes-on-a-graph-builder-report/m-p/730357#M91313</link>
    <description>&lt;P&gt;I'm trying to write a script that will edit the font on a graph builder report. my code is below. When I have the graph report I want open, I open the script editor, run the script but nothing happens. New to writing/executing JSL scripts, working with JMP15. If there is a way to record a macro to do this, please let me know as well. Thanks in advance :)&lt;/img&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// 1. Change the font of the x-axis on an open graph to bold size 12
Graph Builder(
	Show Control Panel( 0 ),
	Variables( X( :Column1 ), Y( :Column2 ) ),
	Elements( Points( X, Y, Legend( 1 ) ) ),
	SendToReport( Dispatch( {}, "Column1", ScaleBox, {Font Size( 12 ), Bold( 1 )} ) )
);
 
// 2. Change the font of any of the multiple y-axes on an open graph to bold size 12
Graph Builder(
	Show Control Panel( 0 ),
	Variables( X( :Column1 ), Y( :Column2, :Column3 ) ),
	Elements( Points( X, Y, Legend( 1 ) ) ),
	SendToReport(
		Dispatch( {}, "Column2", ScaleBox, {Font Size( 12 ), Bold( 1 )} ),
		Dispatch( {}, "Column3", ScaleBox, {Font Size( 12 ), Bold( 1 )} )
	)
);
 
// 3. Change the font of x-axis title, y-axis titles, and the graph title to bold size 14
Graph Builder(
	Show Control Panel( 0 ),
	Variables( X( :Column1 ), Y( :Column2 ) ),
	Elements( Points( X, Y, Legend( 1 ) ) ),
	SendToReport(
		Dispatch( {}, "Column1", ScaleBox, {Font Size( 14 ), Bold( 1 )} ),
		Dispatch( {}, "Column2", ScaleBox, {Font Size( 14 ), Bold( 1 )} ),
		Dispatch( {}, "Graph Title", TextEditBox, {Font Size( 14 ), Bold( 1 )} )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Mar 2024 17:37:42 GMT</pubDate>
    <dc:creator>sanch1</dc:creator>
    <dc:date>2024-03-06T17:37:42Z</dc:date>
    <item>
      <title>Running a script to automate changes on a graph builder report</title>
      <link>https://community.jmp.com/t5/Discussions/Running-a-script-to-automate-changes-on-a-graph-builder-report/m-p/730357#M91313</link>
      <description>&lt;P&gt;I'm trying to write a script that will edit the font on a graph builder report. my code is below. When I have the graph report I want open, I open the script editor, run the script but nothing happens. New to writing/executing JSL scripts, working with JMP15. If there is a way to record a macro to do this, please let me know as well. Thanks in advance :)&lt;/img&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// 1. Change the font of the x-axis on an open graph to bold size 12
Graph Builder(
	Show Control Panel( 0 ),
	Variables( X( :Column1 ), Y( :Column2 ) ),
	Elements( Points( X, Y, Legend( 1 ) ) ),
	SendToReport( Dispatch( {}, "Column1", ScaleBox, {Font Size( 12 ), Bold( 1 )} ) )
);
 
// 2. Change the font of any of the multiple y-axes on an open graph to bold size 12
Graph Builder(
	Show Control Panel( 0 ),
	Variables( X( :Column1 ), Y( :Column2, :Column3 ) ),
	Elements( Points( X, Y, Legend( 1 ) ) ),
	SendToReport(
		Dispatch( {}, "Column2", ScaleBox, {Font Size( 12 ), Bold( 1 )} ),
		Dispatch( {}, "Column3", ScaleBox, {Font Size( 12 ), Bold( 1 )} )
	)
);
 
// 3. Change the font of x-axis title, y-axis titles, and the graph title to bold size 14
Graph Builder(
	Show Control Panel( 0 ),
	Variables( X( :Column1 ), Y( :Column2 ) ),
	Elements( Points( X, Y, Legend( 1 ) ) ),
	SendToReport(
		Dispatch( {}, "Column1", ScaleBox, {Font Size( 14 ), Bold( 1 )} ),
		Dispatch( {}, "Column2", ScaleBox, {Font Size( 14 ), Bold( 1 )} ),
		Dispatch( {}, "Graph Title", TextEditBox, {Font Size( 14 ), Bold( 1 )} )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 17:37:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Running-a-script-to-automate-changes-on-a-graph-builder-report/m-p/730357#M91313</guid>
      <dc:creator>sanch1</dc:creator>
      <dc:date>2024-03-06T17:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: Running a script to automate changes on a graph builder report</title>
      <link>https://community.jmp.com/t5/Discussions/Running-a-script-to-automate-changes-on-a-graph-builder-report/m-p/730363#M91316</link>
      <description>&lt;P&gt;The element syntax is incorrect.&amp;nbsp; Try this syntax&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Show Control Panel( 0 ),
	Variables( X( :Column1 ), Y( :Column2 ) ),
	Elements( Points( X, Y, Legend( 1 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"Column1",
			ScaleBox,
			{Label Row( {Set Font Size( 14 ), Set Font Style( "Bold" )} )}
		)
	)
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Also, please use the JSL icon at the top of the Preview Window when entering JSL.&amp;nbsp; It allows the reader to more easily study the JSL&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 17:50:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Running-a-script-to-automate-changes-on-a-graph-builder-report/m-p/730363#M91316</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-03-06T17:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Running a script to automate changes on a graph builder report</title>
      <link>https://community.jmp.com/t5/Discussions/Running-a-script-to-automate-changes-on-a-graph-builder-report/m-p/736504#M91730</link>
      <description>&lt;P&gt;Thank you for your reply. However, I don't understand the correction. Is this just for that one section of the code or does it apply to the whole thing? I tried running this and still nothing happens.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 18:35:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Running-a-script-to-automate-changes-on-a-graph-builder-report/m-p/736504#M91730</guid>
      <dc:creator>sanch1</dc:creator>
      <dc:date>2024-03-19T18:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Running a script to automate changes on a graph builder report</title>
      <link>https://community.jmp.com/t5/Discussions/Running-a-script-to-automate-changes-on-a-graph-builder-report/m-p/736509#M91732</link>
      <description>&lt;P&gt;For each place in your code where the Font Size and Font Style are being set, change to use the structure I showed.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 18:57:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Running-a-script-to-automate-changes-on-a-graph-builder-report/m-p/736509#M91732</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-03-19T18:57:58Z</dc:date>
    </item>
  </channel>
</rss>

