Skip to content
This repository has been archived by the owner on Nov 25, 2017. It is now read-only.

Commit

Permalink
Fixed some itty bitty problems with chart_markers
Browse files Browse the repository at this point in the history
  • Loading branch information
tupperware14 committed Jan 9, 2009
1 parent 562c0e5 commit 5ad0cc2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions googlecharts/templatetags/charts.py
Expand Up @@ -409,24 +409,24 @@ def chart_marker(marker, color, dataset_index, data_point, size):
marker = marker_types.get(marker, marker)
return {"chm": smart_join(",", marker, color, dataset_index, data_point, size)}

@option("chart-makers", multi="|")
@option("chart-markers", multi="|")
def chart_markers(dataset_index, iterable):
"""Provide an iterable yielding (type, color, point, size)"""
try:
it = iter(iterable)
except TypeError:
return {}

markers = []
for m in it:
try:
marker, color, point, size = m
marker, color, data_point, size = m
except ValueError:
continue
marker - marker_types.get(marker, marker)
marker = marker_types.get(marker, marker)
markers.append(smart_join(",", marker, color, dataset_index, data_point, size))
return {"chm": smart_join("|", markers)}

return {"chm": smart_join("|", *flatten(markers))}

@option("chart-map-area")
def chart_map_area(where):
Expand Down

0 comments on commit 5ad0cc2

Please sign in to comment.