Skip to content

Commit

Permalink
improve d3 rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdamusic committed Nov 16, 2022
1 parent 2b4c2fd commit 80a3331
Show file tree
Hide file tree
Showing 11 changed files with 562 additions and 25 deletions.
19 changes: 19 additions & 0 deletions ontospy/gendocs/jinja_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,22 @@ def truncatewords_filter(data, l=20):

env.filters['truncatewords'] = truncatewords_filter




#
# FILTER
#


def d3_dendogram_height_filter(tot_objects):
"""A filter to generate dynamically the min height of a dendogram."""
n = 50 * tot_objects
if n < 800:
return 800
else:
return n


env.filters['d3_dendogram_height'] = d3_dendogram_height_filter

2 changes: 1 addition & 1 deletion ontospy/gendocs/media/templates/d3/d3_bar_hierarchy.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "shared/d3base.html" %}
{% extends "shared/d3_base.html" %}



Expand Down
2 changes: 1 addition & 1 deletion ontospy/gendocs/media/templates/d3/d3_bubble_chart.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "shared/d3base.html" %}
{% extends "shared/d3_base.html" %}



Expand Down
Loading

0 comments on commit 80a3331

Please sign in to comment.