BookmarkSubscribeRSS Feed
maltman
Calcite | Level 5

I can't figure out how to display a legend in my bivariant chart through OLE.  There is very little documentation in JSL OLE (I'm I the only one doing this?).  Can someone point me in the right direction?  In it's current state, it will display the graph and color code by column.  All I need to do is display the legend.

Here is my code (VBscript):

'Initialize JMP
Dim MyJMP, JMPDoc, DT, DT2, WidthTable, FrameBox
Set MyJMP = CreateObject("JMP.Application")
MyJMP.Visible = true
Set JMPDoc = MyJMP.OpenDocument("MyFile.csv")

'Convert document to datatable
Set DT = JMPDoc.GetDataTable

'Select the width data (High and Low)
DT.SelectRowsWhere "CHART_SUBSET",rowSelectEquals, rowSelectExtendCurrent,"TARGET=HIGH"
DT.SelectRowsWhere "CHART_SUBSET",rowSelectEquals, rowSelectExtendCurrent,"TARGET=LOW"

Set WidthTable = DT.subset
WidthTable.ColorByColumn("SPC_ENTITY")
WidthTable.MarkerByColumn("SPC_ENTITY")

'*************************

'Create Bivariant Chart

'*************************
Dim Biv
Set Biv = WidthTable.Document.CreateBivariate
Biv.LaunchAddY("SPC_CHART_VALUE")
Biv.LaunchAddX("SPC_TXN_DATE")
Biv.LaunchAddBy("SPC_CHART_SUBSET")

Biv.FitLine
Biv.Launch

FrameBox = Biv.GetGraphicItemByType("frame box", 1)


Biv.FrameBoxAddGraphicsScript 1, "Row Legend(:SPC_ENTITY)"
Biv.FrameBoxSetMarkerSize 1, 4

1 REPLY 1
FriedEgg
SAS Employee

To attract the proper audience try posting you question in the forum for JMP software.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 709 views
  • 0 likes
  • 2 in conversation