Permalink
Browse files

Added 'chart-legend-position' as an option, allowing the legend to li…

…ve on any side of the chart, instead of the default left
  • Loading branch information...
1 parent 9bbb63d commit 974e3f41edff534f52aa2fed0e18e7b6282333b0 @eyeseast eyeseast committed Sep 22, 2009
Showing with 7 additions and 1 deletion.
  1. +7 −1 googlecharts/templatetags/charts.py
@@ -353,6 +353,12 @@ def chart_title(title, fontsize=None, color="000000"):
def chart_legend(*labels):
return {"chdl": smart_join("|", *flatten(labels))}
+
+@option("chart-legend-position")
+def chart_legend_position(position):
+ return {"chdlp": position}
+
+
@option("chart-labels", multi="|")
def chart_labels(*labels):
return {"chl": smart_join("|", *flatten(labels))}
@@ -616,4 +622,4 @@ def flatten(iterator):
for j in flatten(iter(i)):
yield j
else:
- yield i
+ yield i

0 comments on commit 974e3f4

Please sign in to comment.