Package GChartWrapper :: Package charts :: Package templatetags :: Module charts
[hide private]
[frames] | no frames]

Module charts

source code


Contains the Django templatetags for chart and note types
Now takes an as argument
If the as argument is 'img', it will return a XHTML <img/>
If the as argument is 'url', it will simply return the url of the chart
If the as argument is anything else, the chart will be loaded into the context
and named what the as argument is

    {% chart ... [as url|img|varname] %}
    ...
    {% endchart %}

    Example:
        {% chart Pie3D 1 2 3 4 5 as pie %}
            {% label A B C D %}
            {% color green %}
        {% endchart %}
    
        {% pie %} # The chart obj itself
        {% pie.image %} # The PIL instance
        {% pie.checksum %} # An SHA1 checksum

The FancyNode powers the tag for Note,Pin,Text and Bubble charts
The <type> argument is one of the chart types in lower case

    {% <type> ... [as url|img|varname]%}
    
    Example:
        {% bubble icon_text_big snack bb $2.99 ffbb00 black as img %}
    

Classes [hide private]
GenericNode
ChartNode
FancyNode
NoteNode
PinNode
TextNode
BubbleNode
Functions [hide private]
 
attribute(parser, token) source code
 
make_chart(parser, token) source code
 
note(parser, token) source code
 
pin(parser, token) source code
 
text(parser, token) source code
 
bubble(parser, token) source code
Variables [hide private]
  register = Library()
  tag = 'level_data'