Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
web-openccg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
ease-ph
DeepLanguageUnderstanding
web-openccg
Commits
0b496cf3
Unverified
Commit
0b496cf3
authored
6 years ago
by
Sebastian Höffner
Browse files
Options
Downloads
Patches
Plain Diff
Styling graph output.
parent
9eb5af99
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/graphs.py
+8
-5
8 additions, 5 deletions
app/graphs.py
app/static/openccg.css
+10
-0
10 additions, 0 deletions
app/static/openccg.css
app/static/openccg.js
+5
-14
5 additions, 14 deletions
app/static/openccg.js
with
23 additions
and
19 deletions
app/graphs.py
+
8
−
5
View file @
0b496cf3
...
...
@@ -3,22 +3,22 @@ import pygraphviz as pgv
nominal_style
=
{
'
style
'
:
'
filled
'
,
'
fillcolor
'
:
'
#bc8f8f
'
'
fillcolor
'
:
'
lightskyblue
'
}
variable_style
=
{
'
style
'
:
'
filled
'
,
'
fillcolor
'
:
'
#deb887
'
,
'
fillcolor
'
:
'
lightblue
'
,
}
relation_style
=
{
'
style
'
:
'
filled
'
,
'
fillcolor
'
:
'
#dda0dd
'
'
fillcolor
'
:
'
honeydew
'
}
property_style
=
{
'
style
'
:
'
filled
'
,
'
fillcolor
'
:
'
#dfdfdf
'
'
fillcolor
'
:
'
aliceblue
'
}
...
...
@@ -31,7 +31,10 @@ def relation_string(role):
def
variable_string
(
variable
):
return
f
"
{
variable
[
'
name
'
]
}
:
{
variable
[
'
type
'
]
}
"
if
variable
[
'
type
'
]:
return
f
"
{
variable
[
'
name
'
]
}
:
{
variable
[
'
type
'
]
}
"
else
:
variable
[
'
name
'
]
def
handle_nominal
(
tree
,
graph
):
...
...
This diff is collapsed.
Click to expand it.
app/static/openccg.css
+
10
−
0
View file @
0b496cf3
...
...
@@ -13,3 +13,13 @@ pre .null {
pre
.key
{
color
:
maroon
;
}
/* Overwrite settings of mini.css */
#graphs
{
max-height
:
1000px
;
}
#graphs
svg
{
margin-top
:
-100px
;
}
This diff is collapsed.
Click to expand it.
app/static/openccg.js
+
5
−
14
View file @
0b496cf3
...
...
@@ -31,22 +31,13 @@ const viz = new Viz();
* #graphs element.
* graph_element is the element returned by Viz's drawing call, title is a title to use. */
function
add_graph
(
graph_element
,
title
)
{
var
graph
=
document
.
getElementById
(
'
graphs
'
);
var
card
=
document
.
createElement
(
'
div
'
);
card
.
className
=
'
card fluid
'
;
var
title_elem
=
document
.
createElement
(
'
div
'
);
title_elem
.
className
=
'
section
'
;
title_elem
.
innerHTML
=
'
<h3>
'
+
title
+
'
</h3>
'
;
var
graphs
=
document
.
getElementById
(
'
graphs
'
);
var
graph_sec
tion
=
document
.
createElement
(
'
div
'
);
graph_section
.
className
=
'
section
'
;
var
cap
tion
=
document
.
createElement
(
'
h3
'
);
caption
.
innerHTML
=
title
;
card
.
appendChild
(
title_elem
);
card
.
appendChild
(
graph_section
);
graph_section
.
appendChild
(
graph_element
);
graph
.
appendChild
(
card
);
graphs
.
appendChild
(
caption
);
graphs
.
appendChild
(
graph_element
);
}
/* Should be used as an event listener on the input form. Fetches the result and makes sure
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment