<?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 Re: Add Reference Lines to multiple Variability Charts in a Column Group in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Add-Reference-Lines-to-multiple-Variability-Charts-in-a-Column/m-p/722923#M90517</link>
    <description>&lt;P&gt;Get references to the outline boxes in variability chart and loop over those while setting reference lines&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp"); // column properties are already set

varchart = dt &amp;lt;&amp;lt; Variability Chart(
	Y(Column Group("Processes")),
	X(:Wafer, :Site),
	Connect Cell Means(1),
	Std Dev Chart(0),
	invisible
);

obs = varchart &amp;lt;&amp;lt; XPath("//OutlineBox[contains(text(), 'Variability Chart for')]");
For Each({ob}, obs,
	colname = Substitute(ob &amp;lt;&amp;lt; get title, "Variability Chart for ", "");
	specs = Column(dt, colname) &amp;lt;&amp;lt; Get Property("Spec Limits");
	low = specs["LSL"] - 5;
	high = specs["USL"] + 5;
	
	ob[AxisBox(1)] &amp;lt;&amp;lt; Add Ref Line(low, "Solid", "Light Green", "", 1, 0.25);
	ob[AxisBox(1)] &amp;lt;&amp;lt; Add Ref Line(high, "Solid", "Light Green", "", 1, 0.25);
);

varchart &amp;lt;&amp;lt; Show Window(1);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 08 Feb 2024 15:43:38 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2024-02-08T15:43:38Z</dc:date>
    <item>
      <title>Add Reference Lines to multiple Variability Charts in a Column Group</title>
      <link>https://community.jmp.com/t5/Discussions/Add-Reference-Lines-to-multiple-Variability-Charts-in-a-Column/m-p/722908#M90515</link>
      <description>&lt;P&gt;I have many columns with spec limits saved to column properties. I am trying to add reference lines to multiple variability charts in a column group. My problem is I cant seem to add these lines without looping through and creating over 400 instances of a variability chart and adding them manually. This causes way to much memory to be used and slows down if not crashes JMP. The first reference line I am looking to add can be followed by this code. Here index i refers to the particular column in the column group that I am looping through:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;report(gb)[axis box( 1 )] &amp;lt;&amp;lt; Add Ref Line(
{Num(
Substr(
Char( As List( Column( As List( DT &amp;lt;&amp;lt; Get column Group( "Processes" ) )[i] ) &amp;lt;&amp;lt; Get Property( "Spec Limits" ) )[1] ),
5,
Length( Char( As List( Column( As List( DT &amp;lt;&amp;lt; Get column Group( "Processes" ) )[i] ) &amp;lt;&amp;lt; Get Property( "Spec Limits" ) )[1] ) ) - 5
)
), Num(
Substr(
Char( As List( Column( As List( DT &amp;lt;&amp;lt; Get column Group( "Processes" ) )[i] ) &amp;lt;&amp;lt; Get Property( "Spec Limits" ) )[2] ),
5,
Length( Char( As List( Column( As List( DT &amp;lt;&amp;lt; Get column Group( "Processes" ) )[i] ) &amp;lt;&amp;lt; Get Property( "Spec Limits" ) )[2] ) ) - 5
)
)},
"Solid",
"Light Green",
"",
1,
0.25
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is how I would like to implement this code, so that I dont create a new instance of a variability chart for each spec. I just do not know how to add custom reference lines to the below code. Basically I want to initially add a reference line range that highlights between LSL and USL in light green for each spec.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;open("$SAMPLE_DATA/Semiconductor Capability.jmp");
DT = Current Data Table();
DT &amp;lt;&amp;lt; Manage Limits(
Process Variables(
DT &amp;lt;&amp;lt; Get Column Group ("Processes")
),&amp;nbsp;
&amp;lt;&amp;lt; Show Limits All,
&amp;lt;&amp;lt; Save to Column Properties,
close window
);

SpecVarCharts = Variability Chart( Y( Column Group( "Processes" ) ), X( :Wafer, :Site ),Connect Cell Means( 1 ), Std Dev Chart(0));

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 15:24:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-Reference-Lines-to-multiple-Variability-Charts-in-a-Column/m-p/722908#M90515</guid>
      <dc:creator>JMewborn</dc:creator>
      <dc:date>2024-02-08T15:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: Add Reference Lines to multiple Variability Charts in a Column Group</title>
      <link>https://community.jmp.com/t5/Discussions/Add-Reference-Lines-to-multiple-Variability-Charts-in-a-Column/m-p/722923#M90517</link>
      <description>&lt;P&gt;Get references to the outline boxes in variability chart and loop over those while setting reference lines&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp"); // column properties are already set

varchart = dt &amp;lt;&amp;lt; Variability Chart(
	Y(Column Group("Processes")),
	X(:Wafer, :Site),
	Connect Cell Means(1),
	Std Dev Chart(0),
	invisible
);

obs = varchart &amp;lt;&amp;lt; XPath("//OutlineBox[contains(text(), 'Variability Chart for')]");
For Each({ob}, obs,
	colname = Substitute(ob &amp;lt;&amp;lt; get title, "Variability Chart for ", "");
	specs = Column(dt, colname) &amp;lt;&amp;lt; Get Property("Spec Limits");
	low = specs["LSL"] - 5;
	high = specs["USL"] + 5;
	
	ob[AxisBox(1)] &amp;lt;&amp;lt; Add Ref Line(low, "Solid", "Light Green", "", 1, 0.25);
	ob[AxisBox(1)] &amp;lt;&amp;lt; Add Ref Line(high, "Solid", "Light Green", "", 1, 0.25);
);

varchart &amp;lt;&amp;lt; Show Window(1);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Feb 2024 15:43:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-Reference-Lines-to-multiple-Variability-Charts-in-a-Column/m-p/722923#M90517</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-02-08T15:43:38Z</dc:date>
    </item>
  </channel>
</rss>

