From c36192cfd880ca98240f4abe89b0f48682de757d Mon Sep 17 00:00:00 2001 From: ldonjibson Date: Fri, 23 Feb 2018 13:48:33 -0800 Subject: [PATCH 1/3] Histogram chart added to gchart Histogram chart added to gchart --- graphos/templates/graphos/gchart/histogram_chart.html | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 graphos/templates/graphos/gchart/histogram_chart.html diff --git a/graphos/templates/graphos/gchart/histogram_chart.html b/graphos/templates/graphos/gchart/histogram_chart.html new file mode 100644 index 0000000..9a076d7 --- /dev/null +++ b/graphos/templates/graphos/gchart/histogram_chart.html @@ -0,0 +1,5 @@ + {% extends "graphos/gchart/base.html" %} + +{% block create_chart %} + var chart = new google.visualization.Histogram(document.getElementById('{{ chart.get_html_id }}')); +{% endblock %} From ad9471dde796e82fcead940dbad22c3310a43c86 Mon Sep 17 00:00:00 2001 From: ldonjibson Date: Fri, 23 Feb 2018 21:52:09 +0000 Subject: [PATCH 2/3] Histogram gchart added hISTOGRAM can now be called as from graphos.renderers.gchart import HistogramChart --- graphos/renderers/gchart.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/graphos/renderers/gchart.py b/graphos/renderers/gchart.py index 95d596a..a4e5198 100644 --- a/graphos/renderers/gchart.py +++ b/graphos/renderers/gchart.py @@ -20,6 +20,9 @@ class ColumnChart(BaseGChart): def get_js_template(self): return "graphos/gchart/column_chart.html" +class HistogramChart(BaseGChart): + def get_js_template(self): + return "graphos/gchart/histogram_chart.html" class BarChart(BaseGChart): def get_js_template(self): From 9eccf8d8a61187c69d81176029e8181ac5e80b16 Mon Sep 17 00:00:00 2001 From: ldonjibson Date: Fri, 23 Feb 2018 21:55:07 +0000 Subject: [PATCH 3/3] Updated with HISTOGRAM GCHART Updated with HISTOGRAM GCHART --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7163398..8ba95b6 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ Graphos is a Django app to normalize data to create beautiful charts. It provide * Candlestick chart * Treemap chart * Gauge chart +* Histogram (newly added) #### YUI