From f5e355a26f518c6d9b667e3ffd8e19fe4680e7a1 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Tue, 22 Sep 2015 17:58:44 -0700 Subject: [PATCH] Forgot to git add viz_markup.html --- panoramix/templates/panoramix/viz_markup.html | 9 +++++++++ panoramix/viz.py | 8 ++++++++ 2 files changed, 17 insertions(+) create mode 100644 panoramix/templates/panoramix/viz_markup.html 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], ])