db1_graphs.py 498 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
# -*- coding: utf-8 -*-
""" graphs

"""
tp_stacked = \
T("The graph can be rendered as line or stacked chart. "
  "The latter is used when the stacked fields are defined. ")

db.define_table("graphs",
    Field("graph", "string", length=255, notnull=True),
    Field("definition", "text", default=""),
    Field('stack_axis', 'string', length=255, comment=tp_stacked),
    Field('stack_granularity', 'string', length=255),
    migrate="graphs.table")

db.graphs.graph.filter_in = dbui.CLEAN_SPACES