klipstein/dojango — Issue #26: 26 - dojango-charting 
Author: klipstein
Created: 2011-11-06 12:54:57+00:00
State: open

I've been working on getting charting support integrated into dojango. This
is an initial upload to get some feedback. It supports all the basic 2D
charts. The pie chart is a bit awkward still and needs a better
abstraction. I also want to find a way to add support for the new django
aggregate functions(any good ideas on this are welcome). The views.py
currently uses the new multiline parser in ticket #24.

Plots, and series are required. Series can simply be "<name>": {}. All the
parameters simple take what the corresponding charting command would.
The stores parameter ties into the database in the same way the datagrid
does. Store names are expected to correspond to the name of a series.

Example:
{% load dojango_chart %}
{% chart %}
id = "<chart_name>"
pane_id = "<chart's content pane>"
parent_id = "<pane_id's tab container>"
root_id = "<parent_id's tab container>"
contentClass = "<css class>"
chartClass = "<css class>"
legendClass = "<css class>"
legend = {<legend options>}
axes = {
"x": {"minorTicks": 0},
"y": {"minorTicks": 0, "vertical": 1, "min": 0}
}
plots = {
"default": {"type": "StackedAreas"}
}
series = {
"<name>": {"opts": {<options>}},
}
seriesOrder = []
stores = {
"<name>": {
"app": "",
"model": "",
"fields": [],
"axis": "x",
"sort": "",
"query": {}
}
}
{% endchart %}

Original link: http://code.google.com/p/dojango/issues/detail?id=26