Skip to content

Commit

Permalink
add clique search page
Browse files Browse the repository at this point in the history
  • Loading branch information
iblacksand committed Feb 7, 2024
1 parent e0ebd78 commit 0d25c38
Show file tree
Hide file tree
Showing 3 changed files with 151 additions and 1 deletion.
22 changes: 22 additions & 0 deletions assets/css/gd.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 18 additions & 1 deletion assets/js/dag.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ function create_dag(
clique_id,
element_id = "dag",
ignore_size = false,
host = "",
) {
return fetch("data/" + clique_type + "/" + clique_id + ".json")
return fetch(host + "data/" + clique_type + "/" + clique_id + ".json")
.then((response) => response.json())
.then((clique_data) => {
if (clique_data.nodes.length > 50 && !ignore_size) {
Expand Down Expand Up @@ -89,6 +90,21 @@ function create_dag(
fontSize: autoFontSize(),
},
},
toolbox: {
show: true,
feature: {
dataView: {
show: true,
title: "Data View",
readOnly: true,
},
saveAsImage: {
show: true,
title: "Save as Image",
type: "png",
},
},
},
visualMap: {
type: "continuous",
min: -165,
Expand Down Expand Up @@ -217,6 +233,7 @@ function update_dag(chart, clique_type, clique_id) {
},
series: [
{
name: clique_id,
nodes: clique_data.nodes,
links: clique_data.edges,
},
Expand Down
Loading

0 comments on commit 0d25c38

Please sign in to comment.