diff --git a/demo_project/demo/templates/demo/flot.html b/demo_project/demo/templates/demo/flot.html
index d7fd9e4..3bde416 100644
--- a/demo_project/demo/templates/demo/flot.html
+++ b/demo_project/demo/templates/demo/flot.html
@@ -90,4 +90,19 @@
+ {{ area_chart.as_html }}
+
+ data = [
+ ['Year', 'Sales', 'Expenses', 'Items Sold', 'Net Profit'],
+ ['2004', 1000, 400, 100, 600],
+ ['2005', 1170, 460, 120, 310],
+ ['2006', 660, 1120, 50, -460],
+ ['2007', 1030, 540, 100, 200],
+ ]
+ data_source = SimpleDataSource(data)
+ chart = flot.AreaChart(data_source, options={'title': "Sales/ Expense"})
+
+
{% endblock %}
diff --git a/demo_project/demo/views.py b/demo_project/demo/views.py
index 5f4291a..c3ed32a 100755
--- a/demo_project/demo/views.py
+++ b/demo_project/demo/views.py
@@ -278,8 +278,11 @@ def get_context_data(self, **kwargs):
options={'title': "Sales Growth"})
pie_chart = flot.PieChart(context["simple_data_source"],
options = {'title': "Sales Growth"})
+ area_chart = flot.AreaChart(context["simple_data_source"],
+ options = {'title': "Sales Growth"})
context.update({'point_chart': point_chart,
- "pie_chart": pie_chart})
+ "pie_chart": pie_chart,
+ "area_chart": area_chart})
return context
flot_demo = FlotDemo.as_view(renderer=flot)
diff --git a/graphos/renderers/flot.py b/graphos/renderers/flot.py
index 94081e1..d607da5 100644
--- a/graphos/renderers/flot.py
+++ b/graphos/renderers/flot.py
@@ -104,3 +104,12 @@ def get_options(self):
def get_js_template(self):
return 'graphos/flot/pie_chart.html'
+
+
+class AreaChart(BaseFlotChart):
+
+ def get_options(self):
+ options = get_default_options("lines")
+ options["series"]["lines"] = {"fill": "true"}
+ options.update(self.options)
+ return options