Skip to content

Commit 1808f87

Browse files
author
Yi-Ting Lee
committed
legend added
1 parent e3a4c9d commit 1808f87

File tree

1 file changed

+99
-4
lines changed

1 file changed

+99
-4
lines changed

src/sagemaker/lineage/query.py

Lines changed: 99 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ def _get_edges(self):
289289
# get edge info in the form of (source, target, label)
290290
for edge in self.edges:
291291
edges.append((edge.source_arn, edge.destination_arn, edge.association_type))
292-
edges.append((self.edges[1].destination_arn, self.edges[1].source_arn, self.edges[1].association_type))
293292
return edges
294293

295294
def visualize(self):
@@ -319,7 +318,7 @@ def visualize(self):
319318
cyto.Cytoscape(
320319
id="cytoscape-graph",
321320
elements=elements,
322-
style={"width": "100%", "height": "350px"},
321+
style={"width": "85%", "height": "350px", 'display': 'inline-block', 'border-width': '1vw', "border-color": "#232f3e"},
323322
layout={"name": "klay"},
324323
stylesheet=[
325324
{
@@ -331,7 +330,8 @@ def visualize(self):
331330
"width": "10vw",
332331
"border-width": "0.8",
333332
"border-opacity": "0",
334-
"border-color": "#232f3e"
333+
"border-color": "#232f3e",
334+
"font-family": "verdana"
335335
},
336336
},
337337
{
@@ -351,6 +351,7 @@ def visualize(self):
351351
"target-arrow-shape": "triangle",
352352
"line-color": "gray",
353353
"arrow-scale": "0.5",
354+
"font-family": "verdana"
354355
},
355356
},
356357
{"selector": ".Artifact", "style": {"background-color": "#146eb4"}},
@@ -361,7 +362,101 @@ def visualize(self):
361362
{"selector": ".select", "style": { "border-opacity": "0.7"}},
362363
],
363364
responsive=True,
364-
)
365+
),
366+
html.Div([
367+
html.Div([
368+
html.Div(
369+
style={
370+
'background-color': "#f6cf61",
371+
'width': '1.5vw',
372+
'height': '1.5vw',
373+
'display': 'inline-block'
374+
}
375+
),
376+
html.Div(
377+
style={
378+
'width': '0.5vw',
379+
'height': '1.5vw',
380+
'display': 'inline-block'
381+
}
382+
),
383+
html.Div(' Trial Component', style={'display': 'inline-block', "font-size": "1.5vw"}),
384+
]),
385+
html.Div([
386+
html.Div(
387+
style={
388+
'background-color': "#ff9900",
389+
'width': '1.5vw',
390+
'height': '1.5vw',
391+
'display': 'inline-block'
392+
}
393+
),
394+
html.Div(
395+
style={
396+
'width': '0.5vw',
397+
'height': '1.5vw',
398+
'display': 'inline-block'
399+
}
400+
),
401+
html.Div(' Context', style={'display': 'inline-block', "font-size": "1.5vw"}),
402+
]),
403+
html.Div([
404+
html.Div(
405+
style={
406+
'background-color': "#88c396",
407+
'width': '1.5vw',
408+
'height': '1.5vw',
409+
'display': 'inline-block'
410+
}
411+
),
412+
html.Div(
413+
style={
414+
'width': '0.5vw',
415+
'height': '1.5vw',
416+
'display': 'inline-block'
417+
}
418+
),
419+
html.Div(' Action', style={'display': 'inline-block', "font-size": "1.5vw"}),
420+
]),
421+
html.Div([
422+
html.Div(
423+
style={
424+
'background-color': "#146eb4",
425+
'width': '1.5vw',
426+
'height': '1.5vw',
427+
'display': 'inline-block'
428+
}
429+
),
430+
html.Div(
431+
style={
432+
'width': '0.5vw',
433+
'height': '1.5vw',
434+
'display': 'inline-block'
435+
}
436+
),
437+
html.Div(' Artifact', style={'display': 'inline-block', "font-size": "1.5vw"}),
438+
]),
439+
html.Div([
440+
html.Div(
441+
"★",
442+
style={
443+
'background-color': "white",
444+
'width': '1.5vw',
445+
'height': '1.5vw',
446+
'display': 'inline-block',
447+
"font-size": "1.5vw"
448+
}
449+
),
450+
html.Div(
451+
style={
452+
'width': '0.5vw',
453+
'height': '1.5vw',
454+
'display': 'inline-block'
455+
}
456+
),
457+
html.Div('StartArn', style={'display': 'inline-block', "font-size": "1.5vw"}),
458+
]),
459+
], style={'width': '15%', 'display': 'inline-block', "font-size": "1vw", "font-family": "verdana", "vertical-align": "top"})
365460
]
366461
)
367462

0 commit comments

Comments
 (0)