diff --git a/panoramix/templates/panoramix/viz_markup.html b/panoramix/templates/panoramix/viz_markup.html new file mode 100644 index 0000000000000..31106b8587aaf --- /dev/null +++ b/panoramix/templates/panoramix/viz_markup.html @@ -0,0 +1,9 @@ +{% macro viz_html(viz) %} +
{{ viz.rendered()|safe }}
+{% endmacro %} + +{% macro viz_js(viz) %} +{% endmacro %} + +{% macro viz_css(viz) %} +{% endmacro %} diff --git a/panoramix/viz.py b/panoramix/viz.py index 457a2d315d853..40d198350bec9 100644 --- a/panoramix/viz.py +++ b/panoramix/viz.py @@ -175,6 +175,13 @@ def rendered(self): return code +class WordCloudViz(BaseViz): + verbose_name = "Word Cloud" + template = 'panoramix/viz_word_cloud.html' + form_fields = ['viz_type', 'group_by', 'metric'] + js_files = ['d3.layout.cloud.js'] + + class HighchartsViz(BaseViz): verbose_name = "Base Highcharts Viz" template = 'panoramix/viz_highcharts.html' @@ -390,4 +397,5 @@ class DistributionBarViz(DistributionPieViz): ['pie', DistributionPieViz], ['bubble', BubbleViz], ['markup', MarkupViz], + ['word_cloud', WordCloudViz], ])