JMP에서 JSL을 사용하여 웹 페이지의 표시된 콘텐츠를 커서가 가리키도록 하는 효과를 어떻게 구현할 수 있을까요?전문가 여러분, 감사합니다!
http://worldmap.ifnews.com/chinamap/china/fmap
h = [=>];
h["User-Agent"] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36";
h["Accept"] = "application/json, text/javascript, */*; q=0.01";
h["Referer"] = "http://worldmap.ifnews.com/chinamap/china/fmap";
h["X-Requested-With"] = "XMLHttpRequest";
u = "http://worldmap.ifnews.com/chinamap/china/financialData?type=all";
rs = New HTTP Request(URL(u), Method("GET"), Headers(h));
rr = rs << Send;
If( !Is Missing( rr ),
txt = Blob To Char( rr );
dt = JSON To Data Table( txt );
dt << Set Name( "map" );
dt:price << Data Type( Numeric ) << Modeling Type( Continuous );
dt:priceLimit << Data Type( Numeric ) << Modeling Type( Continuous );
dt:changeAmount << Data Type( Numeric ) << Modeling Type( Continuous );
dt:countryCName << Set Property( "Map Role", {Map Role( NameName, Map Name( "World", "Countries" ) )} );
dt << Graph Builder(
Size( 800, 600 ),
Show Control Panel( 0 ),
Variables( Shape( :countryCName ), Color( :priceLimit ) ),
Elements( Map Shapes( Legend( 5 ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
5,
Properties(
0,
{gradient(
{Color Theme( "Red to Green" ),
Reverse Gradient( 1 )}
)},
Item ID( "priceLimit", 1 )
)
)}
)
)
);
);

자동화 및 스크립팅Re: MP 소프트웨어의 JSL은 웹 페이지에서 이러한 효과를 어떻게 구현하나요?어떤 효과인가요? 어떤 웹 페이지인가요?
Re: MP 소프트웨어의 JSL은 웹 페이지에서 이러한 효과를 어떻게 구현하나요?JMP에서 JSL을 사용하여 웹 페이지의 표시된 콘텐츠를 커서가 가리키도록 하는 효과를 어떻게 구현할 수 있을까요?
http://worldmap.ifnews.com/chinamap/china/fmap 
지도에서 특정 국가 범위를 가리키면 관련 데이터가 나타납니다.
감사해요!
Re: MP 소프트웨어의 JSL은 웹 페이지에서 이러한 효과를 어떻게 구현하나요?JMP에서는 이 기능이 마우스 오버 레이블을 통해 구현됩니다.

더 빠른 업데이트가 필요하거나, 호버라벨 상자의 모양이 마음에 들지 않는다면 마우스 트랩을 사용할 수 있습니다.
더 자세한 내용은 비슷한 질문에 대한 @Craige_Hales의 답변을 참조하세요.
https://community.jmp.com/t5/Discussions/Can-JMP-graphics-have-this-effect/mp/810221/highlight/true#M99217
Re: MP 소프트웨어의 JSL은 웹 페이지에서 이러한 효과를 어떻게 구현하나요?또는, HoverLabel의 "Picture" 스크립트를 편집하여 원하는 동작을 실행할 수도 있습니다.
- 웹페이지 열기
- 그래프에 추가 정보를 표시합니다.
- 다른 플롯을 엽니다...
자세한 내용은 이 게시글에서 확인할 수 있습니다.
Re: 마우스오버를 통한 동작? - 수정자 키 :backhand_index_pointing_right::white_square_button:을 사용하세요
이 접근 방식의 장점:
마우스 커서가 현재 위치한 국가의 정보를 자동으로 인식하므로 따로 검색할 필요가 없습니다.
:Country[local:_firstrow]
Re: MP 소프트웨어의 JSL은 웹 페이지에서 이러한 효과를 어떻게 구현하나요?
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/World Demographics.jmp" );
mapxy = Open( "$MAPS/World-XY.jmp" );
mapname = Open( "$MAPS/World-Name.jmp" );
mapname << New Column( "X", Format( "Longitude DDD", "PUNDIR", 14, 4 ) );
mapname << New Column( "Y", Format( "Latitude DDD", "PUNDIR", 14, 4 ) );
For Each( {rw}, Index( 1, N Rows( mapname ) ),
shapeID = mapName:ShapeID[rw];
rws = mapxy << get rows where( :ShapeID == shapeID & :PartID == 1 );
xs = mapxy[rws, "X"];
ys = mapxy[rws, "Y"];
{x, y} = Polygon Centroid( xs, ys );
mapname:x[rw] = x;
mapname:y[rw] = y;
);
dt << Update( With( mapname ), Match Columns( :Territory = :Region ), Add Columns from Update Table( :X, :Y ) );
New Namespace(
"hover"
);
hover:GDP = 0;
hover:x = 0;
hover:y = 0;
gb = Graph Builder(
Variables( Color( :GDP per Capita ), Shape( :Territory ) ),
Elements( Map Shapes() ),
SendToReport(
Dispatch( {}, "", ScaleBox,
{Format( "Longitude DDD", "PUNDIR", 16 ), Min( 0 ), Max( 30 )}
),
Dispatch( {}, "", ScaleBox( 2 ),
{Format( "Latitude DDD", "PUNDIR", 16, 0 ), Min( 40 ), Max( 50 )}
),
Dispatch( {}, "Graph Builder", FrameBox,
{Set Graphlet(
Picture(
hover:GDP = :GDP per Capita[local:_firstrow];
hover:x = :X[local:_firstrow];
hover:y = :y[local:_firstrow];
//approach1: select the current country and trigger an update -> nice, but draggy
//local:_dataTable << Clear Select << select rows(local:_firstrow);
gb << inval;
gb << updatewindow;
)
)}
)
)
);
fb1 = Report( gb )[FrameBox( 1 )];
fb1 << addgraphicsscript(
x = hover:x;
y = hover:y;
Text( center justified, {hover:x, hover:y}, "GDP: " || Char( Round( hover:GDP ) ) );
);
호버 레이블은 마우스의 현재 위치를 알고 있나요?
유감스럽게도 local:_xaxis/_yaxis =0입니다 .
임시방편으로 저는 이 방법을 사용했습니다.
https://community.jmp.com/t5/Discussions/exporting-x-amp-y-values-coordinates-from-graph-builder-once-jmp/mp/193660/highlight/true#M41407 @johnmoore 국가의 중심점을 계산하여 GDP를 표시하려고 합니다.
대안으로, 마우스 트랩(Hover Label 해결 방법 외에도)을 사용하여 마우스의 위치를 가져올 수 있습니다.
단점: 사용자가 마우스 버튼을 눌러야 하므로 상호작용성이 떨어집니다.
Re: MP 소프트웨어의 JSL은 웹 페이지에서 이러한 효과를 어떻게 구현하나요?전문가 여러분, 감사합니다! 