kezabelle/django-googlecharts — Issue #1: ZeroDivisionError using the sparkline simple tag.
Author: kezabelle
Created: 2011-10-16 20:36:54+00:00
State: open
Labels: bug

### Relevant traceback portion:

```
googlecharts/templatetags/charts.py", line 59, in sparkline
" alt="" />' % (encoded_data, color, len(data), data[-1], 100*(float(data[-1])/(maxvalue-minvalue)))
```

### Actual error:

```TemplateSyntaxError: Caught ZeroDivisionError while rendering: float division```

### Probable cause:
Providing a dataset comprising of too few units. Specifically, in my case ``[34]`` - that is, a list with just one value, an integer.